Commit 872f40d7 authored by Philippe Normand's avatar Philippe Normand 🥑 Committed by Sebastian Dröge

appsrc: duration query support based on the size property

https://bugzilla.gnome.org/show_bug.cgi?id=759126
parent 8b49a3f8
......@@ -926,6 +926,18 @@ gst_app_src_query (GstBaseSrc * src, GstQuery * query)
res = TRUE;
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:
res = GST_BASE_SRC_CLASS (parent_class)->query (src, query);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment