mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/mve/gstmvedemux.c: Support SEEKING query (bad news now delivered properly!); add event function to source pads to...
Original commit message from CVS: * gst/mve/gstmvedemux.c: (gst_mve_demux_get_src_query_types), (gst_mve_demux_handle_src_query), (gst_mve_demux_handle_src_event), (gst_mve_add_stream): Support SEEKING query (bad news now delivered properly!); add event function to source pads to make sure seeks aren't propagated upstream, even if they aren't handled.
This commit is contained in:
parent
5dbec4ecf4
commit
d7294ac13e
2 changed files with 46 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
2007-01-11 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/mve/gstmvedemux.c: (gst_mve_demux_get_src_query_types),
|
||||
(gst_mve_demux_handle_src_query), (gst_mve_demux_handle_src_event),
|
||||
(gst_mve_add_stream):
|
||||
Support SEEKING query (bad news now delivered properly!); add event
|
||||
function to source pads to make sure seeks aren't propagated
|
||||
upstream, even if they aren't handled.
|
||||
|
||||
2007-01-11 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Patch by: Jens Granseuer <jensgr at gmx net>
|
||||
|
|
|
@ -147,6 +147,7 @@ gst_mve_demux_get_src_query_types (GstPad * pad)
|
|||
{
|
||||
static const GstQueryType src_types[] = {
|
||||
GST_QUERY_POSITION,
|
||||
GST_QUERY_SEEKING,
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -177,6 +178,21 @@ gst_mve_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_SEEKING:{
|
||||
GstFormat format;
|
||||
|
||||
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
||||
if (format == GST_FORMAT_TIME) {
|
||||
gst_query_set_seeking (query, GST_FORMAT_TIME, FALSE, 0, -1);
|
||||
res = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_DURATION:{
|
||||
/* FIXME: really should implement/estimate this somehow */
|
||||
res = FALSE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
break;
|
||||
|
@ -185,6 +201,25 @@ gst_mve_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
|||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_mve_demux_handle_src_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:
|
||||
GST_DEBUG ("seeking not supported");
|
||||
res = FALSE;
|
||||
break;
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_mve_demux_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
|
@ -230,6 +265,8 @@ gst_mve_add_stream (GstMveDemux * mve, GstMveDemuxStream * stream,
|
|||
GST_DEBUG_FUNCPTR (gst_mve_demux_get_src_query_types));
|
||||
gst_pad_set_query_function (stream->pad,
|
||||
GST_DEBUG_FUNCPTR (gst_mve_demux_handle_src_query));
|
||||
gst_pad_set_event_function (stream->pad,
|
||||
GST_DEBUG_FUNCPTR (gst_mve_demux_handle_src_event));
|
||||
gst_pad_set_element_private (stream->pad, stream);
|
||||
|
||||
GST_DEBUG_OBJECT (mve, "adding pad %s", GST_PAD_NAME (stream->pad));
|
||||
|
|
Loading…
Reference in a new issue