Skip to main content

FrameFormat

Struct FrameFormat 

Source
pub struct FrameFormat {
    pub h26x_framing: Framing,
    pub parameter_set_insertion: ParameterSetInsertion,
    pub aac_framing: Framing,
}
Expand description

Configuration options controlling how depacketized frames are formatted.

Supplied via SetupOptions::frame_format.

This controls codec-specific framing (e.g. H.26x NAL unit framing, AAC framing) and parameter set insertion. Each codec picks out the knobs relevant to it and ignores the rest.

Preset constants are provided for common use cases:

  • FrameFormat::MP4 — suitable for writing ISO BMFF / .mp4 files.
  • FrameFormat::SIMPLE — self-describing output (Annex B + inline parameter sets for H.26x, ADTS for AAC), suitable for piping to a decoder without needing to handle extra data separately.

Fields§

§h26x_framing: Framing

How to frame H.26x NAL units.

§parameter_set_insertion: ParameterSetInsertion

When to insert parameter sets (SPS/PPS/VPS) into frame data.

§aac_framing: Framing

How to frame AAC audio.

Implementations§

Source§

impl FrameFormat

Source

pub const MP4: Self

Suitable for ISO BMFF / .mp4 files: 4-byte length-prefixed NALs, no inline parameter sets (they go in the sample entry), raw AAC.

Source

pub const SIMPLE: Self

Suitable for piping to a decoder without handling extra data separately: Annex B start codes, parameter sets prepended to every key frame, ADTS-wrapped AAC.

Trait Implementations§

Source§

impl Clone for FrameFormat

Source§

fn clone(&self) -> FrameFormat

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FrameFormat

Source§

impl Debug for FrameFormat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FrameFormat

Source§

fn default() -> FrameFormat

Returns the “default value” for a type. Read more
Source§

impl Eq for FrameFormat

Source§

impl PartialEq for FrameFormat

Source§

fn eq(&self, other: &FrameFormat) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FrameFormat

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V