When am I Sometimes?

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

When am I Sometimes?

Wes Miller
Administrator
is it possible to ask an element if it supplies a sometimes pad?


Goal is, of course, to be able to say:

     if ( gst_element_has_sometimes_sink_pads( GstElement *element ))
          then g_signal_connect( .... )

Thanks,

Wes
Reply | Threaded
Open this post in threaded view
|

Re: When am I Sometimes?

Thiago Sousa Santos-2


On Mon, Jul 12, 2010 at 5:11 PM, Wes Miller <[hidden email]> wrote:

is it possible to ask an element if it supplies a sometimes pad?

You can use GstElement's API to get the pad templates list and look over it.
 


Goal is, of course, to be able to say:

    if ( gst_element_has_sometimes_sink_pads( GstElement *element ))
         then g_signal_connect( .... )

Thanks,

Wes

--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/When-am-I-Sometimes-tp2286689p2286689.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: When am I Sometimes?

Wes Miller
Administrator
> You can use GstElement's API to get the pad templates list and look over it.

I think this is what you mean.  It requires knowing the element's element class.  


     gst_element_class_get_pad_template_list()

     GList*  gst_element_class_get_pad_template_list( GstElementClass *element_class );

     Retrieves a list of the pad templates associated with element_class. The list must
     not be modified by the calling code.


How do I get the element class?  

Thanks,

Wes
Reply | Threaded
Open this post in threaded view
|

Re: When am I Sometimes?

Sandeep Prakash
Hi Wes,

Wes Miller wrote
How do I get the element class?  
You can get the element class as follows:
element = gst_element_factory_make ("qtdemux", "demuxer"); // for example sake, has sometimes pad

GstElementClass *klass = G_OBJECT_GET_CLASS(element);

With this we can use
GList*  gst_element_class_get_pad_template_list( GstElementClass *element_class );
to get the pad template list, which will have sometimes pads also.

Regards,
Sandeep Prakash