Connecting plugin to multiqueue (sink pads) ??
Tim Müller
tim at centricular.com
Fri Oct 31 02:44:41 PDT 2014
On Fri, 2014-10-31 at 13:21 +0530, Subodh Chiwate wrote:
Hi,
multiqueue has 'request pads' as sink pads. When you request a new sink
pad, a matching source pad will pop up. It looks like you're not
requesting any sink pads?
Cheers
-Tim
> Hi,
> I want to connect two custom elements to a multiqueue, to replicate
> the following working pipeline.
>
> gst-launch-0.10 multiqueue name="mq" filesrc
> location="/mnt/Media/test.video" ! myplugin ! mq. mq. !
> legacyh264parse ! vpudec ! imxv4l2sink filesrc
> location="/mnt/Media/test.audio" ! myplugin ! mq. mq.! aacparse !
> beepdec ! alsasink
>
> I tried the following code but the signals are not triggered at all.
> Please suggest possible ways of decoding further.
> My plugin has static pads. Is there a way to connect static pads
> without having to register a callback?
>
> static void on_pad_added_mq (GstElement *element, GstPad *pad,
> gpointer data)
> {
> g_print(" Getting called !!! ");
> if(!g_strcmp0(gst_pad_get_name(pad),"src_0") || !
> g_strcmp0(gst_pad_get_name(pad),"src_1"))
> {
> g_print("Connecting the multiqueue to parsers. Sink
> Element: %s, SrcPad name : %s \n",
> GST_ELEMENT_NAME(data),gst_pad_get_name(pad));
>
> gst_pad_link(pad,gst_element_get_static_pad((GstElement
> *)data,"sink"));
> }
> }
>
> static void on_pad_added_vid_plug (GstElement *element, GstPad *pad,
> gpointer data)
> {
> g_print(" Getting called !!! ");
> if(!g_strcmp0(gst_pad_get_name(pad),"src"))
> {
> g_print("Connecting the pesdecrypter to multiqueue.
> Sink Element: %s, SrcPad name : %s \n",
> GST_ELEMENT_NAME(data),gst_pad_get_name(pad));
>
> gst_pad_link(pad,gst_element_get_static_pad((GstElement
> *)data,"sink_0"));
> }
> }
>
> static void on_pad_added_aud_plug (GstElement *element, GstPad *pad,
> gpointer data)
> {
> g_print(" Getting called !!! ");
> if(!g_strcmp0(gst_pad_get_name(pad),"src"))
> {
> g_print("Connecting the pesdecrypter to multiqueue.
> Sink Element: %s, SrcPad name : %s \n",
> GST_ELEMENT_NAME(data),gst_pad_get_name(pad));
>
> gst_pad_link(pad,gst_element_get_static_pad((GstElement
> *)data,"sink_1"));
> }
> }
>
> g_signal_connect(vid_plug,"pad-added",G_CALLBACK(on_pad_added_vid_plug),multiqueue);
> g_signal_connect(aud_plug,"pad-added",G_CALLBACK(on_pad_added_aud_plug),multiqueue);
> g_signal_connect(multiqueue,"pad-added",G_CALLBACK(on_pad_added_mq),vid_parse);
> g_signal_connect(multiqueue,"pad-added",G_CALLBACK(on_pad_added_mq),au_parse);
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list