From b4219a3e63fd11190671ac63e9320237044e4882 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 17 Apr 2015 13:57:38 -0600 Subject: [PATCH] mpegtsbase: Remove unused latency query code The behavior changes based on the type of segment, not on the liveness of the source. --- gst/mpegtsdemux/mpegtsbase.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index 8671c1a..63e567c 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -41,9 +41,6 @@ #include "mpegtsbase.h" #include "gstmpegdesc.h" -/* latency in mseconds */ -#define TS_LATENCY 700 - #define RUNNING_STATUS_RUNNING 4 GST_DEBUG_CATEGORY_STATIC (mpegts_base_debug); @@ -200,9 +197,6 @@ mpegts_base_reset (MpegTSBase * base) base->seen_pat = FALSE; base->seek_offset = -1; - base->upstream_live = FALSE; - base->queried_latency = FALSE; - g_hash_table_foreach_remove (base->programs, (GHRFunc) remove_each_program, base); @@ -1089,22 +1083,6 @@ mpegts_base_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) return res; } -static void -query_upstream_latency (MpegTSBase * base) -{ - GstQuery *query; - - query = gst_query_new_latency (); - if (gst_pad_peer_query (base->sinkpad, query)) { - gst_query_parse_latency (query, &base->upstream_live, NULL, NULL); - GST_DEBUG_OBJECT (base, "Upstream is %s", - base->upstream_live ? "LIVE" : "NOT LIVE"); - } else - GST_WARNING_OBJECT (base, "Failed to query upstream latency"); - gst_query_unref (query); - base->queried_latency = TRUE; -} - static GstFlowReturn mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) { @@ -1120,10 +1098,6 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) packetizer = base->packetizer; - if (G_UNLIKELY (base->queried_latency == FALSE)) { - query_upstream_latency (base); - } - if (klass->input_done) gst_buffer_ref (buf); -- 2.7.4