Roberto, I think you can get/set the device index from udev (also the driver name) and pass it to the application through some environment variable ( http://www.reactivated.net/writing_udev_rules.html#env), anyway if you want to start a streaming server on the plugged device, you will always need the device name to open it, I'm I correct ?
Best regards, Paulo 2009/5/18 <[email protected]> > Paulo, > > thanks for the answer. I will try this approach. > > I'm not sure on one point however, I've quickly checked v4l2_capability > struct and some sample code. It looks like i need to know the device name > (e.g. /dev/video0). If this is correct how do I know that /dev/video0 is > the device that was just plugged? > > Bye > R. > > ----- "Paulo Assis" <[email protected]> ha scritto: > > > Roberto, > > You can use udev to start a small application and use v4l2_capability > > struct > > to determine the device driver, if it is uvcvideo then it's a uvc > > device > > (just check libwebcam, it uses the same aproach). > > > > Best regards, > > Paulo > > > > 2009/5/18 <[email protected]> > > > > > Hi, > > > > > > i'm trying to write an hotplug event for an uvc device. Basically i > > need > > > to start a streaming server (mjpg-streamet) when an uvc device is > > plugged. > > > > > > So far the only way i could figure it out was to have a list of > > VID:PID > > > anche check if the $PRODUCT variable is in that list. This is ok, > > but since > > > I'm using this software with OpenWRT on an embedded platform i would > > like > > > to avoid using this device list file. > > > > > > Is there a way to understand that an uvc device has been plugged > > from with > > > an hotplug event? > > > > > > If there is no way, where can I find an always updated list of > > supported > > > devices. I know about the one in the home page but i was wondering > > if there > > > is a similar list in the official distribution. > > > > > > Thanks. > > > > > > -- > > > -------------------------------------------------------- > > > Roberto Riggio, PhD > > > CREATE-NET, Pervasive > > > Researcher > > > Via alla Cascata 56/D - 38100 Povo Trento (Italy) > > > e-mail: [email protected] > > > Tel: (+39) 0461 408400 - interno/extension 708 > > > Fax: (+39) 0461 421157 > > > http://www.create-net.org/ > > > -------------------------------------------------------- > > > > > > Le informazioni contenute in questo messaggio email e negli allegati > > sono > > > strettamente riservate. Il loro utilizzo e' consentito > > esclusivamente al > > > destinatario del messaggio, per le finalita' indicate nello stesso. > > > > > > The information transmitted is intended only for the person/entity > > whom it > > > is > > > addressed to, and may contain confidential material. Any review, > > > retransmission, > > > dissemination or other use of this information by persons/entities > > other > > > than > > > the intended recipient is prohibited as per Italian Law 196/2003. If > > you > > > received this in error, contact the sender and delete it from any > > pc. > > > _______________________________________________ > > > Linux-uvc-devel mailing list > > > [email protected] > > > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel > > > > > > -- > -------------------------------------------------------- > Roberto Riggio, PhD > CREATE-NET, Pervasive > Researcher > Via alla Cascata 56/D - 38100 Povo Trento (Italy) > e-mail: [email protected] > Tel: (+39) 0461 408400 - interno/extension 708 > Fax: (+39) 0461 421157 > http://www.create-net.org/ > -------------------------------------------------------- > > Le informazioni contenute in questo messaggio email e negli allegati sono > strettamente riservate. Il loro utilizzo e' consentito esclusivamente al > destinatario del messaggio, per le finalita' indicate nello stesso. > > The information transmitted is intended only for the person/entity whom it > is > addressed to, and may contain confidential material. Any review, > retransmission, > dissemination or other use of this information by persons/entities other > than > the intended recipient is prohibited as per Italian Law 196/2003. If you > received this in error, contact the sender and delete it from any pc. >
_______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
