[PATCH] qcap: fix recent regression that limited Wine's v4l2 support to devices that read()

Zebediah Figura z.figura12 at gmail.com
Sat Apr 20 09:52:01 CDT 2019


On 4/20/19 8:15 AM, Damjan Jovanovic wrote:
> Recent changes to qcap/v4l.c resulted in the removal of mmap()
> for v4l2 devices, but read() is optional for device drivers and
> some don't support it. This isn't a major problem with the
> presense of libv4l2 though, as it can emulate read() on top of
> mmap(). However the code checks whether the device can read(),
> and if not, doesn't even try to use it, even though it can.
> 
> Fix this by only warning that read() is being emulated, and
> continuing with libv4l2 if available.
> 
> Also clarifies the logging.
> 
> Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
> ---
>   dlls/qcap/v4l.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
> 
> 
> 

This doesn't seem right; libv4l2 should massage the result of 
VIDIOC_QUERYCAP to include V4L2_CAP_READWRITE. See 
<https://git.linuxtv.org/v4l-utils.git/tree/lib/libv4l2/libv4l2.c#n1210>.



More information about the wine-devel mailing list