[gst-devel] using the tuner interface from python
thiagoss
thiagossantos at gmail.com
Thu Oct 1 02:57:38 CEST 2009
On Wed, Sep 30, 2009 at 2:52 PM, thiagoss <thiagossantos at gmail.com> wrote:
>
>
> On Wed, Sep 30, 2009 at 1:17 PM, Dick Marinus <dick at mrns.nl> wrote:
>
>> Hi all,
>>
>> At April 30, 2006 Fredrik posted a message about using the tuner
>> interface from Python and I'm experiencing the same issue:
>>
>> $ python
>> >>> import gst
>> >>> source = gst.element_factory_make("v4l2src",name="Pinnacle PCTV
>> USB2.0")
>> >>> print source.get_channel()
>>
>> (.:13363): GStreamer-CRITICAL **: gst_implements_interface_cast:
>> assertion `gst_element_implements_interface (GST_ELEMENT (from),
>> iface_type)' failed
>>
>> ** (.:13363): CRITICAL **: gst_tuner_get_channel: assertion
>> `GST_IS_TUNER (tuner)' failed
>>
>> I've tried to set the pipeline queue to STATE_PLAYING but I still have
>> the same error.
>>
>> I guess something is broken at the Python bindings. Could someone please
>> help me?
>>
>
> I had this same problem this week on a toy project and thaytan sent me a
> python script that uses GstTuner interface from v4l2src, but I still haven't
> looked deeply at it. I'll do it tonight and I'll update here with my
> findings.
>
> One thing I noticed, though, is that GstV4l2Src is using a subclass of
> GstTunerChannel that is not mapped/exported in the python bindings (but I
> don't know much about bindings and thaytan said it worked for him, so I
> believe I'm doing something wrong in my code).
>
>
Found what was wrong:
1) It will not work on NULL state, I don't know if works on READY, tested
only with it PLAYING and I'm assuming it also works for PAUSED
2) You're not supposed to create your own gst.TunerChannel objects and set
them, you have to do src.list_channels() and pick one to set.
Works perfectly here. Maybe the docs could be updated to clarify this.
>
>
>>
>> I'm using:
>> gst-python=0.10.16
>> gstreamer=0.10.24
>> gst-plugins-good=0.10.16
>> gst-plugins-base=0.10.24
>>
>> Thanks in advance,
>> Dick
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register
>> now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>
>
>
> --
> Thiago Sousa Santos
>
--
Thiago Sousa Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090930/fb617669/attachment.htm>
More information about the gstreamer-devel
mailing list