diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-20 16:52:19 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-20 16:52:19 +0200 |
commit | bb03d8ff18779f9cb9ebcb598373c101aaa239f7 (patch) | |
tree | ebc6d955002293d2394a6e6f2d2fc7b295b9df22 | |
parent | 9d9d08622b49306b9c64fe76d200e6533c0c3106 (diff) |
matroskademux: Implement SEEKING query
-rw-r--r-- | gst/matroska/matroska-demux.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index b1dfc441..6afe2fd1 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; |