hi All,<div><br></div><div>1st time poster. 2 months since i started. :)</div><div>GStreamer looks awesome. ;)</div><div><br></div><div>Now... down to the nitty gritty.</div><div><br></div><div>Problem:</div><div> - I want to automatically detect if a DecodeBin has Audio and Video.</div>
<div> - If just Audio, then Tee DecodeBin's Src0 pad to create a VideoSink for GOOM (or other Visualizers)</div><div> and Tee DecodeBin's Src0 pad for AlsaSink (or whatever)</div><div><br></div><div>Tried:</div>
<div> - g_signal_connect( decoder, "new-decoded-pad", G_CALLBACK( on_decoder_pad_added ), NULL );</div><div> - on_decoder_pad_added(...) is only aware of One pad at a time. is there no way to check for audio/video?</div>
<div><br></div><div>Tried:</div><div> - I removed "new-decoded-pad", and instead added this (src follows) after gst_element_link( src, decoder );</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>res = gst_element_set_state( pipeline, GST_STATE_PAUSED );</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if (res == GST_STATE_CHANGE_FAILURE)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>g_print("Gstreamer ERROR: could not pause\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>gst_object_unref(GST_OBJECT (pipeline));</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>return FALSE;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>res = gst_element_get_state(pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (res != GST_STATE_CHANGE_SUCCESS)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>g_print("Gstreamer ERROR: could not complete pause\n");</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>gst_object_unref(GST_OBJECT (pipeline));</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>return FALSE;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div></div><div><br></div><div> it = gst_element_iterate_src_pads( decoder );</div>
<div><div> while (gst_iterator_next (it, &data) == GST_ITERATOR_OK)</div><div> {</div><div> GstPad *pad = GST_PAD (data);</div></div><div> ...</div><div> // added a Bin and Queues etc..., works fine when done in "new-decoded-pad" method.</div>
<div> }</div><div><br></div><div>Answer: ????</div><div><br></div><div>Any help is Greatly Appreciated, Any! I accepet PayPay! :D No wait... They deleted that account. :(</div><div>hehe</div><div><br></div><div>mucho thanks,</div>
<div>Izzy.</div>