Skip to main content

TrackInfo

Struct TrackInfo 

Source
pub struct TrackInfo {
    pub track_id: u32,
    pub kind: TrackKind,
    pub timescale: u32,
    pub width: u32,
    pub height: u32,
    pub avcc: Option<Vec<u8>>,
    pub asc: Option<Vec<u8>>,
    pub edit_offset: i64,
    default_duration: u32,
    default_size: u32,
    default_flags: u32,
}
Expand description

初期化セグメント(moov)から分かるトラックの情報。

Fields§

§track_id: u32§kind: TrackKind§timescale: u32

mdhd の timescale(1 秒あたりの刻み)。

§width: u32

映像の幅・高さ(ピクセル。音声トラックまたは不明なら 0)。

§height: u32§avcc: Option<Vec<u8>>

H.264 の avcC(映像)。

§asc: Option<Vec<u8>>

AAC の AudioSpecificConfig(音声)。

§edit_offset: i64

edit list(edts/elst)の最初の空でない編集の media_time(timescale 単位)。表示時刻から引く。 【2026-10-24】Chrome の MSE と同じく反映する。B フレームのある映像は先頭が 2 フレームぶん後ろに ずれて buffered が 0.04 秒から始まり、YouTube の player は先頭の区間を持っていないとみなして SABR で同じ区間を要求し続け、再生が 20 秒ほどで止まっていた。

§default_duration: u32§default_size: u32§default_flags: u32

Implementations§

Source§

impl TrackInfo

Source

pub fn new( track_id: u32, kind: TrackKind, timescale: u32, width: u32, height: u32, ) -> Self

コーデックの設定(avcC・ASC)と edit list がまだ分かっていないトラック。 moov の解析はこれを作ってから分かった項目を埋める。

Trait Implementations§

Source§

impl Clone for TrackInfo

Source§

fn clone(&self) -> Self

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 TrackInfo

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<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> 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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.