video4linux2 device detection

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Feb 20 07:08:51 PST 2012


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



More information about the gstreamer-devel mailing list