Skip to content

Commit

Permalink
Fix video tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagocoutinho committed Oct 14, 2023
1 parent f3b87fa commit 517f0bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions linuxpy/video/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,8 @@ def open(self):
self.buffer = MemoryMapStreamReader(self)
elif Capability.READWRITE in source:
self.buffer = Read(self)
else:
raise IOError("Device needs to support STREAMING or READWRITE capability")
self.buffer.open()
self.stream_on()
self.device.log.info("Video capture started!")
Expand Down
1 change: 1 addition & 0 deletions tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def ioctl(self, fd, ioc, arg): # noqa: C901
arg.card = self.card
arg.bus_info = self.bus_info
arg.version = self.version
arg.capabilities = raw.Capability.STREAMING
elif isinstance(arg, raw.v4l2_format):
if ioc == raw.IOC.G_FMT:
arg.fmt.pix.width = 640
Expand Down

0 comments on commit 517f0bf

Please sign in to comment.