[farsight2/master] Add a stream property to the substream
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:09 PST 2008
---
gst/fsrtpconference/fs-rtp-substream.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
index 7957db1..ad97117 100644
--- a/gst/fsrtpconference/fs-rtp-substream.c
+++ b/gst/fsrtpconference/fs-rtp-substream.c
@@ -45,6 +45,7 @@ enum
PROP_0,
PROP_CONFERENCE,
PROP_SESSION,
+ PROP_STREAM,
PROP_RTPBIN_PAD,
PROP_SSRC,
PROP_PT,
@@ -57,6 +58,7 @@ struct _FsRtpSubStreamPrivate {
/* These are only pointers, we don't own references */
FsRtpConference *conference;
FsRtpSession *session;
+ FsRtpStream *stream;
guint32 ssrc;
guint pt;
@@ -131,6 +133,15 @@ fs_rtp_sub_stream_class_init (FsRtpSubStreamClass *klass)
g_object_class_install_property (gobject_class,
+ PROP_STREAM,
+ g_param_spec_object ("stream",
+ "The FsRtpStream this substream stream refers to",
+ "This is a convience pointer for the parent FsRtpStream",
+ FS_TYPE_RTP_STREAM,
+ G_PARAM_READWRITE));
+
+
+ g_object_class_install_property (gobject_class,
PROP_RTPBIN_PAD,
g_param_spec_object ("rtpbin-pad",
"The GstPad this substrea is linked to",
@@ -301,6 +312,12 @@ fs_rtp_sub_stream_set_property (GObject *object,
case PROP_SESSION:
self->priv->session = g_value_get_object (value);
break;
+ case PROP_STREAM:
+ if (self->priv->stream)
+ g_warning ("Stream already set, not re-setting");
+ else
+ self->priv->stream = g_value_get_object (value);
+ break;
case PROP_RTPBIN_PAD:
self->priv->rtpbin_pad = g_value_dup_object (value);
break;
@@ -332,6 +349,9 @@ fs_rtp_sub_stream_get_property (GObject *object,
case PROP_SESSION:
g_value_set_object (value, self->priv->session);
break;
+ case PROP_STREAM:
+ g_value_set_object (value, self->priv->stream);
+ break;
case PROP_RTPBIN_PAD:
g_value_set_object (value, self->priv->rtpbin_pad);
break;
--
1.5.6.5
More information about the farsight-commits
mailing list