decodebin2

Steffen.Roeber at hella.com Steffen.Roeber at hella.com
Fri Mar 9 00:34:44 PST 2012


Hi
I'm usng a pipeline that contains a filesrc, a decodebin, an appsink and 
some other elements. What I want to get is the duration of  the current 
element.
For this I'm using
GstQuery *frameDuration = gst_query_new_duration(GST_FORMAT_DEFAULT);
gst_element_query(reinterpret_cast<GstElement *>(m_pipeline), 
frameDuration);
sint64 temp = 0;
gst_query_parse_duration(frameDuration, 0, &temp);

I have two problems with this approach. First, this works only after I 
called
GstBuffer *buffer = gst_app_sink_pull_buffer(m_appSink);
which is very annoying.
And the second problem is that it does not work at all if I change the 
filename of the filesrc:
gst_element_set_state(reinterpret_cast<GstElement *>(m_pipeline), 
GST_STATE_NULL);
setProperty(reinterpret_cast<GObject *>(aviSrc), "location", filename);
...

The duration is always the same for each new filename.
What could I do?

Kind Regards


Hella Aglaia Mobile Vision GmbH
Steffen Roeber
Firmware & Tools
Treskowstr. 14, D-13089 Berlin
Amtsgericht Berlin-Charlottenburg HRB 66976 B
Geschäftsführer: Kay Talmi

Fon:  +49 30 200 04 29– 412
Fax:  +49 30 200 04 29– 109
Mail: Steffen.Roeber at hella.com
URL: www.aglaia-gmbh.de

URL: www.mobilevision.de

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe sowie 
Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit 
unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, 
insbesondere für den Fall der Schutzrechtsanmeldung.
This document has to be treated confidentially. Its contents are not to be 
passed on, duplicated, exploited or disclosed without our express 
permission. All rights reserved, especially the right to apply for 
protective rights.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120309/10bea0d0/attachment.html>


More information about the gstreamer-devel mailing list