pub struct ScreenCaptureSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ScreenCaptureSynchronousProxy
impl ScreenCaptureSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ScreenCaptureEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ScreenCaptureEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn configure(
&self,
payload: ScreenCaptureConfig,
___deadline: MonotonicInstant,
) -> Result<ScreenCaptureConfigureResult, Error>
pub fn configure( &self, payload: ScreenCaptureConfig, ___deadline: MonotonicInstant, ) -> Result<ScreenCaptureConfigureResult, Error>
Clients should first use the [‘fuchsia.ui.composition/Allocator’] protocol to register a BufferCollection.
Similarly, the clients are responsible for specifying a buffer big enough for the image. If the buffer is too small, an attempt will be made to render the image, however, it will not be guaranteed to contain the complete image.
Sourcepub fn get_next_frame(
&self,
___deadline: MonotonicInstant,
) -> Result<ScreenCaptureGetNextFrameResult, Error>
pub fn get_next_frame( &self, ___deadline: MonotonicInstant, ) -> Result<ScreenCaptureGetNextFrameResult, Error>
[GetNextFrame
] returns the latest unseen-by-the-client frame as soon
as possible. On the first call to [GetNextFrame
] and any subsequent
calls that have not recieved the previous expected requested frame,
[GetNextFrame
] will return immediately with the last frame to be
rendered. If the client had requested the previous frame, the server
will wait until the next frame is produced to return.
After the client finishes processing the returned buffer, they should drop the eventpair to signal to the server that the buffer can be re-used.
It is invalid to call [GetNextFrame
] while a previous call is still
pending. Doing so will return a BAD_HANGING_GET error and cause the
channel to close.
Trait Implementations§
Source§impl SynchronousProxy for ScreenCaptureSynchronousProxy
impl SynchronousProxy for ScreenCaptureSynchronousProxy
Source§type Proxy = ScreenCaptureProxy
type Proxy = ScreenCaptureProxy
Source§type Protocol = ScreenCaptureMarker
type Protocol = ScreenCaptureMarker
Proxy
controls.