pub struct Fmp4Demuxer {
pub tracks: Vec<TrackInfo>,
buf: Vec<u8>,
buf_pos: u64,
pending: Vec<PendingSample>,
next_dts: Vec<(u32, u64)>,
}Expand description
fMP4 デマルチプレクサ。バイト列を順に push する。
Fields§
§tracks: Vec<TrackInfo>§buf: Vec<u8>まだ完結していないボックスのバイト列(buf_pos はその先頭のストリーム上の位置)。
buf_pos: u64§pending: Vec<PendingSample>直前の moof から求めたサンプル(次の mdat で中身を取り出す)。
next_dts: Vec<(u32, u64)>トラックごとの次の復号時刻(tfdt が無いフラグメントの続きに使う)。
Implementations§
Source§impl Fmp4Demuxer
impl Fmp4Demuxer
pub fn new() -> Self
pub fn track(&self, id: u32) -> Option<&TrackInfo>
Sourcepub fn push(&mut self, bytes: &[u8]) -> Result<Vec<FragSample>, &'static str>
pub fn push(&mut self, bytes: &[u8]) -> Result<Vec<FragSample>, &'static str>
バイト列を追加し、取り出せたサンプル(復号順)を返す。
fn parse_moov(&mut self, moov: &[u8]) -> Result<(), &'static str>
Trait Implementations§
Source§impl Default for Fmp4Demuxer
impl Default for Fmp4Demuxer
Source§fn default() -> Fmp4Demuxer
fn default() -> Fmp4Demuxer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Fmp4Demuxer
impl RefUnwindSafe for Fmp4Demuxer
impl Send for Fmp4Demuxer
impl Sync for Fmp4Demuxer
impl Unpin for Fmp4Demuxer
impl UnsafeUnpin for Fmp4Demuxer
impl UnwindSafe for Fmp4Demuxer
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