Boilerplate for an emulated camera viertio-media device.#2343
Merged
ser-io merged 1 commit intogoogle:mainfrom Apr 8, 2026
Merged
Boilerplate for an emulated camera viertio-media device.#2343ser-io merged 1 commit intogoogle:mainfrom
ser-io merged 1 commit intogoogle:mainfrom
Conversation
jemoreira
reviewed
Apr 6, 2026
3b2dd38 to
e222fd4
Compare
e222fd4 to
629ad60
Compare
jemoreira
approved these changes
Apr 8, 2026
629ad60 to
75ce924
Compare
The boilerplate is based on virtio-media simple_device implementation: https://github.com/chromeos/virtio-media/blob/main/device/src/devices/simple_device.rs Run the device: ``` bazel run emulated_camera:emulated_camera -- --socket-path /tmp/media.sock ``` Run the device with cargo: ``` cargo run --bin emulated_camera -- --socket-path /tmp/media.sock ``` Run the VM: ``` cargo run -- --log-level=debug run --cpus 4 --mem 4096 \ --rwdisk /path/to/debian-12.img \ --params "root=/dev/vda1" \ --vhost-user media,socket=/tmp/media.sock \ /path/to/bzImage ``` Run v4l2-compliance: ``` v4l2-compliance -d0 -s ``` Result: ``` Total for virtio-media device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 1 ``` Bug: b/499339597
75ce924 to
e823b10
Compare
Member
Author
|
Thanks for reviewing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The boilerplate is based on virtio-media simple_device implementation: https://github.com/chromeos/virtio-media/blob/main/device/src/devices/simple_device.rs
Run the device:
Run the device with cargo:
Run the VM:
Run v4l2-compliance:
Bug: b/499339597