mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
appsrc: duration query support based on the size property
https://bugzilla.gnome.org/show_bug.cgi?id=759126
This commit is contained in:
parent
8b49a3f845
commit
872f40d7d9
1 changed files with 12 additions and 0 deletions
|
@ -926,6 +926,18 @@ gst_app_src_query (GstBaseSrc * src, GstQuery * query)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GST_QUERY_DURATION:
|
||||||
|
{
|
||||||
|
GstFormat format;
|
||||||
|
gst_query_parse_duration (query, &format, NULL);
|
||||||
|
if (format == GST_FORMAT_BYTES) {
|
||||||
|
gst_query_set_duration (query, format, priv->size);
|
||||||
|
res = TRUE;
|
||||||
|
} else {
|
||||||
|
res = FALSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
res = GST_BASE_SRC_CLASS (parent_class)->query (src, query);
|
res = GST_BASE_SRC_CLASS (parent_class)->query (src, query);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue