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>
* configure.ac:
{
static const GstQueryType src_types[] = {
GST_QUERY_POSITION,
+ GST_QUERY_SEEKING,
0
};
}
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;
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)
{
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));