pub struct Stream_Proxy { /* private fields */ }

Implementations§

source§

impl Stream_Proxy

source

pub fn new(channel: AsyncChannel) -> Self

Create a new Proxy for fuchsia.camera3/Stream.

source

pub fn take_event_stream(&self) -> Stream_EventStream

Get a Stream of events from the remote end of the protocol.

§Panics

Panics if the event stream was already taken.

source

pub fn get_properties(&self) -> QueryResponseFut<StreamProperties>

Gets the properties associated with this stream. The value returned is identical to the one corresponding to this stream as returned by |Device.GetConfigurations|.

source

pub fn get_properties2(&self) -> QueryResponseFut<StreamProperties2>

Gets the properties associated with this stream. The value returned is identical to the one corresponding to this stream as returned by |Device.GetConfigurations|.

source

pub fn set_crop_region(&self, region: Option<&RectF>) -> Result<(), Error>

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.

source

pub fn watch_crop_region(&self) -> QueryResponseFut<Option<Box<RectF>>>

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.

source

pub fn set_resolution(&self, coded_size: &Size) -> Result<(), Error>

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.

source

pub fn watch_resolution(&self) -> QueryResponseFut<Size>

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.

source

pub fn set_buffer_collection( &self, token: Option<ClientEnd<BufferCollectionTokenMarker>> ) -> Result<(), Error>

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.

source

pub fn watch_buffer_collection( &self ) -> QueryResponseFut<ClientEnd<BufferCollectionTokenMarker>>

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|.

source

pub fn watch_orientation(&self) -> QueryResponseFut<Orientation>

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.

source

pub fn get_next_frame(&self) -> QueryResponseFut<FrameInfo>

See GetNextFrame2.

source

pub fn get_next_frame2(&self) -> QueryResponseFut<FrameInfo2>

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.

source

pub fn rebind(&self, request: ServerEnd<Stream_Marker>) -> Result<(), Error>

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.

Trait Implementations§

source§

impl Clone for Stream_Proxy

source§

fn clone(&self) -> Stream_Proxy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Stream_Proxy

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Proxy for Stream_Proxy

§

type Protocol = Stream_Marker

The protocol which this Proxy controls.
source§

fn from_channel(inner: AsyncChannel) -> Self

Create a proxy over the given channel.
source§

fn into_channel(self) -> Result<AsyncChannel, Self>

Attempt to convert the proxy back into a channel. Read more
source§

fn as_channel(&self) -> &AsyncChannel

Get a reference to the proxy’s underlying channel. Read more
§

fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>

Attempt to convert the proxy back into a client end. Read more
§

fn is_closed(&self) -> bool

Returns true if the proxy has received the PEER_CLOSED signal.
§

fn on_closed(&self) -> OnSignals<'_, Unowned<'_, Handle>>

Returns a future that completes when the proxy receives the PEER_CLOSED signal.
source§

impl Stream_ProxyInterface for Stream_Proxy

§

type GetPropertiesResponseFut = QueryResponseFut<StreamProperties>

source§

fn get_properties(&self) -> Self::GetPropertiesResponseFut

§

type GetProperties2ResponseFut = QueryResponseFut<StreamProperties2>

source§

fn get_properties2(&self) -> Self::GetProperties2ResponseFut

source§

fn set_crop_region(&self, region: Option<&RectF>) -> Result<(), Error>

§

type WatchCropRegionResponseFut = QueryResponseFut<Option<Box<RectF>>>

source§

fn watch_crop_region(&self) -> Self::WatchCropRegionResponseFut

source§

fn set_resolution(&self, coded_size: &Size) -> Result<(), Error>

§

type WatchResolutionResponseFut = QueryResponseFut<Size>

source§

fn watch_resolution(&self) -> Self::WatchResolutionResponseFut

source§

fn set_buffer_collection( &self, token: Option<ClientEnd<BufferCollectionTokenMarker>> ) -> Result<(), Error>

§

type WatchBufferCollectionResponseFut = QueryResponseFut<ClientEnd<BufferCollectionTokenMarker>>

source§

fn watch_buffer_collection(&self) -> Self::WatchBufferCollectionResponseFut

§

type WatchOrientationResponseFut = QueryResponseFut<Orientation>

source§

fn watch_orientation(&self) -> Self::WatchOrientationResponseFut

§

type GetNextFrameResponseFut = QueryResponseFut<FrameInfo>

source§

fn get_next_frame(&self) -> Self::GetNextFrameResponseFut

§

type GetNextFrame2ResponseFut = QueryResponseFut<FrameInfo2>

source§

fn get_next_frame2(&self) -> Self::GetNextFrame2ResponseFut

source§

fn rebind(&self, request: ServerEnd<Stream_Marker>) -> Result<(), Error>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more