-
Laurent Aimar authored
-> 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,
dc0a3896