#[non_exhaustive]pub struct CameraFrame {
pub frame: VideoFrame,
pub facing: Facing,
pub rotation: u32,
}Expand description
Raw camera frames for a native self-view (video-core): VideoCapture::camera_tap.
Raw camera frames for a native self-view (video-core): VideoCapture::camera_tap.
Raw camera frames for a native self-view (video-core): VideoCapture::camera_tap.
One raw camera frame for a native self-view.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.frame: VideoFrameThe frame as the backend captured it (shared, not copied): on macOS and iOS an OS
buffer (FrameBuffer::Native, a CVPixelBuffer), elsewhere CPU planes. Its width and
height are as shown (portrait or landscape), its capture_us the backend’s clock.
facing: FacingWhich way the camera that captured it faces (Unknown when the OS doesn’t say).
rotation: u32Degrees clockwise (0, 90, 180 or 270) the host still has to turn the frame to show it
upright: 0 with every kessel-video backend, which turns frames upright itself.
Implementations§
Source§impl CameraFrame
impl CameraFrame
Sourcepub fn new(frame: VideoFrame, facing: Facing) -> CameraFrame
pub fn new(frame: VideoFrame, facing: Facing) -> CameraFrame
frame from a camera facing facing, upright.
Trait Implementations§
Source§impl Clone for CameraFrame
impl Clone for CameraFrame
Auto Trait Implementations§
impl !Freeze for CameraFrame
impl !RefUnwindSafe for CameraFrame
impl !UnwindSafe for CameraFrame
impl Forget for CameraFrame
impl Move for CameraFrame
impl Send for CameraFrame
impl Sync for CameraFrame
impl Unpin for CameraFrame
impl UnsafeUnpin for CameraFrame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more