diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-12-29 15:49:37 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-12-29 15:49:37 +0000 |
commit | 231fcedd6dce08f8313b95c389288d021c257fb2 (patch) | |
tree | b705d27e4273ed358459aa2304412a678e100187 | |
parent | 0199de838b226e1f56a1867325c1b84f7891b248 (diff) | |
download | gst-plugins-bad-231fcedd6dce08f8313b95c389288d021c257fb2.tar.gz gst-plugins-bad-231fcedd6dce08f8313b95c389288d021c257fb2.tar.bz2 gst-plugins-bad-231fcedd6dce08f8313b95c389288d021c257fb2.zip |
gst/rtpmanager/gstrtpsession.c: Use method to get the internal SSRC.
Original commit message from CVS:
* gst/rtpmanager/gstrtpsession.c:
(gst_rtp_session_getcaps_send_rtp):
Use method to get the internal SSRC.
* gst/rtpmanager/rtpsession.c: (rtp_session_class_init),
(rtp_session_set_property), (rtp_session_get_property):
Add property to congiure the internal SSRC of the session.
Fixes #565910.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 6 | ||||
-rw-r--r-- | gst/rtpmanager/rtpsession.c | 12 |
3 files changed, 33 insertions, 2 deletions
@@ -1,5 +1,22 @@ 2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk> + * gst/rtpmanager/gstrtpsession.c: + (gst_rtp_session_getcaps_send_rtp): + Use method to get the internal SSRC. + + * gst/rtpmanager/rtpsession.c: (rtp_session_class_init), + (rtp_session_set_property), (rtp_session_get_property): + Add property to congiure the internal SSRC of the session. + Fixes #565910. + +2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk> + + * gst/rtpmanager/rtpsession.c: (rtp_session_class_init), + (rtp_session_set_property), (rtp_session_get_property): + Add property to change the internal SSRC of the session. + +2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk> + * gst/rtpmanager/rtpsession.c: (rtp_session_set_internal_ssrc): Only change the SSRC of the session and reset the internal source when the SSRC actually changed. See #565910. diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 1c223183..e9af8977 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1653,15 +1653,17 @@ gst_rtp_session_getcaps_send_rtp (GstPad * pad) GstRtpSessionPrivate *priv; GstCaps *result; GstStructure *s1, *s2; + guint ssrc; rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad)); priv = rtpsession->priv; + ssrc = rtp_session_get_internal_ssrc (priv->session); + /* we can basically accept anything but we prefer to receive packets with our * internal SSRC so that we don't have to patch it. Create a structure with * the SSRC and another one without. */ - s1 = gst_structure_new ("application/x-rtp", - "ssrc", G_TYPE_UINT, priv->session->source->ssrc, NULL); + s1 = gst_structure_new ("application/x-rtp", "ssrc", G_TYPE_UINT, ssrc, NULL); s2 = gst_structure_new ("application/x-rtp", NULL); result = gst_caps_new_full (s1, s2, NULL); diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index b2d8449f..1b7f3a40 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -63,6 +63,7 @@ enum enum { PROP_0, + PROP_INTERNAL_SSRC, PROP_INTERNAL_SOURCE, PROP_BANDWIDTH, PROP_RTCP_FRACTION, @@ -244,6 +245,11 @@ rtp_session_class_init (RTPSessionClass * klass) NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, RTP_TYPE_SOURCE); + g_object_class_install_property (gobject_class, PROP_INTERNAL_SSRC, + g_param_spec_uint ("internal-ssrc", "Internal SSRC", + "The internal SSRC used for the session", + 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_INTERNAL_SOURCE, g_param_spec_object ("internal-source", "Internal Source", "The internal source element of the session", @@ -451,6 +457,9 @@ rtp_session_set_property (GObject * object, guint prop_id, sess = RTP_SESSION (object); switch (prop_id) { + case PROP_INTERNAL_SSRC: + rtp_session_set_internal_ssrc (sess, g_value_get_uint (value)); + break; case PROP_BANDWIDTH: rtp_session_set_bandwidth (sess, g_value_get_double (value)); break; @@ -503,6 +512,9 @@ rtp_session_get_property (GObject * object, guint prop_id, sess = RTP_SESSION (object); switch (prop_id) { + case PROP_INTERNAL_SSRC: + g_value_set_uint (value, rtp_session_get_internal_ssrc (sess)); + break; case PROP_INTERNAL_SOURCE: g_value_take_object (value, rtp_session_get_internal_source (sess)); break; |