Skip to main content

mp4_edit/atom/container/
gmhd.rs

1use crate::{
2    atom::atom_ref::{AtomRef, AtomRefMut},
3    Atom, FourCC,
4};
5
6pub const GMHD: FourCC = FourCC::new(b"gmhd");
7
8#[derive(Debug, Clone, Copy)]
9pub struct GmhdAtomRef<'a>(pub(crate) AtomRef<'a>);
10
11impl<'a> GmhdAtomRef<'a> {
12    pub fn children(&self) -> impl Iterator<Item = &'a Atom> {
13        self.0.children()
14    }
15
16    // TODO: gmin
17    // TODO: text
18}
19
20#[derive(Debug)]
21pub struct GmhdAtomRefMut<'a>(pub(crate) AtomRefMut<'a>);
22
23impl<'a> GmhdAtomRefMut<'a> {
24    pub fn as_ref(&self) -> GmhdAtomRef<'_> {
25        GmhdAtomRef(self.0.as_ref())
26    }
27
28    pub fn into_ref(self) -> GmhdAtomRef<'a> {
29        GmhdAtomRef(self.0.into_ref())
30    }
31
32    pub fn into_children(self) -> impl Iterator<Item = &'a mut Atom> {
33        self.0.into_children()
34    }
35
36    // TODO: gmin
37    // TODO: text
38}