mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
subparse: Implement POSITION query
This commit is contained in:
parent
7e119e46e5
commit
060f9c07e5
1 changed files with 12 additions and 0 deletions
|
@ -229,6 +229,18 @@ gst_sub_parse_src_query (GstPad * pad, GstQuery * query)
|
|||
GST_DEBUG ("Handling %s query", GST_QUERY_TYPE_NAME (query));
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:{
|
||||
GstFormat fmt;
|
||||
|
||||
gst_query_parse_position (query, &fmt, NULL);
|
||||
if (fmt != GST_FORMAT_TIME) {
|
||||
ret = gst_pad_peer_query (self->sinkpad, query);
|
||||
} else {
|
||||
ret = TRUE;
|
||||
gst_query_set_position (query, GST_FORMAT_TIME,
|
||||
self->segment.last_stop);
|
||||
}
|
||||
}
|
||||
case GST_QUERY_SEEKING:
|
||||
{
|
||||
GstFormat fmt;
|
||||
|
|
Loading…
Reference in a new issue