From bb03d8ff18779f9cb9ebcb598373c101aaa239f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 20 Jul 2009 16:52:19 +0200 Subject: [PATCH] matroskademux: Implement SEEKING query --- gst/matroska/matroska-demux.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index b1dfc44188..6afe2fd142 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -1855,6 +1855,7 @@ gst_matroska_demux_get_src_query_types (GstPad * pad) static const GstQueryType query_types[] = { GST_QUERY_POSITION, GST_QUERY_DURATION, + GST_QUERY_SEEKING, 0 }; @@ -1926,6 +1927,21 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad, break; } + case GST_QUERY_SEEKING:{ + GstFormat fmt; + + res = TRUE; + gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); + + if (fmt != GST_FORMAT_TIME || !demux->index) { + gst_query_set_seeking (query, GST_FORMAT_TIME, FALSE, -1, -1); + } else { + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, + demux->duration); + } + + break; + } default: res = gst_pad_query_default (pad, query); break;