Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Encv & Enca to StsdBox #337

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mp4/stsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ type StsdBox struct {
HvcX *VisualSampleEntryBox
// Av01 is a pointer to a box with name av01
Av01 *VisualSampleEntryBox
// Encv is a pointer to a box with name encv
Encv *VisualSampleEntryBox
// Mp4a is a pointer to a box with name mp4a
Mp4a *AudioSampleEntryBox
// AC3 is a pointer to a box with name ac-3
AC3 *AudioSampleEntryBox
// EC3 is a pointer to a box with name ec-3
EC3 *AudioSampleEntryBox
// Enca is a pointer to a box with name enca
Enca *AudioSampleEntryBox
// Wvtt is a pointer to a WvttBox
Wvtt *WvttBox
// Stpp is a pointer to a StppBox
Expand All @@ -47,6 +51,8 @@ func (s *StsdBox) AddChild(box Box) {
s.AvcX = box.(*VisualSampleEntryBox)
case "hvc1", "hev1":
s.HvcX = box.(*VisualSampleEntryBox)
case "encv":
s.Encv = box.(*VisualSampleEntryBox)
case "av01":
s.Av01 = box.(*VisualSampleEntryBox)
case "mp4a":
Expand All @@ -55,6 +61,8 @@ func (s *StsdBox) AddChild(box Box) {
s.AC3 = box.(*AudioSampleEntryBox)
case "ec-3":
s.EC3 = box.(*AudioSampleEntryBox)
case "enca":
s.Enca = box.(*AudioSampleEntryBox)
case "wvtt":
s.Wvtt = box.(*WvttBox)
case "stpp":
Expand Down
Loading