Connecting plugin to multiqueue (sink pads) ??

Subodh Chiwate subodh.chiwate at ufomoviez.com
Fri Oct 31 00:51:50 PDT 2014


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);




--
Regards,
Subodh

-- **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. UFOMoviez India Ltd. has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. UFOMoviez India Ltd. reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the UFOMoviez India Ltd.'s e-mail system. ***************** End of Disclaimer *******************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141031/636a0a93/attachment.html>


More information about the gstreamer-devel mailing list