| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.camera3 |
| |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div> |
| |
| ## **PROTOCOLS** |
| |
| ## Device {#Device} |
| *Defined in [fuchsia.camera3/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device.fidl;l=13)* |
| <p>A Device represents a unique physical camera present in the system. Only one client may connect |
| to an unbound physical camera, however the "Rebind" method can be used to create multiple |
| connections to it to be used by a coordinated set of clients.</p> |
| |
| ### ConnectToStream {#Device.ConnectToStream} |
| |
| <p>Connects to the Stream at the provided index. If any clients already exist for this stream, |
| the request is closed with the ZX_ERR_ALREADY_BOUND epitaph.</p> |
| |
| #### Request {#Device.ConnectToStream_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>index</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>request</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#Stream'>Stream</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### GetConfigurations {#Device.GetConfigurations} |
| |
| <p>Returns a list of configurations supported by the camera. All cameras will have at least |
| one configuration. The values returned are immutable - they will not change for the |
| lifetime of the client's connection to the Camera.</p> |
| <p><b>DEPRECATED </b>- Use GetConfigurations2</p> |
| #### Request {#Device.GetConfigurations_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Device.GetConfigurations_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>configurations</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Configuration'>Configuration</a>>[256]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### GetConfigurations2 {#Device.GetConfigurations2} |
| |
| <p>Returns a list of configurations supported by the camera. All cameras will have at least |
| one configuration. The values returned are immutable - they will not change for the |
| lifetime of the client's connection to the Camera.</p> |
| |
| #### Request {#Device.GetConfigurations2_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Device.GetConfigurations2_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>configurations</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Configuration2'>Configuration2</a>>[256]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### GetIdentifier {#Device.GetIdentifier} |
| |
| <p>Returns an identifier for the camera. If present, identical devices on different systems |
| will have the same identifier. Clients may use this to determine if additional semantics |
| known a priori for a given device apply to the current camera.</p> |
| |
| #### Request {#Device.GetIdentifier_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Device.GetIdentifier_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>identifier</code></td> |
| <td> |
| <code>string[256]?</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### Rebind {#Device.Rebind} |
| |
| <p>Request another connection to this Device. This allows a client to delegate different |
| operations to different coordinated clients.</p> |
| |
| #### Request {#Device.Rebind_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>request</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#Device'>Device</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### SetCurrentConfiguration {#Device.SetCurrentConfiguration} |
| |
| <p>Sets the configuration using the provided index. Calling this method disconnects any |
| existing Stream clients associated with this camera. An epitaph of ZX_OK |
| will be sent for any connected Stream clients on closing.</p> |
| |
| #### Request {#Device.SetCurrentConfiguration_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>index</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### SetSoftwareMuteState {#Device.SetSoftwareMuteState} |
| |
| <p>Sets the current camera's software mute state. When transitioning to the muted state, this |
| method returns when the camera has successfully ceased sending new frames to stream |
| clients. When transitioning to the unmuted state, this method returns immediately.</p> |
| |
| #### Request {#Device.SetSoftwareMuteState_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>muted</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Device.SetSoftwareMuteState_Response} |
| |
| <EMPTY> |
| |
| ### WatchCurrentConfiguration {#Device.WatchCurrentConfiguration} |
| |
| <p>Returns the index of the current configuration when it has changed from a previously |
| returned configuration, or is called by a client for the first time.</p> |
| |
| #### Request {#Device.WatchCurrentConfiguration_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Device.WatchCurrentConfiguration_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>index</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WatchMuteState {#Device.WatchMuteState} |
| |
| <p>Returns the camera's current mute state when it has changed from a previously returned |
| state, or is called by a client for the first time. A camera may be muted using |
| SetSoftwareMuteState or by a physical switch. If either muted mode is active, stream |
| clients associated with this physical camera will stop receiving new frames.</p> |
| |
| #### Request {#Device.WatchMuteState_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Device.WatchMuteState_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>software_muted</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>hardware_muted</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| </tr> |
| </table> |
| |
| ## DeviceWatcher {#DeviceWatcher} |
| *Defined in [fuchsia.camera3/device_watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device_watcher.fidl;l=16)* |
| <p>The DeviceWatcher provides clients a mechanism to discover camera devices present on the |
| system. This is a temporary mechanism intended to be replaced by go/drivers-as-components, |
| which will allow multiple instances of the same protocol to exist side-by-side. Clients are |
| not required to maintain a connection to the Watcher in order to use established Camera |
| connections.</p> |
| |
| ### ConnectToDevice {#DeviceWatcher.ConnectToDevice} |
| |
| <p>Acquires a camera interface for the given ID. If any clients already exist for this camera, |
| the request is closed with the ZX_ERR_ALREADY_BOUND epitaph.</p> |
| |
| #### Request {#DeviceWatcher.ConnectToDevice_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code><a class='link' href='#DeviceId'>DeviceId</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>request</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#Device'>Device</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### WatchDevices {#DeviceWatcher.WatchDevices} |
| |
| <p>Returns a list of available camera IDs when it has changed from the previously returned |
| list of IDs, or when it is called by a client for the first time. The returned list may be |
| empty, indicating no cameras are available. The IDs returned to the client will remain |
| consistent with respect to the physical devices they represent for the duration of the |
| client's connection. Events will be sorted first by event type - <code>existing</code>, <code>added</code>, |
| <code>removed</code>. Within each event type range, IDs will be provided in ascending order. Events |
| are coalesced by the server, so a given ID will only appear once in each list of events.</p> |
| <p>Please note that it is entirely possible for the list returned to be temporarily empty even |
| if the local camera hardware is hardwired (vs plug-in like USB). The empty list condition |
| is temporary on such a platform.</p> |
| <p>Camera applications should tolerate an empty list returned, and attempt to retry the |
| <code>WatchDevices()</code> call.</p> |
| |
| #### Request {#DeviceWatcher.WatchDevices_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#DeviceWatcher.WatchDevices_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>events</code></td> |
| <td> |
| <code>vector<<a class='link' href='#WatchDevicesEvent'>WatchDevicesEvent</a>>[256]</code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Stream {#Stream} |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=14)* |
| <p>A Stream represents timing, sequencing, and other camera-specific properties applied to a buffer |
| collection.</p> |
| |
| ### GetNextFrame {#Stream.GetNextFrame} |
| |
| <p>See GetNextFrame2.</p> |
| <p><b>DEPRECATED </b>- Use GetNextFrame2</p> |
| #### Request {#Stream.GetNextFrame_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.GetNextFrame_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>info</code></td> |
| <td> |
| <code><a class='link' href='#FrameInfo'>FrameInfo</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### GetNextFrame2 {#Stream.GetNextFrame2} |
| |
| <p>Request the next available frame for this stream that has not yet been acquired by the |
| current client. Multiple participating clients may concurrently hold the same frame. Returns |
| when the stream has completed populating the buffer and may be read by the client, provided |
| the number of unreleased buffers is less than the count provided via the most recently |
| negotiated buffer collection token. If a buffer renegotiation is in progress, this call will |
| return only after the negotiation is complete and a new collection is available.</p> |
| |
| #### Request {#Stream.GetNextFrame2_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.GetNextFrame2_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>info</code></td> |
| <td> |
| <code><a class='link' href='#FrameInfo2'>FrameInfo2</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### GetProperties {#Stream.GetProperties} |
| |
| <p>Gets the properties associated with this stream. The value returned is identical to the one |
| corresponding to this stream as returned by |Device.GetConfigurations|.</p> |
| <p><b>DEPRECATED </b>- Use GetProperties2</p> |
| #### Request {#Stream.GetProperties_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.GetProperties_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>properties</code></td> |
| <td> |
| <code><a class='link' href='#StreamProperties'>StreamProperties</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### GetProperties2 {#Stream.GetProperties2} |
| |
| <p>Gets the properties associated with this stream. The value returned is identical to the one |
| corresponding to this stream as returned by |Device.GetConfigurations|.</p> |
| |
| #### Request {#Stream.GetProperties2_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.GetProperties2_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>properties</code></td> |
| <td> |
| <code><a class='link' href='#StreamProperties2'>StreamProperties2</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### Rebind {#Stream.Rebind} |
| |
| <p>Request another connection to this Stream. This allows a client to delegate different |
| operations to different coordinated clients, or have multiple clients concurrently observe |
| frames produced by the stream.</p> |
| |
| #### Request {#Stream.Rebind_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>request</code></td> |
| <td> |
| <code>server_end<<a class='link' href='#Stream'>Stream</a>></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### SetBufferCollection {#Stream.SetBufferCollection} |
| |
| <p>If non-null, requests renegotiation of the buffer collection backing this stream, and |
| identifies this client as a participant in buffer negotiation. If null, identifies this |
| client as a non-participant in buffer negotiation. Upon initial connection, the client is a |
| non-participant. After registering as a participant, clients must always have an outstanding |
| call to WatchBufferCollection to receive tokens from the server so that they are able to |
| respond to current and future renegotiation requests.</p> |
| |
| #### Request {#Stream.SetBufferCollection_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>token</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.sysmem/'>fuchsia.sysmem</a>/<a class='link' href='../fuchsia.sysmem/#BufferCollectionToken'>BufferCollectionToken</a>?</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### SetCropRegion {#Stream.SetCropRegion} |
| |
| <p>Sets the Stream's crop region to the provided region, with the top-left of the image |
| represented by (0,0) and the bottom-right of the image represented by (1,1). The resulting |
| content is subsequently scaled to fill the output buffer. If the implementation does not |
| precisely support the provided value, it will be expanded to the minimum region that covers |
| the provided region. If region is set to null, the crop region is unset, which is equivalent |
| to specifying a region covering the entire image. Upon initial connection, the region is |
| unset. If the stream does not support crop region, the connection is closed with the |
| ZX_ERR_NOT_SUPPORTED epitaph.</p> |
| |
| #### Request {#Stream.SetCropRegion_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>region</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.math/'>fuchsia.math</a>/<a class='link' href='../fuchsia.math/#RectF'>RectF</a>?</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### SetResolution {#Stream.SetResolution} |
| |
| <p>Sets the resolution of the stream to the provided value. If the implementation does not |
| precisely support the provided value, it will be expanded to the minimum resolution that |
| exceeds the provided resolution.</p> |
| |
| #### Request {#Stream.SetResolution_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>coded_size</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.math/'>fuchsia.math</a>/<a class='link' href='../fuchsia.math/#Size'>Size</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ### WatchBufferCollection {#Stream.WatchBufferCollection} |
| |
| <p>Returns when the server or any buffer negotiation participant (including the current client) |
| requires buffer renegotiation, and the current client is registered as a participant. Frame |
| callbacks received after receiving this callback apply to the newly negotiated collection.</p> |
| <p>Because the camera can output directly to these collections, each client should support |
| reading from a |fuchsia.sysmem.CoherencyDomain| of RAM, and set |ram_domain_supported| in |
| their |fuchsia.sysmem.BufferMemoryConstraints|.</p> |
| |
| #### Request {#Stream.WatchBufferCollection_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.WatchBufferCollection_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>token</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.sysmem/'>fuchsia.sysmem</a>/<a class='link' href='../fuchsia.sysmem/#BufferCollectionToken'>BufferCollectionToken</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WatchCropRegion {#Stream.WatchCropRegion} |
| |
| <p>Returns the crop region if it has changed from a previously returned value, or is called by |
| a client for the first time. Frame callbacks received after receiving this callback reflect |
| the use of the new region. See SetCropRegion for a description of the region parameter.</p> |
| |
| #### Request {#Stream.WatchCropRegion_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.WatchCropRegion_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>region</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.math/'>fuchsia.math</a>/<a class='link' href='../fuchsia.math/#RectF'>RectF</a>?</code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WatchOrientation {#Stream.WatchOrientation} |
| |
| <p>Returns the orientation if it has changed from a previously returned value, or is called by |
| a client for the first time. Frame callbacks received after receiving this callback reflect |
| the new orientation.</p> |
| |
| #### Request {#Stream.WatchOrientation_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.WatchOrientation_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>orientation</code></td> |
| <td> |
| <code><a class='link' href='#Orientation'>Orientation</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### WatchResolution {#Stream.WatchResolution} |
| |
| <p>Returns the resolution if it has changed from a previously returned value, or is called by |
| a client for the first time. Frame callbacks received after receiving this callback reflect |
| the new resolution.</p> |
| |
| #### Request {#Stream.WatchResolution_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Stream.WatchResolution_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>coded_size</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.math/'>fuchsia.math</a>/<a class='link' href='../fuchsia.math/#Size'>Size</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **STRUCTS** |
| |
| ### Configuration {#Configuration data-text="Configuration"} |
| *Defined in [fuchsia.camera3/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device.fidl;l=84)* |
| <p>Describes a distinct configuration for the camera.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Configuration.streams"> |
| <td><code>streams</code></td> |
| <td> |
| <code>vector<<a class='link' href='#StreamProperties'>StreamProperties</a>>[256]</code> |
| </td> |
| <td><p>Descriptions of streams that are concurrently available in the configuration.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### FrameInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#FrameInfo data-text="FrameInfo"} |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=118)* |
| <p>Metadata concerning a given frame.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="FrameInfo.buffer_index"> |
| <td><code>buffer_index</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>Identifies the buffer used for this frame as an index into the most recently negotiated |
| buffer collection.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="FrameInfo.frame_counter"> |
| <td><code>frame_counter</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>A monotonically increasing counter indicating the number of frames written to this stream's |
| most recently negotiated buffer collection. Clients can use this to detect dropped frames |
| or generate nominal timestamps using the associated stream's framerate.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="FrameInfo.timestamp"> |
| <td><code>timestamp</code></td> |
| <td> |
| <code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code> |
| </td> |
| <td><p>The value of the system monotonic clock, measured at the time the hardware completed |
| populating the buffer.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="FrameInfo.release_fence"> |
| <td><code>release_fence</code></td> |
| <td> |
| <code>handle<eventpair></code> |
| </td> |
| <td><p>The client must close this when it has completed reading from the buffer.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### FrameRate {#FrameRate data-text="FrameRate"} |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=161)* |
| <p>The frequency at which a Stream produces frames. The value is <code>numerator</code> / <code>denominator</code>, with |
| units of frames-per-second (Hz). The representation is not necessarily an irreducible fraction.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="FrameRate.numerator"> |
| <td><code>numerator</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>Fraction numerator.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="FrameRate.denominator"> |
| <td><code>denominator</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>Fraction denominator. This value will not be zero.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### StreamProperties {#StreamProperties data-text="StreamProperties"} |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=170)* |
| <p>Describes the properties of a given stream.</p> |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="StreamProperties.image_format"> |
| <td><code>image_format</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.sysmem/'>fuchsia.sysmem</a>/<a class='link' href='../fuchsia.sysmem/#ImageFormat_2'>ImageFormat_2</a></code> |
| </td> |
| <td><p>Describes the native image format used by a stream.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="StreamProperties.frame_rate"> |
| <td><code>frame_rate</code></td> |
| <td> |
| <code><a class='link' href='#FrameRate'>FrameRate</a></code> |
| </td> |
| <td><p>Describes the framerate used by a stream.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| <tr id="StreamProperties.supports_crop_region"> |
| <td><code>supports_crop_region</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>Indicates whether a stream supports the SetCropRegion method.</p> |
| </td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| |
| ## **ENUMS** |
| |
| ### Orientation [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Orientation data-text="Orientation"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=202)* |
| <p>Describes the intended orientation of a given stream relative to its encoded data. For clarity, |
| the documentation for each enum value is accompanied by an orientation of the chiral '⮬' symbol |
| illustrating the orientation of the stream's encoded data.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Orientation.UP"> |
| <td><h3 id="Orientation.UP" class="add-link hide-from-toc">UP</h3></td> |
| <td><code>1</code></td> |
| <td><p>⮬: The content is already in the correct orientation.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.DOWN"> |
| <td><h3 id="Orientation.DOWN" class="add-link hide-from-toc">DOWN</h3></td> |
| <td><code>2</code></td> |
| <td><p>⮯: The content must be rotated 180 degrees to appear correct.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.LEFT"> |
| <td><h3 id="Orientation.LEFT" class="add-link hide-from-toc">LEFT</h3></td> |
| <td><code>3</code></td> |
| <td><p>⮫: The content must be rotated 90 degrees left (counter-clockwise) to appear correct.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.RIGHT"> |
| <td><h3 id="Orientation.RIGHT" class="add-link hide-from-toc">RIGHT</h3></td> |
| <td><code>4</code></td> |
| <td><p>⮨: The content must be rotated 90 degrees right (clockwise) to appear correct.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.UP_FLIPPED"> |
| <td><h3 id="Orientation.UP_FLIPPED" class="add-link hide-from-toc">UP_FLIPPED</h3></td> |
| <td><code>5</code></td> |
| <td><p>â®: The content must be flipped horizontally to appear correct.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.DOWN_FLIPPED"> |
| <td><h3 id="Orientation.DOWN_FLIPPED" class="add-link hide-from-toc">DOWN_FLIPPED</h3></td> |
| <td><code>6</code></td> |
| <td><p>â®®: The content must be flipped horizontally then rotated 180 degrees to appear correct.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.LEFT_FLIPPED"> |
| <td><h3 id="Orientation.LEFT_FLIPPED" class="add-link hide-from-toc">LEFT_FLIPPED</h3></td> |
| <td><code>7</code></td> |
| <td><p>⮪: The content must be flipped horizontally then rotated 90 degrees left (counter-clockwise) to appear correct.</p> |
| </td> |
| </tr> |
| <tr id="Orientation.RIGHT_FLIPPED"> |
| <td><h3 id="Orientation.RIGHT_FLIPPED" class="add-link hide-from-toc">RIGHT_FLIPPED</h3></td> |
| <td><code>8</code></td> |
| <td><p>⮩: The content must be flipped horizontally then rotated 90 degrees right (clockwise) to appear correct.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **TABLES** |
| |
| ### Configuration2 {#Configuration2 data-text="Configuration2"} |
| |
| |
| *Defined in [fuchsia.camera3/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device.fidl;l=90)* |
| <p>Describes a distinct configuration for the camera.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="Configuration2.streams"> |
| <td><h3 id="Configuration2.streams" class="add-link hide-from-toc">1</h3></td> |
| <td><code>streams</code></td> |
| <td> |
| <code>vector<<a class='link' href='#StreamProperties2'>StreamProperties2</a>>[256]</code> |
| </td> |
| <td><p>Descriptions of streams that are concurrently available in the configuration.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### FrameInfo2 [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#FrameInfo2 data-text="FrameInfo2"} |
| |
| |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=137)* |
| <p>Metadata concerning a given frame.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="FrameInfo2.buffer_index"> |
| <td><h3 id="FrameInfo2.buffer_index" class="add-link hide-from-toc">1</h3></td> |
| <td><code>buffer_index</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>Identifies the buffer used for this frame as an index into the most recently negotiated |
| buffer collection.</p> |
| </td> |
| </tr> |
| <tr id="FrameInfo2.frame_counter"> |
| <td><h3 id="FrameInfo2.frame_counter" class="add-link hide-from-toc">2</h3></td> |
| <td><code>frame_counter</code></td> |
| <td> |
| <code>uint64</code> |
| </td> |
| <td><p>A monotonically increasing counter indicating the number of frames written to this stream's |
| most recently negotiated buffer collection. Clients can use this to detect dropped frames |
| or generate nominal timestamps using the associated stream's framerate.</p> |
| </td> |
| </tr> |
| <tr id="FrameInfo2.timestamp"> |
| <td><h3 id="FrameInfo2.timestamp" class="add-link hide-from-toc">3</h3></td> |
| <td><code>timestamp</code></td> |
| <td> |
| <code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code> |
| </td> |
| <td><p>The value of the system monotonic clock, measured at the time the hardware completed |
| populating the buffer.</p> |
| </td> |
| </tr> |
| <tr id="FrameInfo2.capture_timestamp"> |
| <td><h3 id="FrameInfo2.capture_timestamp" class="add-link hide-from-toc">4</h3></td> |
| <td><code>capture_timestamp</code></td> |
| <td> |
| <code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code> |
| </td> |
| <td><p>The value of the system monotonic clock, measured at the time the hardware completed |
| populating the original buffer used to derive the contents of this buffer.</p> |
| </td> |
| </tr> |
| <tr id="FrameInfo2.release_fence"> |
| <td><h3 id="FrameInfo2.release_fence" class="add-link hide-from-toc">5</h3></td> |
| <td><code>release_fence</code></td> |
| <td> |
| <code>handle<eventpair></code> |
| </td> |
| <td><p>The client must close this when it has completed reading from the buffer.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### StreamProperties2 {#StreamProperties2 data-text="StreamProperties2"} |
| |
| |
| *Defined in [fuchsia.camera3/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=182)* |
| <p>Describes the properties of a given stream.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="StreamProperties2.image_format"> |
| <td><h3 id="StreamProperties2.image_format" class="add-link hide-from-toc">1</h3></td> |
| <td><code>image_format</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.sysmem/'>fuchsia.sysmem</a>/<a class='link' href='../fuchsia.sysmem/#ImageFormat_2'>ImageFormat_2</a></code> |
| </td> |
| <td><p>Describes the native image format used by a stream.</p> |
| </td> |
| </tr> |
| <tr id="StreamProperties2.frame_rate"> |
| <td><h3 id="StreamProperties2.frame_rate" class="add-link hide-from-toc">2</h3></td> |
| <td><code>frame_rate</code></td> |
| <td> |
| <code><a class='link' href='#FrameRate'>FrameRate</a></code> |
| </td> |
| <td><p>Describes the framerate used by a stream.</p> |
| </td> |
| </tr> |
| <tr id="StreamProperties2.supports_crop_region"> |
| <td><h3 id="StreamProperties2.supports_crop_region" class="add-link hide-from-toc">3</h3></td> |
| <td><code>supports_crop_region</code></td> |
| <td> |
| <code>bool</code> |
| </td> |
| <td><p>Indicates whether a stream supports the SetCropRegion method.</p> |
| </td> |
| </tr> |
| <tr id="StreamProperties2.supported_resolutions"> |
| <td><h3 id="StreamProperties2.supported_resolutions" class="add-link hide-from-toc">4</h3></td> |
| <td><code>supported_resolutions</code></td> |
| <td> |
| <code>vector<<a class='link' href='../fuchsia.math/'>fuchsia.math</a>/<a class='link' href='../fuchsia.math/#Size'>Size</a>>[256]</code> |
| </td> |
| <td><p>Describes the precise resolutions supported by a stream, i.e. those for which SetResolution |
| results in a WatchResolution callback of the same value. If empty, it indicates that the |
| stream supports arbitrary resolutions. If non-empty, the list contains at least one element |
| reflecting the native resolution specified by |image_format|.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **UNIONS** |
| |
| ### WatchDevicesEvent [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#WatchDevicesEvent data-text="WatchDevicesEvent"} |
| *Defined in [fuchsia.camera3/device_watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device_watcher.fidl;l=43)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="WatchDevicesEvent.existing"> |
| <td><h3 id="WatchDevicesEvent.existing" class="add-link hide-from-toc">1</h3></td> |
| <td><code>existing</code></td> |
| <td> |
| <code><a class='link' href='#DeviceId'>DeviceId</a></code> |
| </td> |
| <td><p>Indicates an existing camera with the provided ID is still available.</p> |
| </td> |
| </tr> |
| <tr id="WatchDevicesEvent.added"> |
| <td><h3 id="WatchDevicesEvent.added" class="add-link hide-from-toc">2</h3></td> |
| <td><code>added</code></td> |
| <td> |
| <code><a class='link' href='#DeviceId'>DeviceId</a></code> |
| </td> |
| <td><p>Indicates a new camera with the provided ID is now available.</p> |
| </td> |
| </tr> |
| <tr id="WatchDevicesEvent.removed"> |
| <td><h3 id="WatchDevicesEvent.removed" class="add-link hide-from-toc">3</h3></td> |
| <td><code>removed</code></td> |
| <td> |
| <code><a class='link' href='#DeviceId'>DeviceId</a></code> |
| </td> |
| <td><p>Indicates an existing camera with the provided ID is no longer available.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **CONSTANTS** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr> |
| <tr id="MAX_CONFIGURATIONS_PER_CAMERA"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device.fidl;l=7">MAX_CONFIGURATIONS_PER_CAMERA</a></td> |
| <td> |
| <code>256</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_IDENTIFIER_LENGTH"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device.fidl;l=6">MAX_IDENTIFIER_LENGTH</a></td> |
| <td> |
| <code>256</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_RESOLUTIONS_PER_STREAM"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/stream.fidl;l=10">MAX_RESOLUTIONS_PER_STREAM</a></td> |
| <td> |
| <code>256</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_STREAMS_PER_CONFIGURATION"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device.fidl;l=8">MAX_STREAMS_PER_CONFIGURATION</a></td> |
| <td> |
| <code>256</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| <tr id="MAX_WATCH_DEVICES_EVENTS"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device_watcher.fidl;l=6">MAX_WATCH_DEVICES_EVENTS</a></td> |
| <td> |
| <code>256</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ## **TYPE ALIASES** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="DeviceId"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.camera3/device_watcher.fidl;l=8">DeviceId</a></td> |
| <td> |
| <code>uint64</code></td> |
| <td></td> |
| </tr> |
| </table> |