mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-04 22:48:54 +00:00
mpegdemux: Implement query type function for the src pads
This commit is contained in:
parent
e8c8725efe
commit
d8b285d7fd
2 changed files with 32 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue