summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2007-01-11 12:28:56 +0000
committerTim-Philipp Müller <tim@centricular.net>2007-01-11 12:28:56 +0000
commitd7294ac13e78a6d14fe281709c30136b47354097 (patch)
tree221cb67c2aeb8db63e25a66e6a68c40a9183005d /gst
parent5dbec4ecf422943e0a9b7dadb16106b29e0753ca (diff)
downloadgst-plugins-bad-d7294ac13e78a6d14fe281709c30136b47354097.tar.gz
gst-plugins-bad-d7294ac13e78a6d14fe281709c30136b47354097.tar.bz2
gst-plugins-bad-d7294ac13e78a6d14fe281709c30136b47354097.zip
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.
Diffstat (limited to 'gst')
-rw-r--r--gst/mve/gstmvedemux.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gst/mve/gstmvedemux.c b/gst/mve/gstmvedemux.c
index 767e730d..01ccfe5b 100644
--- a/gst/mve/gstmvedemux.c
+++ b/gst/mve/gstmvedemux.c
@@ -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));