multiple pads linking in a element

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple pads linking in a element

rmkart
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
Reply | Threaded
Open this post in threaded view
|

Re: multiple pads linking in a element

Miquel Àngel Farré
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 <[hidden email]>

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: multiple pads linking in a element

rmkart
Hi,
Thanks for the info.
I could make my pipeline with this.

RK
Miquel Àngel Farré wrote
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@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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel