otaku42 / v4l2py

V4L2 python library
GNU General Public License v3.0
0 stars 0 forks source link

v4l2py does not work with vivid #17

Open otaku42 opened 1 year ago

otaku42 commented 1 year ago

vivid, the virtual video test driver, could be a great help for further improving v4l2py. However, accessing a vivid device currently fails like this:

>>> from v4l2py import Device
>>> cam = Device.from_id(5)
>>> cam.open()
ignored unknown pixel format NV24 (875714126)
ignored unknown pixel format NV42 (842290766)
ignored unknown pixel format AYUV (1448433985)
ignored unknown pixel format XYUV (1448434008)
ignored unknown pixel format VUYA (1096373590)
ignored unknown pixel format VUYX (1482249558)
ignored unknown pixel format YUVA (1096176985)
ignored unknown pixel format YUVX (1482052953)
ignored unknown pixel format Y16  (2687906137)
ignored unknown pixel format GA12 (842088775)
ignored unknown pixel format XR1µ (3039908440)
ignored unknown pixel format AR1µ (3039908417)
ignored unknown pixel format BG12 (842090306)
ignored unknown pixel format GB12 (842089031)
ignored unknown pixel format RG12 (842090322)
ignored unknown pixel format GB16 (909197895)
ignored unknown pixel format GR16 (909201991)
ignored unknown pixel format RG16 (909199186)
ignored unknown pixel format HSV3 (861295432)
ignored unknown pixel format HSV4 (878072648)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mrenzmann/src/v4l2py-o42/v4l2py/device.py", line 691, in open
    self._init()
  File "/home/mrenzmann/src/v4l2py-o42/v4l2py/device.py", line 681, in _init
    self.info = read_info(self.fileno())
  File "/home/mrenzmann/src/v4l2py-o42/v4l2py/device.py", line 371, in read_info
    inputs=list(iter_read_inputs(fd)),
  File "/home/mrenzmann/src/v4l2py-o42/v4l2py/device.py", line 277, in iter_read_inputs
    for inp in iter_read(fd, IOC.ENUMINPUT, input):
  File "/home/mrenzmann/src/v4l2py-o42/v4l2py/device.py", line 168, in iter_read
    ioctl(fd, ioc, indexed_struct)
  File "/home/mrenzmann/src/v4l2py-o42/v4l2py/device.py", line 118, in ioctl
    return fcntl.ioctl(fd, request.value, arg)
OSError: [Errno 25] Inappropriate ioctl for device