#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);
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);
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)
{
packetizer = base->packetizer;
- if (G_UNLIKELY (base->queried_latency == FALSE)) {
- query_upstream_latency (base);
- }
-
if (klass->input_done)
gst_buffer_ref (buf);