projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b49a3f
)
appsrc: duration query support based on the size property
author
Philippe Normand
<philn@igalia.com>
Tue, 8 Dec 2015 10:15:34 +0000
(11:15 +0100)
committer
Sebastian Dröge
<sebastian@centricular.com>
Tue, 8 Dec 2015 10:42:46 +0000
(12:42 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=759126
gst-libs/gst/app/gstappsrc.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/app/gstappsrc.c
b/gst-libs/gst/app/gstappsrc.c
index
e540cf4
..
ae7ce10
100644
(file)
--- a/
gst-libs/gst/app/gstappsrc.c
+++ b/
gst-libs/gst/app/gstappsrc.c
@@
-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;