diff --git a/src/mp4box/mod.rs b/src/mp4box/mod.rs index 0af14b5..f276222 100644 --- a/src/mp4box/mod.rs +++ b/src/mp4box/mod.rs @@ -86,6 +86,7 @@ pub(crate) mod mp4a; pub(crate) mod mvex; pub(crate) mod mvhd; pub(crate) mod smhd; +pub(crate) mod soun; pub(crate) mod stbl; pub(crate) mod stco; pub(crate) mod stsc; @@ -198,7 +199,8 @@ boxtype! { DayBox => 0xa9646179, CovrBox => 0x636f7672, DescBox => 0x64657363, - WideBox => 0x77696465 + WideBox => 0x77696465, + SounBox => 0x736F756E } pub trait Mp4Box: Sized { diff --git a/src/mp4box/soun.rs b/src/mp4box/soun.rs new file mode 100644 index 0000000..e2b79c9 --- /dev/null +++ b/src/mp4box/soun.rs @@ -0,0 +1,32 @@ +use serde::Serialize; + +use crate::mp4box::*; + +// for opus +// https://opus-codec.org/docs/opus_in_isobmff.html +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +pub struct SounBox {} + +impl Default for SounBox { + fn default() -> Self { + Self {} + } +} + +impl Mp4Box for SounBox { + fn box_type(&self) -> BoxType { + BoxType::SounBox + } + + fn box_size(&self) -> u64 { + todo!() + } + + fn to_json(&self) -> Result { + serde_json::to_string(&self).map_err(|e| crate::error::Error::IoError(e.into())) + } + + fn summary(&self) -> Result { + todo!() + } +}