diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-23 09:52:36 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-23 09:53:29 +0200 |
commit | d8b285d7fde00119654f099a465a41221a19c671 (patch) | |
tree | a85fd85d043ce8ed99ed23b9622ae7692d674478 /gst | |
parent | e8c8725efecd06b4adf7dc812c02481c837c5abc (diff) | |
download | gst-plugins-bad-d8b285d7fde00119654f099a465a41221a19c671.tar.gz gst-plugins-bad-d8b285d7fde00119654f099a465a41221a19c671.tar.bz2 gst-plugins-bad-d8b285d7fde00119654f099a465a41221a19c671.zip |
mpegdemux: Implement query type function for the src pads
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mpegdemux/gstmpegdemux.c | 16 | ||||
-rw-r--r-- | gst/mpegdemux/gstmpegtsdemux.c | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index 75d5960f..85e8325c 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -211,6 +211,7 @@ static void gst_flups_demux_loop (GstPad * pad); static gboolean gst_flups_demux_src_event (GstPad * pad, GstEvent * event); static gboolean gst_flups_demux_src_query (GstPad * pad, GstQuery * query); +static const GstQueryType *gst_flups_demux_src_query_type (GstPad * pad); static GstStateChangeReturn gst_flups_demux_change_state (GstElement * element, GstStateChange transition); @@ -454,6 +455,8 @@ gst_flups_demux_create_stream (GstFluPSDemux * demux, gint id, gint stream_type) GST_DEBUG_FUNCPTR (gst_flups_demux_src_event)); gst_pad_set_query_function (stream->pad, GST_DEBUG_FUNCPTR (gst_flups_demux_src_query)); + gst_pad_set_query_type_function (stream->pad, + GST_DEBUG_FUNCPTR (gst_flups_demux_src_query_type)); gst_pad_use_fixed_caps (stream->pad); gst_pad_set_caps (stream->pad, caps); gst_caps_unref (caps); @@ -1283,6 +1286,19 @@ gst_flups_demux_src_event (GstPad * pad, GstEvent * event) return res; } +static const GstQueryType * +gst_flups_demux_src_query_type (GstPad * pad) +{ + static const GstQueryType types[] = { + GST_QUERY_POSITION, + GST_QUERY_DURATION, + GST_QUERY_SEEKING, + 0 + }; + + return types; +} + static gboolean gst_flups_demux_src_query (GstPad * pad, GstQuery * query) { diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 8de7cc75..c5a160ec 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -212,6 +212,7 @@ static gboolean gst_mpegts_demux_sink_setcaps (GstPad * pad, GstCaps * caps); static GstClock *gst_mpegts_demux_provide_clock (GstElement * element); static gboolean gst_mpegts_demux_src_pad_query (GstPad * pad, GstQuery * query); +static const GstQueryType *gst_mpegts_demux_src_pad_query_type (GstPad * pad); static GstStateChangeReturn gst_mpegts_demux_change_state (GstElement * element, GstStateChange transition); @@ -713,6 +714,8 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id, gst_caps_unref (caps); gst_pad_set_query_function (stream->pad, GST_DEBUG_FUNCPTR (gst_mpegts_demux_src_pad_query)); + gst_pad_set_query_type_function (stream->pad, + GST_DEBUG_FUNCPTR (gst_mpegts_demux_src_pad_query_type)); gst_pad_set_event_function (stream->pad, GST_DEBUG_FUNCPTR (gst_mpegts_demux_src_event)); g_free (name); @@ -2701,6 +2704,19 @@ gst_mpegts_demux_provide_clock (GstElement * element) return NULL; } +static const GstQueryType * +gst_mpegts_demux_src_pad_query_type (GstPad * pad) +{ + static const GstQueryType types[] = { + GST_QUERY_LATENCY, + GST_QUERY_DURATION, + GST_QUERY_SEEKING, + 0 + }; + + return types; +} + static gboolean gst_mpegts_demux_src_pad_query (GstPad * pad, GstQuery * query) { |