fuchsia.camera2.hal

PROTOCOLS

Controller

Defined in fuchsia.camera2.hal/hal.fidl

This is the interface to the camera driver which allows setting up a given configuration and setting up a stream.

GetConfigs

Get a list of all available configurations which the camera driver supports.

Request

NameType

Response

NameType
configs vector<Config>[256]?
status int32

CreateStream

Set a particular configuration and create the requested stream. |config_index| : Configuration index from the vector which needs to be applied. |stream_type| : Stream types (one of more of |CameraStreamTypes|) |buffer_collection| : Buffer collections for the stream. |stream| : Stream channel for the stream requested |image_format_index| : Image format index which needs to be set up upon creation. If there is already an active configuration which is different than the one which is requested to be set, then the HAL will be closing all existing streams and honor this new setup call. If the new stream requested is already part of the existing running configuration the HAL will just be creating this new stream while the other stream still exists as is.

Request

NameType
config_index uint32
stream_type uint32
image_format_index uint32
buffer_collection fuchsia.sysmem/BufferCollectionInfo
stream request<fuchsia.camera2/Stream>

EnableStreaming

Enable/Disable Streaming

Request

NameType

DisableStreaming

Request

NameType

GetDeviceInfo

Request

NameType

Response

NameType
info fuchsia.camera2/DeviceInfo

STRUCTS

StreamConfig

Defined in fuchsia.camera2.hal/hal.fidl

Represents one stream within a particular configuration.

NameTypeDescriptionDefault
frame_rate fuchsia.camera2/FrameRate No default
constraints fuchsia.sysmem/BufferCollectionConstraints |constraints| should allow for all the image formats listed in image_formats. No default
properties fuchsia.camera2/StreamProperties Properties of the stream: No default
image_formats vector<fuchsia.sysmem/ImageFormat_2>[256] We need to specify both the constraints & the image formats because there are fixed set of resolutions supported by the Camera Controller so a range within the |constraints| won't be sufficient. Some streams support multiple resolutions for same configuration We would need to change the resolution runtime, without stopping the streaming. This provides a list of resolutions a stream would be providing. At least one format must be provided. No default

Config

Defined in fuchsia.camera2.hal/hal.fidl

Represents one configuration

NameTypeDescriptionDefault
stream_config vector<StreamConfig>[64] No default

CONSTANTS

NameValueTypeDescription
MAX_CONFIGURATIONS 256 uint64 Maximum number of configurations per device.
MAX_STREAMS 64 uint64 Maximum number of streams per config.