From 1e5bf0d21dea45c82b2bc282db8619b99216f681 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Tue, 17 Oct 2023 16:06:48 +0500 Subject: [PATCH] mp4 mvhd syntax --- src/muxer/hls/mp4/atoms.rs | 34 ++++++++++++++++++++++++++++++++++ src/muxer/hls/mp4/mod.rs | 1 + 2 files changed, 35 insertions(+) diff --git a/src/muxer/hls/mp4/atoms.rs b/src/muxer/hls/mp4/atoms.rs index e69de29..438c60b 100644 --- a/src/muxer/hls/mp4/atoms.rs +++ b/src/muxer/hls/mp4/atoms.rs @@ -0,0 +1,34 @@ +struct WindowMatrix { + A: u32, + B: u32, + U: u32, + C: u32, + D: u32, + V: u32, + X: u32, + Y: u32, + W: u32, +} + +struct MOOV { + mvhd: MVHD, + traks: [TRAK; 2], + mvex: MVEX, +} + +struct MVHD { + version: u8, + flags: u32, + create_time: u64, + modify_time: u64, + time_scale: u32, + duration: u64, + playrate: u32, + volume: u16, + matrix: WindowMatrix, + next_track_id: u32, +} + +struct TRAK; + +struct MVEX; diff --git a/src/muxer/hls/mp4/mod.rs b/src/muxer/hls/mp4/mod.rs index 29d5e1f..1f6dcbe 100644 --- a/src/muxer/hls/mp4/mod.rs +++ b/src/muxer/hls/mp4/mod.rs @@ -1,4 +1,5 @@ mod mp4muxer; +mod atoms; use std::sync::{mpsc, Arc}; use std::error::Error;