video4linux2 device detection

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

video4linux2 device detection

Erick Pérez Castellanos
Hi:

I'm using gstreamer to catch shot from my webcam, but I have to know
when there's a webcam connected to my pc, is there any way to know this
by asking GstElement taht video4linux provides ?

Is there any way other than asking udev ?

Thxs in advance.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: video4linux2 device detection

Tim-Philipp Müller-2
On Mon, 2012-02-20 at 09:55 -0500, Erick Pérez Castellanos wrote:

Hi,

> I'm using gstreamer to catch shot from my webcam, but I have to know
> when there's a webcam connected to my pc, is there any way to know this
> by asking GstElement taht video4linux provides ?
>
> Is there any way other than asking udev ?

You can use the (rather horrible) GstPropertyProbe interface for that,
on the "device" property. The source element may need to be set to READY
state for that to work.

Cheers
-Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: video4linux2 device detection

Erick Pérez Castellanos
In reply to this post by Erick Pérez Castellanos
On Mon, 2012-02-20 at 08:09 -0800,
[hidden email] wrote:
> You can use the (rather horrible) GstPropertyProbe interface for that,
> on the "device" property. The source element may need to be set to
> READY
> state for that to work.
>
> Cheers
> -Tim

Thxs Tim, I'll try that one, I tried to test those properties before but
I think I was missing the state of the pipeline to READY.
I'll try it.
Thxs

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: video4linux2 device detection

Erick Pérez Castellanos
In reply to this post by Erick Pérez Castellanos
> The source element may need to be set to  READY state for that to
> work.

It actually worked, thxs Tim.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel