From: Wim Taymans Date: Thu, 20 Nov 2008 14:23:05 +0000 (+0000) Subject: libs/gst/base/gstbasesink.c: Changing the render delay changes the latency and so... X-Git-Tag: GIT_CONVERSION~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94752eaefd786a16baad22225e5dc93acab74d47;p=platform%2Fupstream%2Fgstreamer.git libs/gst/base/gstbasesink.c: Changing the render delay changes the latency and so we must post a latency message. Original commit message from CVS: * libs/gst/base/gstbasesink.c: (gst_base_sink_set_render_delay): Changing the render delay changes the latency and so we must post a latency message. --- diff --git a/ChangeLog b/ChangeLog index 9dac74f..dff4966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-11-20 Wim Taymans + * libs/gst/base/gstbasesink.c: (gst_base_sink_set_render_delay): + Changing the render delay changes the latency and so we must post a + latency message. + +2008-11-20 Wim Taymans + * gst/gstquery.c: * gst/gstquery.h: Add GstQueryType for custom queries instead of having to use the diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index f77c46c..7df01c5 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1025,13 +1025,22 @@ gst_base_sink_query_latency (GstBaseSink * sink, gboolean * live, void gst_base_sink_set_render_delay (GstBaseSink * sink, GstClockTime delay) { + GstClockTime old_render_delay; + g_return_if_fail (GST_IS_BASE_SINK (sink)); GST_OBJECT_LOCK (sink); + old_render_delay = sink->priv->render_delay; sink->priv->render_delay = delay; GST_LOG_OBJECT (sink, "set render delay to %" GST_TIME_FORMAT, GST_TIME_ARGS (delay)); GST_OBJECT_UNLOCK (sink); + + if (delay != old_render_delay) { + GST_DEBUG_OBJECT (sink, "posting latency changed"); + gst_element_post_message (GST_ELEMENT_CAST (sink), + gst_message_new_latency (GST_OBJECT_CAST (sink))); + } } /**