Skip to main content

VideoPacketConfig

Struct VideoPacketConfig 

Source
#[non_exhaustive]
pub struct VideoPacketConfig { /* private fields */ }
Expand description

Per-stream video configuration delivered via on_stream_info — everything a WebCodecs VideoDecoder / fMP4 packager needs, precomputed.

Implementations§

Source§

impl VideoPacketConfig

Source

pub fn stream_index(&self) -> usize

Output stream index; matches PacketView::stream_index.

Source

pub fn codec_id(&self) -> AVCodecID

FFmpeg codec id (AV_CODEC_ID_H264 in the strict tier).

Source

pub fn codec_string(&self) -> &str

RFC 6381 codec string ("avc1.PPCCLL"), suitable as the WebCodecs codec value.

Source

pub fn profile(&self) -> u8

H.264 profile_idc (the avcC AVCProfileIndication; e.g. 66 = Baseline, 77 = Main, 100 = High). Same source as codec_string.

Source

pub fn compatibility(&self) -> u8

The avcC profile_compatibility byte (constraint-set flags).

Source

pub fn level(&self) -> u8

H.264 level_idc (the avcC AVCLevelIndication; e.g. 30 = level 3.0, 0x1F = level 3.1).

Source

pub fn codec_config(&self) -> &[u8]

The AVCDecoderConfigurationRecord (avcC), suitable as the WebCodecs description.

Source

pub fn extradata(&self) -> &[u8]

FFmpeg-oriented alias of codec_config.

Source

pub fn time_base(&self) -> AVRational

Time base every timestamp of this stream is expressed in (the encoder time base, passed through verbatim).

Source

pub fn width(&self) -> i32

Coded width in pixels.

Source

pub fn height(&self) -> i32

Coded height in pixels.

Source

pub fn sample_aspect_ratio(&self) -> Option<AVRational>

Sample aspect ratio, when known.

Source

pub fn frame_rate(&self) -> Option<AVRational>

Nominal frame rate. None when the pipeline did not pin one (VFR sources, and CFR jobs without an explicit output rate).

Trait Implementations§

Source§

impl Clone for VideoPacketConfig

Source§

fn clone(&self) -> VideoPacketConfig

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 Debug for VideoPacketConfig

Source§

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

Formats the value using the given formatter. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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

Source§

fn downcast(&self) -> &T

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

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

Source§

fn upcast(&self) -> Option<&T>

Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,