wtay gst-plugins-bad: gst-plugins-bad/ gst-plugins-bad/gst/rtpmanager/
[email protected] Mon, 29 Dec 2008 07:49:52 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gst-plugins-bad
Changes by: wtay
Date: Mon Dec 29 2008 15:49:52 UTC
Log message:
* 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.
Modified files:
. : ChangeLog
gst/rtpmanager : gstrtpsession.c rtpsession.c
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3835&r2=1.3836
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/rtpmanager/gstrtpsession.c.diff?r1=1.54&r2=1.55
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/rtpmanager/rtpsession.c.diff?r1=1.41&r2=1.42
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v
retrieving revision 1.3835
retrieving revision 1.3836
diff -u -d -r1.3835 -r1.3836
--- ChangeLog 29 Dec 2008 15:21:56 -0000 1.3835
+++ ChangeLog 29 Dec 2008 15:49:35 -0000 1.3836
@@ -1,5 +1,22 @@
2008-12-29 Wim Taymans <[email protected]>
+ * 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 <[email protected]>
+ Add property to change the internal SSRC of the session.
* 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.
Index: gstrtpsession.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/rtpmanager/gstrtpsession.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- gstrtpsession.c 25 Nov 2008 15:12:06 -0000 1.54
+++ gstrtpsession.c 29 Dec 2008 15:49:37 -0000 1.55
@@ -1653,15 +1653,17 @@
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);
Index: rtpsession.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/rtpmanager/rtpsession.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- rtpsession.c 29 Dec 2008 15:21:58 -0000 1.41
+++ rtpsession.c 29 Dec 2008 15:49:37 -0000 1.42
@@ -63,6 +63,7 @@
enum
{
PROP_0,
+ PROP_INTERNAL_SSRC,
PROP_INTERNAL_SOURCE,
PROP_BANDWIDTH,
PROP_RTCP_FRACTION,
@@ -244,6 +245,11 @@
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 @@
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 @@
+ g_value_set_uint (value, rtp_session_get_internal_ssrc (sess));
case PROP_INTERNAL_SOURCE:
g_value_take_object (value, rtp_session_get_internal_source (sess));
------------------------------------------------------------------------------