v4l2src GstTuner interface

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

v4l2src GstTuner interface

Julien Isorce
Hi,

I am trying to select physical input (S-Video, Composite, ...)

The following code :

------------
...
videodevicesrc = gst_element_factory_make("v4l2src", "videodevicesrc");

...
GstTuner *tuner = GST_TUNER (videodevicesrc);
...
------------

leads to:

(<unknown>:17146): GStreamer-CRITICAL **: gst_implements_interface_cast: assertion `gst_element_implements_interface (GST_ELEMENT (from), iface_type)' failed


I know that v4l2src implements this interface and
I got code example from http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&view=markup

The installed packages is gstreamer0.10-plugins-good_0.10.6-0ubuntu4_i386.deb

The following command lien works very fine : gst-launch-0.10 v4l2src ! xvimagesink

Where am I wrong ?

Sincerely

Julien



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: v4l2src GstTuner interface

Stefan Sauer
hi julien,

Julien Isorce schrieb:

> Hi,
>
> I am trying to select physical input (S-Video, Composite, ...)
>
> The following code :
>
> ------------
> ...
> videodevicesrc = gst_element_factory_make("v4l2src", "videodevicesrc");
> ...
> GstTuner *tuner = GST_TUNER (videodevicesrc);
> ...
> ------------
>
> leads to:
>
> (<unknown>:17146): GStreamer-CRITICAL **: gst_implements_interface_cast:
> assertion `gst_element_implements_interface (GST_ELEMENT (from),
> iface_type)' failed


You can only cast in PAUSED or PLAYING (not sure about READY). Basically the
devices has to be opened first, before the element knows that the underlying
hardware has support for tuner. The gst_implements_interface mechanism is
basically a hack to conditinally implement interfaces.

Stefan

>
>
> I know that v4l2src implements this interface and
> I got code example from
> http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&view=markup 
> <http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&view=markup>
>
> The installed packages is
> gstreamer0.10-plugins-good_0.10.6-0ubuntu4_i386.deb
>
> The following command lien works very fine : gst-launch-0.10 v4l2src !
> xvimagesink
>
> Where am I wrong ?
>
> Sincerely
>
> Julien
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: v4l2src GstTuner interface

Julien Isorce
Hi,

Thx a lot for the explanation. It resolved my problem, I can change the physical input (s-video, composite, ...) now.

Sincerely,

Julien

2008/4/13, Stefan Kost <[hidden email]>:
hi julien,

Julien Isorce schrieb:
Hi,

I am trying to select physical input (S-Video, Composite, ...)

The following code :

------------
...
videodevicesrc = gst_element_factory_make("v4l2src", "videodevicesrc");
...
GstTuner *tuner = GST_TUNER (videodevicesrc);
...
------------

leads to:

(<unknown>:17146): GStreamer-CRITICAL **: gst_implements_interface_cast: assertion `gst_element_implements_interface (GST_ELEMENT (from), iface_type)' failed


You can only cast in PAUSED or PLAYING (not sure about READY). Basically the devices has to be opened first, before the element knows that the underlying hardware has support for tuner. The gst_implements_interface mechanism is basically a hack to conditinally implement interfaces.

Stefan



I know that v4l2src implements this interface and
I got code example from <a href="http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&amp;view=markup" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&view=markup <<a href="http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&amp;view=markup" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/tests/icles/v4l2src-test.c?revision=1.1&view=markup>

The installed packages is gstreamer0.10-plugins-good_0.10.6-0ubuntu4_i386.deb

The following command lien works very fine : gst-launch-0.10 v4l2src ! xvimagesink

Where am I wrong ?

Sincerely

Julien


------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. <a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone


------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel