Hi, On Thursday 10 September 2009 09:46:59 Bo Liu wrote: > Hi, All > > There is a problem when I use my webcam. > First, every thing is ok. I use gstreamer play video from /dev/video0 > Then, I unpluged my webcam(but didn't stop gstreamer). > > Replug camera again. dev node is changed to video1. And Gstreamser > can't play video any more,because it's still use video0. > > I think because gstreamer is using the /dev/video0, so when unplug > the device,udev can't rmmod dev node /dev/video0. And it must make a new > node /dev/video1 after replug.
It's actually not a matter of udev being unable to rmmod /dev/video0, but rather udev not noticing that the device goes away. V4L2 unregisters the video device only when the last reference to the device is released. That means that udev will only notice that the device goes away when gstreamer closes /dev/video0. > So, My question is is there any way to rm dev node /dev/video0 when > unplug the webcam while gstreamer(or maybe mplayer..) still running, It should be possible to do so with udev rules, but I'm familiar enough with them to help you. > and after replug webcam gstreamer can continue to work. It depends what you mean by "can continue to work". gstreamer will not magically resume video streaming on the new device. At best you will have to manually stop and restart the video stream. -- Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
