[vlc-devel] CVS Commit (fenrir)
cvs at videolan.org
cvs at videolan.org
Thu Feb 12 18:52:48 CET 2004
Update of /cvs/videolan/vlc/modules/access/v4l
Modified Files:
v4l.c
Log Message:
* v4l: patch from Carsten Gottbehüt (gottbehuet at active-elements dot de)
-> Untested.
Original message:
Hi there,
I have done another small modification. If you remove a hot-pluggable video
device, like an usb web cam, during capturing, vlc floods the driver with
ioctls. This leads to Kernel Ooops in some drivers.
The modified v4l.c module does the following now:
"GrabVideo" returns "VLC_ETIMEOUT" if the question "Did we wait long enough"
can be answered with yes. If there is a real error in "GrabCapture" or
"GrabMJPEG", the code "VLC_EGENERIC" is returned. So the calling function
can distinguish between these two situations. "VLC_EGENERIC" was always
returned before.
The function "Read" uses this information to leave the while-loop in case of
an error, and it returns a "-1" to the calling function. "Read" calls
"msleep", as it was before, in case of a VLC_ETIMEOUT.
The brightness-control stuff described below is still in the code. Please
feel free to use, modify or ignore this file. A short feedback would be
nice.
Bye,
--
fenrir
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list