]> git.sesse.net Git - vlc/commit
* v4l: patch from Carsten Gottbeh�t (gottbehuet at active-elements dot de)
authorLaurent Aimar <fenrir@videolan.org>
Thu, 12 Feb 2004 17:52:48 +0000 (17:52 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 12 Feb 2004 17:52:48 +0000 (17:52 +0000)
commitdc0a38962937ff8a37eacf5672e4780556c11d3c
treed918bd13932c6404f0527d871227fba5d659318a
parentcd05b67f58eb0d3119018b4abd8432d1453a3cc2
 * 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,
modules/access/v4l/v4l.c