Mp4Frame

Struct Mp4Frame 

Source
pub struct Mp4Frame<S> { /* private fields */ }

Implementations§

Source§

impl<S> Mp4Frame<S>

Source

pub fn new( source: Arc<Mp4FrameSource<S>>, timestamp: u64, offset: i32, data: Bytes, flags: FrameFlags, ) -> Self

Trait Implementations§

Source§

impl<S: Clone> Clone for Mp4Frame<S>

Source§

fn clone(&self) -> Mp4Frame<S>

Returns a duplicate 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<S: FrameSource> DataFrame for Mp4Frame<S>

Source§

type Source = Arc<Mp4FrameSource<S>>

Source§

type Chunk = Bytes

Source§

fn source(&self) -> &Self::Source

FrameSource - source info structure
Source§

fn chunks( &self, ) -> impl Send + Iterator<Item = <Self::Chunk as MemBlock>::Ref<'_>>

Source§

fn into_chunks(self) -> impl Send + Iterator<Item = Self::Chunk>

Source§

fn put_into(self, chunks: &mut Chunked<Self::Chunk>)
where Self::Chunk: Buf,

Source§

impl<S: FrameSource> EncodedFrame for Mp4Frame<S>

Source§

type Param = Bytes

Source§

fn pts(&self) -> i64

Presentation timestamp in microseconds - same as DTS, but with frame presentation offset correction
Source§

fn params(&self) -> impl Iterator<Item = &Self::Param>

Iterator by NAL units of the parameters (for h264/h265 - VPS,SPS,PPS)
Source§

fn dts(&self) -> u64

Decoding timestamp in microseconds (monotonic increasing timestamp starting from 0 (usually) at the first frame)
Source§

impl<S: FrameSource> Frame for Mp4Frame<S>

Source§

fn timestamp(&self) -> u64

Timestamp in microseconds when frame should appear from start
Source§

fn codec(&self) -> Fourcc

Fourcc signature of the payload type
Source§

fn flags(&self) -> FrameFlags

Frame Flags (keyframe, last, multitrack, live etc.)
Source§

fn has_flag(&self, flag: FrameFlags) -> bool

Check the flag presence
Source§

fn is_keyframe(&self) -> bool

true if frame is IDR (not depends on other frames)
Source§

fn is_live(&self) -> bool

true if frame is compressed
Source§

fn is_multichannel(&self) -> bool

true if frame is part of multichannel translation
Source§

fn is_encoded(&self) -> bool

true if frame is compressed
Source§

fn is_last(&self) -> bool

true if frame is last one in the seq
Source§

fn has_params(&self) -> bool

frame needs updated decoding params
Source§

fn has_start_timestamp(&self) -> bool

live stream has timestamp of starting of the translation
Source§

fn is_audio(&self) -> bool

Audio Frame
Source§

fn is_video(&self) -> bool

Video Frame
Source§

fn is_metadata(&self) -> bool

Metadata Frame

Auto Trait Implementations§

§

impl<S> !Freeze for Mp4Frame<S>

§

impl<S> RefUnwindSafe for Mp4Frame<S>
where S: RefUnwindSafe,

§

impl<S> Send for Mp4Frame<S>
where S: Sync + Send,

§

impl<S> Sync for Mp4Frame<S>
where S: Sync + Send,

§

impl<S> Unpin for Mp4Frame<S>

§

impl<S> UnwindSafe for Mp4Frame<S>
where S: RefUnwindSafe,

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
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

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

Source§

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

Source§

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

Source§

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.