[farsight2/master] Add property for relayinfo

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:29 PST 2008


---
 transmitters/nice/fs-nice-stream-transmitter.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index c10f072..9cef440 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -67,7 +67,8 @@ enum
   PROP_CONTROLLING_MODE,
   PROP_STREAM_ID,
   PROP_COMPATIBILITY_MODE,
-  PROP_ASSOCIATE_ON_SOURCE
+  PROP_ASSOCIATE_ON_SOURCE,
+  PROP_RELAY_INFO
 };
 
 struct _FsNiceStreamTransmitterPrivate
@@ -96,6 +97,8 @@ struct _FsNiceStreamTransmitterPrivate
   gulong new_selected_pair_handler_id;
   gulong new_candidate_handler_id;
 
+  GValueArray *relay_info;
+
   volatile gint associate_on_source;
 
   /* Everything below is protected by the mutex */
@@ -275,6 +278,15 @@ fs_nice_stream_transmitter_class_init (FsNiceStreamTransmitterClass *klass)
           NICE_COMPATIBILITY_ID19,
           G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
 
+  g_object_class_install_property (gobject_class, PROP_RELAY_INFO,
+      g_param_spec_value_array (
+          "relay-info",
+          "Information for the TURN server",
+          "ip/port/username/password of the TURN server in a GValueArray of"
+          " GstStructures ",
+          NULL,
+          G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
   nice_udp_bsd_socket_factory_init (&udpfactory);
 
 }
@@ -459,6 +471,9 @@ fs_nice_stream_transmitter_set_property (GObject *object,
       g_atomic_int_set (&self->priv->associate_on_source,
           g_value_get_boolean (value));
       break;
+    case PROP_RELAY_INFO:
+      self->priv->relay_info = g_value_get_boxed (value);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
-- 
1.5.6.5




More information about the farsight-commits mailing list