[farsight2/master] Set the whole RTP conference instead of just of GstRtpBin

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


---
 gst/fsrtpconference/fs-rtp-conference.c |    3 +--
 gst/fsrtpconference/fs-rtp-session.c    |   26 +++++++++++++-------------
 gst/fsrtpconference/fs-rtp-session.h    |    3 ++-
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 86574db..5d00059 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -311,8 +311,7 @@ fs_rtp_conference_new_session (FsBaseConference *conf,
   } while (fs_rtp_conference_get_session_by_id_locked (self, id));
   GST_OBJECT_UNLOCK (self);
 
-  new_session = FS_SESSION_CAST (fs_rtp_session_new (media_type,
-      self->priv->gstrtpbin, id));
+  new_session = FS_SESSION_CAST (fs_rtp_session_new (media_type, self, id));
 
   GST_OBJECT_LOCK (self);
   self->priv->sessions = g_list_append (self->priv->sessions, new_session);
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 2fd6c4c..17a577f 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -56,7 +56,7 @@ enum
   PROP_NATIVE_CODECS_CONFIG,
   PROP_NEGOTIATED_CODECS,
   PROP_CURRENT_SEND_CODEC,
-  PROP_GSTRTPBIN
+  PROP_CONFERENCE
 };
 
 struct _FsRtpSessionPrivate
@@ -64,7 +64,7 @@ struct _FsRtpSessionPrivate
   FsMediaType media_type;
   guint id;
 
-  GstElement *gstrtpbin;
+  GstElement *conference;
 
   gboolean disposed;
 };
@@ -178,11 +178,11 @@ fs_rtp_session_class_init (FsRtpSessionClass *klass)
                                     "current-send-codec");
 
     g_object_class_install_property (gobject_class,
-      PROP_GSTRTPBIN,
-      g_param_spec_object ("gstrtpbin",
-        "The GstRtpBin this stream refers to",
-        "This is a convience pointer for the GstRtpbin",
-        GST_TYPE_ELEMENT,
+      PROP_CONFERENCE,
+      g_param_spec_object ("conference",
+        "The Conference this stream refers to",
+        "This is a convience pointer for the Conference",
+        FS_TYPE_RTP_CONFERENCE,
         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
 
   gobject_class->dispose = fs_rtp_session_dispose;
@@ -236,8 +236,8 @@ fs_rtp_session_get_property (GObject *object,
     case PROP_ID:
       g_value_set_uint (value, self->priv->id);
       break;
-    case PROP_GSTRTPBIN:
-      g_value_set_object (value, self->priv->gstrtpbin);
+    case PROP_CONFERENCE:
+      g_value_take_object (value, self->priv->conference);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -260,8 +260,8 @@ fs_rtp_session_set_property (GObject *object,
     case PROP_ID:
       self->priv->id = g_value_get_uint (value);
       break;
-    case PROP_GSTRTPBIN:
-      self->priv->gstrtpbin = g_value_dup_object (value);
+    case PROP_CONFERENCE:
+      self->priv->conference = g_value_get_object (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -387,11 +387,11 @@ fs_rtp_session_set_send_codec (FsSession *session, FsCodec *send_codec,
 }
 
 FsRtpSession *
-fs_rtp_session_new (FsMediaType media_type, GstElement *gstrtpbin, guint id)
+fs_rtp_session_new (FsMediaType media_type, GstElement *conference, guint id)
 {
   return g_object_new (FS_TYPE_RTP_SESSION,
                        "media-type", media_type,
-                       "gstrtpbin", gstrtpbin,
+                       "conference", conference,
                        "id", id,
                        NULL);
 }
diff --git a/gst/fsrtpconference/fs-rtp-session.h b/gst/fsrtpconference/fs-rtp-session.h
index b23d24a..53db95d 100644
--- a/gst/fsrtpconference/fs-rtp-session.h
+++ b/gst/fsrtpconference/fs-rtp-session.h
@@ -67,7 +67,8 @@ struct _FsRtpSession
 
 GType fs_rtp_session_get_type (void);
 
-FsRtpSession *fs_rtp_session_new (FsMediaType media_type, GstElement *gstrtpbin,
+FsRtpSession *fs_rtp_session_new (FsMediaType media_type,
+                                  FsRtpConference *conference,
                                   guint id);
 
 GstCaps *fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt);
-- 
1.5.6.5




More information about the farsight-commits mailing list