Antwort: Re: decodebin2
Steffen.Roeber at hella.com
Steffen.Roeber at hella.com
Fri Mar 9 05:01:05 PST 2012
Hi,
I tried the GstDiscoverer utility. For local files all is fine but files
from a network path cannot be discovered.
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.
Tim-Philipp Müller/
(
Gesendet von:
gstreamer-devel-bounces+steffen.roeber=hella.com at lists.freedesktop.org
09.03.2012 11:27
Bitte antworten an
Discussion of the development of and with GStreamer
<gstreamer-devel at lists.freedesktop.org>
An
gstreamer-devel at lists.freedesktop.org
Kopie
Thema
Re: decodebin2
On Fri, 2012-03-09 at 09:34 +0100, Steffen.Roeber at hella.com wrote:
> 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 should be available as soon as appsink (and all other
sinks) has queued a buffer internally and the pipeline is prerolled,
that is when you receive an ASYNC_DONE message on the bus (or a state
change message with new_state==PAUSED and message->src==pipeline).
There's no need to actually pull a buffer from appsink.
If you just want to read metadata, GstDiscoverer might also be of
interest.
As for changing filesrc - you should just set up a new filesrc +
decodebin2 (decodebin2 needs resetting as well) and remove the old
elements when no longer needed.
Cheers
-Tim
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120309/ea7bf483/attachment.html>
More information about the gstreamer-devel
mailing list