[gst-devel] GStreamer and audio and video bins
Oscar Östlund
oscar.ostlund at gmail.com
Mon Nov 24 00:15:09 CET 2008
Hi
I am pretty new on GStreamer. I am trying to setup an appliaction that
uses this cool library.
I have a problem. This is the following setup I use:
pipeline:
- filersrc
- decodebin
- videodin (type: bin)
* ffmpegcolorspace
* autovideosink
- audiobin (type: bin)
* audioconverter
* autoaudiosink
So I create the audiobin et videobin first, and add them to the
pipeline. Then create the filesrc and the decodebin. A callback is
called on new-decoded-pad. This one links the audiobin's and the video
bin's ghost pads to the decoder if appliacable. Then I set the state
to playing and start the main loop.
If the file is Ogg/Vorbis, then it doesn't work. If I create the
videobin but I don't add the videobin to the pipeline, it works fine.
If on the other hand I create the videobin and then add it (even if it
doesn't get linked), then everything works fine until I start the main
loop. Then it just waits and doesn't play the music. It just open the
viedo window and runs the mainloop but doesn't play anything. On the
other hand, if the file is Ogg/Theora. Then everything works
perfectly, in both situations.
Now I have a second problem. If I don't create the videobin, things
work fine... as long as I add the audiobin to the pipeline not in the
new-decoded-pad callback. My thought was that I wanted to add the
video and audiobin to the pipeline only if needed. Apparently, I can't
add them in the callback. Is that due to the fact that the callback is
called in another thread (if it is) ??
Do you have any idea ?
Thank you for your help.
Oscar
PS I am running GStreamer on MacOSX.
PSS:
In the normal case, the bus gets a GST_MESSAGE_TAG, then a
GST_MESSAGE_ASYNC_DONE and finally GST_MESSAGE_NEW_CLOCK
When I add the videobin to the pipeline, the bus receives the
GST_MESSAGE_TAG but then nothing, just waits...
More information about the gstreamer-devel
mailing list