pub enum Stream_Request {
Show 14 variants
GetProperties {
responder: Stream_GetPropertiesResponder,
},
GetProperties2 {
responder: Stream_GetProperties2Responder,
},
SetCropRegion {
region: Option<Box<RectF>>,
control_handle: Stream_ControlHandle,
},
WatchCropRegion {
responder: Stream_WatchCropRegionResponder,
},
SetResolution {
coded_size: Size,
control_handle: Stream_ControlHandle,
},
WatchResolution {
responder: Stream_WatchResolutionResponder,
},
SetBufferCollection2 {
token: Option<ClientEnd<BufferCollectionTokenMarker>>,
control_handle: Stream_ControlHandle,
},
SetBufferCollection {
token: Option<ClientEnd<BufferCollectionTokenMarker>>,
control_handle: Stream_ControlHandle,
},
WatchBufferCollection2 {
responder: Stream_WatchBufferCollection2Responder,
},
WatchBufferCollection {
responder: Stream_WatchBufferCollectionResponder,
},
WatchOrientation {
responder: Stream_WatchOrientationResponder,
},
GetNextFrame {
responder: Stream_GetNextFrameResponder,
},
GetNextFrame2 {
responder: Stream_GetNextFrame2Responder,
},
Rebind {
request: ServerEnd<Stream_Marker>,
control_handle: Stream_ControlHandle,
},
}
Expand description
A Stream represents timing, sequencing, and other camera-specific properties applied to a buffer collection.
Variants§
GetProperties
Gets the properties associated with this stream. The value returned is identical to the one corresponding to this stream as returned by |Device.GetConfigurations|.
Fields
responder: Stream_GetPropertiesResponder
GetProperties2
Gets the properties associated with this stream. The value returned is identical to the one corresponding to this stream as returned by |Device.GetConfigurations|.
Fields
responder: Stream_GetProperties2Responder
SetCropRegion
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.
WatchCropRegion
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.
Fields
responder: Stream_WatchCropRegionResponder
SetResolution
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.
WatchResolution
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.
Fields
responder: Stream_WatchResolutionResponder
SetBufferCollection2
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.
SetBufferCollection
WatchBufferCollection2
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.
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|.
Fields
responder: Stream_WatchBufferCollection2Responder
WatchBufferCollection
Fields
responder: Stream_WatchBufferCollectionResponder
WatchOrientation
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.
Fields
responder: Stream_WatchOrientationResponder
GetNextFrame
See GetNextFrame2.
Fields
responder: Stream_GetNextFrameResponder
GetNextFrame2
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.
Fields
responder: Stream_GetNextFrame2Responder
Rebind
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.
Implementations§
Source§impl Stream_Request
impl Stream_Request
pub fn into_get_properties(self) -> Option<Stream_GetPropertiesResponder>
pub fn into_get_properties2(self) -> Option<Stream_GetProperties2Responder>
pub fn into_set_crop_region( self, ) -> Option<(Option<Box<RectF>>, Stream_ControlHandle)>
pub fn into_watch_crop_region(self) -> Option<Stream_WatchCropRegionResponder>
pub fn into_set_resolution(self) -> Option<(Size, Stream_ControlHandle)>
pub fn into_watch_resolution(self) -> Option<Stream_WatchResolutionResponder>
pub fn into_set_buffer_collection2( self, ) -> Option<(Option<ClientEnd<BufferCollectionTokenMarker>>, Stream_ControlHandle)>
pub fn into_set_buffer_collection( self, ) -> Option<(Option<ClientEnd<BufferCollectionTokenMarker>>, Stream_ControlHandle)>
pub fn into_watch_buffer_collection2( self, ) -> Option<Stream_WatchBufferCollection2Responder>
pub fn into_watch_buffer_collection( self, ) -> Option<Stream_WatchBufferCollectionResponder>
pub fn into_watch_orientation(self) -> Option<Stream_WatchOrientationResponder>
pub fn into_get_next_frame(self) -> Option<Stream_GetNextFrameResponder>
pub fn into_get_next_frame2(self) -> Option<Stream_GetNextFrame2Responder>
pub fn into_rebind( self, ) -> Option<(ServerEnd<Stream_Marker>, Stream_ControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL