From: Marc Leeman Date: Thu, 26 May 2011 10:22:52 +0000 (+0200) Subject: rtpmp4vpay: Deprecated send-config property and replace by config-interval X-Git-Tag: 1.19.3~509^2~7136^2~519 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff1c05d8768ff4041890ccc1df2350a5611a97b4;p=platform%2Fupstream%2Fgstreamer.git rtpmp4vpay: Deprecated send-config property and replace by config-interval Fixes bug #622412. --- diff --git a/gst/rtp/gstrtpmp4vpay.c b/gst/rtp/gstrtpmp4vpay.c index 568bd83..e11fbfc 100644 --- a/gst/rtp/gstrtpmp4vpay.c +++ b/gst/rtp/gstrtpmp4vpay.c @@ -112,7 +112,8 @@ gst_rtp_mp4v_pay_class_init (GstRtpMP4VPayClass * klass) g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SEND_CONFIG, g_param_spec_boolean ("send-config", "Send Config", - "Send the config parameters in RTP packets as well", + "Send the config parameters in RTP packets as well(deprecated " + "see config-interval)", DEFAULT_SEND_CONFIG, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFFER_LIST, @@ -491,7 +492,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * basepayload, flush = gst_rtp_mp4v_pay_depay_data (rtpmp4vpay, data, size, &strip, &vopi); if (strip) { /* strip off config if requested */ - if (!rtpmp4vpay->send_config) { + if (!(rtpmp4vpay->config_interval > 0)) { GstBuffer *subbuf; GST_LOG_OBJECT (rtpmp4vpay, "stripping config at %d, size %d", strip, @@ -511,8 +512,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * basepayload, } /* there is a config request, see if we need to insert it */ - if (rtpmp4vpay->send_config && vopi && (rtpmp4vpay->config_interval > 0) && - rtpmp4vpay->config) { + if (vopi && (rtpmp4vpay->config_interval > 0) && rtpmp4vpay->config) { if (rtpmp4vpay->last_config != -1) { guint64 diff; @@ -629,6 +629,10 @@ gst_rtp_mp4v_pay_set_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_SEND_CONFIG: rtpmp4vpay->send_config = g_value_get_boolean (value); + /* send the configuration once every minute */ + if (rtpmp4vpay->send_config && !(rtpmp4vpay->config_interval > 0)) { + rtpmp4vpay->config_interval = 60; + } break; case ARG_BUFFER_LIST: rtpmp4vpay->buffer_list = g_value_get_boolean (value);