[farsight2/master] Add associate-on-source property to the nice transmitter
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:26:30 PST 2008
---
transmitters/nice/fs-nice-stream-transmitter.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index f26c7f4..112c39c 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -68,7 +68,8 @@ enum
PROP_TURN_PORT,
PROP_CONTROLLING_MODE,
PROP_STREAM_ID,
- PROP_COMPATIBILITY_MODE
+ PROP_COMPATIBILITY_MODE,
+ PROP_ASSOCIATE_ON_SOURCE
};
struct _FsNiceStreamTransmitterPrivate
@@ -99,6 +100,8 @@ struct _FsNiceStreamTransmitterPrivate
gulong new_selected_pair_handler_id;
gulong new_candidate_handler_id;
+ volatile gint associate_on_source;
+
/* Everything below is protected by the mutex */
gboolean gathered;
@@ -226,6 +229,8 @@ fs_nice_stream_transmitter_class_init (FsNiceStreamTransmitterClass *klass)
g_object_class_override_property (gobject_class, PROP_SENDING, "sending");
g_object_class_override_property (gobject_class,
PROP_PREFERRED_LOCAL_CANDIDATES, "preferred-local-candidates");
+ g_object_class_override_property (gobject_class, PROP_ASSOCIATE_ON_SOURCE,
+ "associate-on-source");
g_object_class_install_property (gobject_class, PROP_STUN_IP,
g_param_spec_string (
@@ -442,6 +447,10 @@ fs_nice_stream_transmitter_get_property (GObject *object,
case PROP_COMPATIBILITY_MODE:
g_value_set_uint (value, self->priv->compatibility_mode);
break;
+ case PROP_ASSOCIATE_ON_SOURCE:
+ g_value_set_boolean (value,
+ g_atomic_int_get (&self->priv->associate_on_source));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -485,6 +494,10 @@ fs_nice_stream_transmitter_set_property (GObject *object,
case PROP_COMPATIBILITY_MODE:
self->priv->compatibility_mode = g_value_get_uint (value);
break;
+ case PROP_ASSOCIATE_ON_SOURCE:
+ g_atomic_int_set (&self->priv->associate_on_source,
+ g_value_get_boolean (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