From: Håvard Graff Date: Mon, 26 May 2008 10:00:24 +0000 (+0000) Subject: gst/rtpmanager/gstrtpbin.c: Propagate the do-lost and latency properties to the jitte... X-Git-Tag: 1.19.3~507^2~20241 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff79f31297d201afe8e74c11f6e65fad26fbf12d;p=platform%2Fupstream%2Fgstreamer.git gst/rtpmanager/gstrtpbin.c: Propagate the do-lost and latency properties to the jitterbuffers when they are changed o... Original commit message from CVS: Patch by: Håvard Graff * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_propagate_property_to_jitterbuffer), (gst_rtp_bin_set_property): Propagate the do-lost and latency properties to the jitterbuffers when they are changed on rtpbin. --- diff --git a/ChangeLog b/ChangeLog index d1f76a9..6c7365c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2008-05-26 Wim Taymans + Patch by: HÃ¥vard Graff + + * gst/rtpmanager/gstrtpbin.c: + (gst_rtp_bin_propagate_property_to_jitterbuffer), + (gst_rtp_bin_set_property): + Propagate the do-lost and latency properties to the jitterbuffers when + they are changed on rtpbin. + +2008-05-26 Wim Taymans + * examples/switch/switcher.c: (switch_timer): * gst/replaygain/gstrgvolume.c: (gst_rg_volume_init): * gst/rtpmanager/gstrtpclient.c: (create_stream): diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index d7a2c4a..121e359 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -672,6 +672,27 @@ gst_rtp_bin_clear_pt_map (GstRtpBin * bin) GST_RTP_BIN_UNLOCK (bin); } +static void +gst_rtp_bin_propagate_property_to_jitterbuffer (GstRtpBin * bin, + const gchar * name, const GValue * value) +{ + GSList *sessions, *streams; + + GST_RTP_BIN_LOCK (bin); + for (sessions = bin->sessions; sessions; sessions = g_slist_next (sessions)) { + GstRtpBinSession *session = (GstRtpBinSession *) sessions->data; + + GST_RTP_SESSION_LOCK (session); + for (streams = session->streams; streams; streams = g_slist_next (streams)) { + GstRtpBinStream *stream = (GstRtpBinStream *) streams->data; + + g_object_set_property (G_OBJECT (stream->buffer), name, value); + } + GST_RTP_SESSION_UNLOCK (session); + } + GST_RTP_BIN_UNLOCK (bin); +} + /* get a client with the given SDES name. Must be called with RTP_BIN_LOCK */ static GstRtpBinClient * get_client (GstRtpBin * bin, guint8 len, guint8 * data, gboolean * created) @@ -1461,6 +1482,8 @@ gst_rtp_bin_set_property (GObject * object, guint prop_id, GST_RTP_BIN_LOCK (rtpbin); rtpbin->latency = g_value_get_uint (value); GST_RTP_BIN_UNLOCK (rtpbin); + /* propegate the property down to the jitterbuffer */ + gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "latency", value); break; case PROP_SDES_CNAME: gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_CNAME, @@ -1494,6 +1517,7 @@ gst_rtp_bin_set_property (GObject * object, guint prop_id, GST_RTP_BIN_LOCK (rtpbin); rtpbin->do_lost = g_value_get_boolean (value); GST_RTP_BIN_UNLOCK (rtpbin); + gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "do-lost", value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);