diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-02-25 15:07:43 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-02-25 15:07:43 +0000 |
commit | 82a954438529a23e0d8a995196f7cb4036c99341 (patch) | |
tree | d59b6cbd1d3de321a2ad8100229aeacd50c8f0e2 /plugins | |
parent | c5b335a0e21410021e9a6fc51ecacfd4ba256aab (diff) |
filesink: implement SEEKING query
We may or may not do seeking, depends on the
output file/device really, it doesn't have to
be a file after all.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstfilesink.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index 9356c0f69..543dbfe33 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -495,6 +495,16 @@ gst_file_sink_query (GstBaseSink * bsink, GstQuery * query) res = TRUE; break; + case GST_QUERY_SEEKING: + gst_query_parse_seeking (query, &format, NULL, NULL, NULL); + if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) { + gst_query_set_seeking (query, GST_FORMAT_BYTES, self->seekable, 0, -1); + } else { + gst_query_set_seeking (query, format, FALSE, 0, -1); + } + res = TRUE; + break; + default: res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query); break; |