pub struct Frame { /* private fields */ }Expand description
A raw RGB888 frame.
Row 0 is the top of the screen. The proto documents raw rows as bottom-up, but the emulator sends them top-down: S7 matched a raw frame read top-down against the PNG of the same screen, and tap locations only lined up that way.
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new(width: u32, height: u32, pixels: Bytes) -> Result<Self, FrameError>
pub fn new(width: u32, height: u32, pixels: Bytes) -> Result<Self, FrameError>
A frame of pixels in RGB888, rows top-down.
Sourcepub fn with_timing(self, seq: u32, timestamp_us: u64) -> Self
pub fn with_timing(self, seq: u32, timestamp_us: u64) -> Self
Sets the stream sequence number and the emulator’s production time.
pub fn width(&self) -> u32
pub fn height(&self) -> u32
Sourcepub fn seq(&self) -> u32
pub fn seq(&self) -> u32
The emulator’s sequence number in its stream; gaps are frames it skipped.
Sourcepub fn timestamp_us(&self) -> u64
pub fn timestamp_us(&self) -> u64
When the emulator estimates it produced the frame, in microseconds since the Unix epoch; before the frame was copied, scaled and sent.
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request