vdev virtio-video-camera

Updated: April 19, 2023

Implements VirtIO-Video camera functionality for guests running in hypervisor VMs

Synopsis

vdev virtio-video-camera [num_cameras number] [sensor_unit SENSOR_UNIT_X...]
		[dynamic_configuration true | false] [blit_enabled true | false]
		[camera_format format] [guest_format format] [guest_num_buffers number]

Options

num_cameras number
Set the maximum stream ID value to be supported for streams used in VirtIO-Video messages, as determined by number. Since the stream ID is zero-based, the maximum value supported will be num_cameras - 1. The value for number must be between 1 and 16, inclusive.
sensor_unit SENSOR_UNIT_X...
Specify the Sensor Framework sensor units to associate with a given stream ID. The units should be given in a comma-separated list, similar to the following example:
sensor_unit SENSOR_UNIT_1, SENSOR_UNIT_2, SENSOR_UNIT_3
Each comma-separated entry should have the form of SENSOR_UNIT_X, with X being a value between 1 and 64, inclusive. The number of entries should be equal to the value of num_cameras. Further validation will be performed upon initialization to ensure all values are supported by the existing Sensor Framework configuration.
dynamic_configuration true | false
Specify whether the guest is allowed to dynamically update the configuration of a given camera. The Sensor Framework permits only one guest at a time to do so. When this option is set to true, the guest is allowed to perform dynamic configuration, but other applications on the QNX host cannot perform it. When this option is set to false, the guest is unable to dynamically update the configuration, while another application on the QNX host is allowed to update it. In this case, if the guest requests a camera configuration that's different from the current one, the request will fail.
blit_enabled true | false
Specify whether the camera-sharing vdev uses a screen blit to directly copy frames from the camera to the buffers of the GPU-sharing vdev. This direct copying optimizes performance when camera buffers need to be displayed by the GPU on the guest.

When blit_enabled is set to true, the camera-sharing framework requires the virtio-gpu vdev and the Screen Graphics Subsystem. See the Graphics Sharing chapter for more information. These dependencies don't apply if blit_enabled is false.

camera_format format
Set the format to request from the camera on the QNX host, as determined by format. Currently, format can be either NV12 for CAMERA_FRAMETYPE_NV12, or CBYCRY for CAMERA_FRAMETYPE_CBYCRY.
guest_format format
Determine the format to use for camera frames being passed to the guest via screen_blit(). Currently, the only available value of format is RGB8888 for CAMERA_FRAMETYPE_RGB8888.

This option is ignored if blit_enabled is false.

guest_num_buffers number
Determine the number of buffers used by the guest for the camera, as specified by number. The number argument can have a value between 1 and 64, inclusive.

This option is ignored if blit_enabled is false.

Note: In addition to these options, you can specify options that are supported for all vdevs, such as intr and loc. For more information, see Common vdev options in the QNX Hypervisor User's Guide.

Description

(ARM and x86) The virtio-video-camera vdev provides camera functionality for guests running in hypervisor VMs. It does so by forwarding the camera requests of the guests, which it receives through a guest driver, to the Camera library on the host, and by reporting the results of camera operations back to the guests. To allow the guest driver to talk to it, the vdev implements the VirtIO-Video message standard.

The vdev's configuration associates a given camera stream instance in the VirtIO-Video protocol with a given camera in the Sensor Framework. The configuration options are specific to the instance of the driver using the vdev.