X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libs%2Fgst%2Fbase%2Fgstbasesink.c;h=4368c1a34c4627595ea5a2a98ecd281dd329be94;hb=5bf13cdd5314bc3c6c81bd620e712acdcab14eb2;hp=5738d63e8af28f921dc1b7d7aa8c9fa3de6d20d5;hpb=b4d93abb2475ab210b3eccc2ebf71f4b9c650e71;p=platform%2Fupstream%2Fgstreamer.git diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 5738d63..4368c1a 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -1201,28 +1201,30 @@ gst_base_sink_query_latency (GstBaseSink * sink, gboolean * live, * values to create the complete latency. */ min = us_min; max = us_max; + + if (l) { + if (max == -1 || min + processing_deadline <= max) + min += processing_deadline; + else { + GST_ELEMENT_WARNING (sink, CORE, CLOCK, + (_("Pipeline construction is invalid, please add queues.")), + ("Not enough buffering available for " + " the processing deadline of %" GST_TIME_FORMAT + ", add enough queues to buffer %" GST_TIME_FORMAT + " additional data. Shortening processing latency to %" + GST_TIME_FORMAT ".", + GST_TIME_ARGS (processing_deadline), + GST_TIME_ARGS (min + processing_deadline - max), + GST_TIME_ARGS (max - min))); + min = max; + } + } } if (l) { /* we need to add the render delay if we are live */ min += render_delay; if (max != -1) max += render_delay; - - if (max == -1 || min + processing_deadline <= max) - min += processing_deadline; - else { - GST_ELEMENT_WARNING (sink, CORE, CLOCK, - (_("Pipeline construction is invalid, please add queues.")), - ("Not enough buffering available for " - " the processing deadline of %" GST_TIME_FORMAT - ", add enough queues to buffer %" GST_TIME_FORMAT - " additional data. Shortening processing latency to %" - GST_TIME_FORMAT ".", - GST_TIME_ARGS (processing_deadline), - GST_TIME_ARGS (min + processing_deadline - max), - GST_TIME_ARGS (max - min))); - min = max; - } } } gst_query_unref (query); @@ -2284,11 +2286,8 @@ gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time, time += base_time; /* Re-use existing clockid if available */ - /* FIXME: Casting to GstClockEntry only works because the types - * are the same */ if (G_LIKELY (sink->priv->cached_clock_id != NULL - && GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink-> - priv->cached_clock_id) == clock)) { + && gst_clock_id_uses_clock (sink->priv->cached_clock_id, clock))) { if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id, time)) { gst_clock_id_unref (sink->priv->cached_clock_id);