[gst-devel] decodebin vs playbin

thiagossantos at gmail.com thiagossantos at gmail.com
Tue Jun 1 05:40:50 CEST 2010


On Mon, May 31, 2010 at 11:53 PM, Rodney Dowdall <rdowdall at cranksoftware.com
> wrote:

>  Hello
>
> I am trying to play the audio and the video from a mp4 file.  If I run the
> following line:
>
> gst-launch -vvvvv --gst-debug-level=2 playbin uri=file:///
> <path_to_mp4_file>
>
> Then it plays the file's audio.  I'm not putting the video anywhere, so I
> can't see if it is playing or not, but I assume it is based on the debug
> output.
>
> If I do the following line:
>
> gst-launch -vvv --gst-debug-level=2 filesrc location=<path_to_mp4_file> !
> decodebin2 name=decoder decoder. ! audioconvert ! audioresample ! osssink
> decoder. ! ffmpegcolorspace ! xvimagesink
>
> It hangs at:
>
> Setting pipeline to PAUSED ..
> /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstTypeFindElement:typefind.GstPad:src:
> caps = audio/x-m4a
> Pipeline is PREROLLING ...
> <audio debug output snipped>
>

You need to put 'queue' after each decodebin2's branch to start a new thread
for them. The docs should have some more information about this:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-threads.html#section-threads-uses


>
> I need to open this file in C code, and grab access to the buffers.  I was
> planning on using appsink to do it, but any time I pass in a video sink to
> the pipeline, it just hangs, never playing the audio, or moving forward.  As
> I said, I need access to the video buffer, so either I need a way to grab it
> from the pipeline created from gst_parse_launch, or I was thinking that if I
> set up the pipeline myself, I could use a handoff signal on the last video
> sink, or mayber use the appsink methods.
>

FYI, you can set the video-sink property in playbin2 to your appsink and get
the buffers from there.


>
> I have a feeling that I am missing something simple, and was hoping someone
> could point that out.
>
> Thanks,
> Rodney
>
> --
>
> *Rodney Dowdall
> **Crank Software Inc.
> **Office*: 613-595-1999
> *Online*: www.cranksoftware.com
> *Check out*: Crank Software’s Blog <http://cranksoftware.com/blog/>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Thiago Sousa Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100601/45b6b9da/attachment.htm>


More information about the gstreamer-devel mailing list