[farsight2/master] Store the ssrc into the "id" property of a rtp stream

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


---
 gst/fsrtpconference/fs-rtp-stream.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index af46744..96d4042 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -47,6 +47,7 @@ enum
 enum
 {
   PROP_0,
+  PROP_ID,
 #if 0
   /* TODO Do we really need this? */
   PROP_SOURCE_PADS,
@@ -67,6 +68,8 @@ struct _FsRtpStreamPrivate
 
   FsStreamDirection direction;
 
+  guint ssrc;
+
   GError *construction_error;
 
   gboolean disposed;
@@ -177,6 +180,9 @@ fs_rtp_stream_class_init (FsRtpStreamClass *klass)
   stream_class->remote_candidates_added = fs_rtp_stream_remote_candidates_added;
   stream_class->select_candidate_pair = fs_rtp_stream_select_candidate_pair;
 
+  g_object_class_override_property (gobject_class,
+                                    PROP_ID,
+                                    "id");
 #if 0
   g_object_class_override_property (gobject_class,
                                     PROP_SOURCE_PADS,
@@ -264,6 +270,9 @@ fs_rtp_stream_get_property (GObject *object,
   FsRtpStream *self = FS_RTP_STREAM (object);
 
   switch (prop_id) {
+    case PROP_ID:
+      g_value_set_uint (value, self->priv->ssrc);
+      break;
     case PROP_SESSION:
       g_value_set_object (value, self->priv->session);
       break;
@@ -292,6 +301,9 @@ fs_rtp_stream_set_property (GObject *object,
   FsRtpStream *self = FS_RTP_STREAM (object);
 
   switch (prop_id) {
+    case PROP_ID:
+      self->priv->ssrc = g_value_get_uint (value);
+      break;
     case PROP_SESSION:
       self->priv->session = FS_RTP_SESSION (g_value_get_object (value));
       break;
-- 
1.5.6.5




More information about the farsight-commits mailing list