Commit Graph

5 Commits

Author SHA1 Message Date
Albert Esteve
3921238555 video: add v4l2 mocks
Add v4l2 wrapper functions to be able
to mock (and test) v4l2r library responses
without the need of having a underlying video device.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2023-10-24 11:17:33 +02:00
Albert Esteve
cb4ec6ad12 video: fill readme
Complete the README file for the video crate
with the help information for the CLI, and a
working example to run and test the device.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2023-10-24 11:17:33 +02:00
Albert Esteve
f84ea414e3 video: add tests
Add test for all modules, with dev-dependencies
(including rstest [1] for parametrized tests), and
infrastructure.

[1] - https://docs.rs/rstest/latest/rstest/

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2023-10-24 11:17:33 +02:00
Albert Esteve
72dc2e78f2 video: add v4l2-decoder backend
Add new v4l2-decoder backend, that
uses v4l2r [1] for interactions with the
video device in the host. Specialized for
Linux systems.

[1] - https://github.com/Gnurou/v4l2r

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2023-10-24 11:17:33 +02:00
Albert Esteve
5edf1dfb7b video: initial skeleton
Initial skeleton for virtio-video crate.
This crate is based on the v3 of the virtio-video
specs patch[1].

It has a big part of the infrastructure
required, although not all commands are implemented,
and does not have any backend available.

Includes support for async responses to the driver
(through VIDEO_EVENT) to QueueResource messages.

[1] -
https://lists.oasis-open.org/archives/virtio-dev/202002/msg00002.html

Related: #364
Signed-off-by: Albert Esteve <aesteve@redhat.com>
2023-10-24 11:17:33 +02:00