[gst-devel] About using the tuner interface in python

Edgard Lima edgard.lima at indt.org.br
Mon May 1 09:39:02 CEST 2006


Also,

in the bug

http://bugzilla.gnome.org/show_bug.cgi?id=338818

donwload the attached file

http://bugzilla.gnome.org/attachment.cgi?id=63735

try it and look inside,
I hope it help you

BR,
Edgard Lima - alima
edgard.lima at indt.org.br



ext Tim Müller wrote:

>On Sun, 2006-04-30 at 23:27 +0200, Fredrik Persson wrote:
>
>Hi,
>
>  
>
>>If programming in c, it seems that I can get a cast from source element to 
>>tuner like this: 
>>
>>tuner = GST_TUNER (video_source);
>>
>>This seems to be needed in order to use the list_channels, get_channel and 
>>set_channel methods that selects inputs (composite, S-video and so on) on 
>>capture cards.
>>
>>Does anyone know what the equivalent would be in python? At first I thought 
>>that these methods could be used on a v4l2src element like so:
>>
>>source = gst.element_factory_make("v4l2src",name="Pinnacle PCTV USB2.0")
>>print source.get_channel()
>>
>>This does not work. I get the following error message when running that:
>>
>>(mypythontest.py:21507): GStreamer-CRITICAL **: gst_implements_interface_cast: 
>>assertion `gst_element_implements_interface (GST_ELEMENT (from), iface_type)' 
>>failed
>>    
>>
>
>Some interfaces in GStreamer are wrapped via the GstImplementsInterface,
>the reasoning being (I think) that one might only be able to know
>whether a certain device supports a certain interface once the device
>has been opened (meaning: the element is in READY state or higher).
>
>So with things like GstMixer or GstTuner the cast will fail if the
>element is in NULL state.
>
>Try setting it to READY state before doing the source.get_channel().
>
>(Of course there's always the possibility that the interface stuff isn't
>implemented properly in some element or something broke in the course of
>porting it to 0.10).
>
>Cheers
> -Tim
>
>
>
>
>-------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>gstreamer-devel mailing list
>gstreamer-devel at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>  
>





More information about the gstreamer-devel mailing list