Q: HowTo: Detect video/audio DecodeBin's before linking Pads?
izzysoft2000 at gmail.com
Tue Mar 20 21:33:28 PDT 2012
1st time poster. 2 months since i started. :)
GStreamer looks awesome. ;)
Now... down to the nitty gritty.
- I want to automatically detect if a DecodeBin has Audio and Video.
- If just Audio, then Tee DecodeBin's Src0 pad to create a VideoSink for
GOOM (or other Visualizers)
and Tee DecodeBin's Src0 pad for AlsaSink (or whatever)
- g_signal_connect( decoder, "new-decoded-pad", G_CALLBACK(
on_decoder_pad_added ), NULL );
- on_decoder_pad_added(...) is only aware of One pad at a time. is there
no way to check for audio/video?
- I removed "new-decoded-pad", and instead added this (src follows)
after gst_element_link( src, decoder );
res = gst_element_set_state( pipeline, GST_STATE_PAUSED );
if (res == GST_STATE_CHANGE_FAILURE)
g_print("Gstreamer ERROR: could not pause\n");
res = gst_element_get_state(pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
if (res != GST_STATE_CHANGE_SUCCESS)
g_print("Gstreamer ERROR: could not complete pause\n");
it = gst_element_iterate_src_pads( decoder );
while (gst_iterator_next (it, &data) == GST_ITERATOR_OK)
GstPad *pad = GST_PAD (data);
// added a Bin and Queues etc..., works fine when done
in "new-decoded-pad" method.
Any help is Greatly Appreciated, Any! I accepet PayPay! :D No wait...
They deleted that account. :(
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel