[farsight2/master] Have ignored compatibility-mode property and set it to ID19 as default if none is set

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


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

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index a191892..579c4e2 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -65,8 +65,8 @@ enum
   PROP_TURN_IP,
   PROP_TURN_PORT,
   PROP_CONTROLLING_MODE,
-  PROP_COMPATIBILITY,
-  PROP_STREAM_ID
+  PROP_STREAM_ID,
+  PROP_COMPATIBILITY_MODE
 };
 
 struct _FsNiceStreamTransmitterPrivate
@@ -80,7 +80,6 @@ struct _FsNiceStreamTransmitterPrivate
   gchar *turn_ip;
   guint turn_port;
 
-  gboolean compatibility;
   gboolean controlling_mode;
 
   GMutex *mutex;
@@ -237,6 +236,7 @@ fs_nice_stream_transmitter_class_init (FsNiceStreamTransmitterClass *klass)
           "Whether the agent is in controlling mode",
           TRUE,
           G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
+
   g_object_class_install_property (gobject_class, PROP_STREAM_ID,
       g_param_spec_uint (
           "stream-id",
@@ -246,6 +246,14 @@ fs_nice_stream_transmitter_class_init (FsNiceStreamTransmitterClass *klass)
           0,
           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_COMPATIBILITY_MODE,
+      g_param_spec_uint (
+          "compatibility-mode",
+          "The compability-mode",
+          "The id of the stream according to libnice",
+          NICE_COMPATIBILITY_ID19, NICE_COMPATIBILITY_LAST,
+          NICE_COMPATIBILITY_ID19,
+          G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -400,6 +408,9 @@ fs_nice_stream_transmitter_set_property (GObject *object,
         g_object_set_property (G_OBJECT (self->priv->transmitter->agent),
             g_param_spec_get_name (pspec), value);
       break;
+    case PROP_COMPATIBILITY_MODE:
+      /* ignore it here, its been intercepted by our parent */
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c
index 58379d0..0ff4b70 100644
--- a/transmitters/nice/fs-nice-transmitter.c
+++ b/transmitters/nice/fs-nice-transmitter.c
@@ -768,6 +768,9 @@ fs_nice_transmitter_new_stream_transmitter (FsTransmitter *transmitter,
     }
   }
 
+  if (self->priv->compatiblity_mode == G_MAXUINT)
+    self->priv->compatiblity_mode = NICE_COMPATIBILITY_ID19;
+
 
   if (!fs_nice_transmitter_start (self, error))
     return NULL;
-- 
1.5.6.5




More information about the farsight-commits mailing list