[gst-devel] multiple pads linking in a element

Miquel Àngel Farré miquel.farre at gmail.com
Tue Aug 4 08:21:58 CEST 2009


Hi,

You can get the pads using gst_element_get_pad() and after link pads using
gst_pad_link():

GstElement *plugin_1  = gst_element_factory_make("plugin1", myplugin1);
GstElement *plugin_2  = gst_element_factory_make("plugin2", myplugin2);

GstPad *plg1_src1 = gst_element_get_pad(plugin_1,"src_1"); //src1 from
plugin1 ...
GstPad *plg1_src2 = gst_element_get_pad(plugin_1,"src_2");
GstPad *plg2_sink1 = gst_element_get_pad(plugin_2,"sink_1");
GstPad *plg2_sink2 = gst_element_get_pad(plugin_2,"sink_2");

gst_pad_link(plg1_src1,plg2_sink1);
gst_pad_link(plg1_src2,plg2_sink2);

2009/8/4 rmkart <nathankarthik at gmail.com>

>
> Hi,
> I have created 2 element (plugin1, plugin2),  that has two sink pads and
> two
> source pads.
>  SRC: 'src_1'
>    Implementation:
>    Pad Template: 'src'
>  SINK: 'sink_1'
>    Implementation:
>      Has chainfunc(): gst_pullreader_rtcp_chain
>    Pad Template: 'sink'
>  SRC: 'src_2'
>    Implementation:
>    Pad Template: 'src'
>  SINK: 'sink_2'
>    Implementation:
>      Has chainfunc(): gst_pullreader_rtp_chain
>    Pad Template: 'sink'
>
> When I create my pipeline I will create by
> gst_element_factory_make(plugin1);
> gst_element_factory_make(plugin2);
> gst_element_link(plugin1,plugin2);
>
> When I link the src_1 pad of plugin1 should get linked to sink_1 of
> plugin2,
> similarly for src_2 of plugin1 to sink_2 of plugin2.
> How to do this in gstreamer, any ideas or pointers will be appreciated.
>
> Thanks,
> Karthik
> --
> View this message in context:
> http://www.nabble.com/multiple-pads-linking-in-a-element-tp24802476p24802476.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090804/3b1aa14c/attachment.htm>


More information about the gstreamer-devel mailing list