pub struct Decoder { /* private fields */ }Implementations§
Source§impl Decoder
impl Decoder
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn container_metadata(&self) -> Result<ContainerMetadata>
pub fn timestamps(&self) -> Result<Vec<i64>>
Sourcepub fn prefetch(&self, timestamp_ns: i64)
pub fn prefetch(&self, timestamp_ns: i64)
Hint the OS to prefetch a frame’s range into the page cache (B4).
See motioncam_decoder::Decoder::prefetch. No-op on Windows.
pub fn load_frame(&self, timestamp_ns: i64) -> Result<(Vec<u16>, FrameMetadata)>
Sourcepub fn load_frame_into(
&self,
timestamp_ns: i64,
out: &mut [u16],
) -> Result<[f32; 3]>
pub fn load_frame_into( &self, timestamp_ns: i64, out: &mut [u16], ) -> Result<[f32; 3]>
Decode a frame into a caller-owned buffer (B1). Returns only the
asShotNeutral triplet (B2) — the only metadata the export hot
path uses. Use load_frame if you need the other fields.
pub fn load_frame_metadata(&self, timestamp_ns: i64) -> Result<FrameMetadata>
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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> 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>
Converts
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>
Converts
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