Skip to content

Commit

Permalink
move boxes into go-mp4
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Sep 27, 2023
1 parent 721b24f commit 77460f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
35 changes: 0 additions & 35 deletions pkg/formats/fmp4/boxes.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/formats/fmp4/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func (i *Init) Unmarshal(byts []byte) error {
if err != nil {
return nil, err
}
dac3 := box.(*Dac3)
dac3 := box.(*mp4.Dac3)

curTrack.Codec = &CodecAC3{
SampleRate: sampleRate,
Expand Down
10 changes: 5 additions & 5 deletions pkg/formats/fmp4/init_track.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func (track *InitTrack) marshal(w *mp4Writer) error {
_, err = w.writeBoxStart(&mp4.VisualSampleEntry{ // <mp4v>
SampleEntry: mp4.SampleEntry{
AnyTypeBox: mp4.AnyTypeBox{
Type: BoxTypeMp4v(),
Type: mp4.BoxTypeMp4v(),
},
DataReferenceIndex: 1,
},
Expand Down Expand Up @@ -538,7 +538,7 @@ func (track *InitTrack) marshal(w *mp4Writer) error {
_, err = w.writeBoxStart(&mp4.VisualSampleEntry{ // <mp4v>
SampleEntry: mp4.SampleEntry{
AnyTypeBox: mp4.AnyTypeBox{
Type: BoxTypeMp4v(),
Type: mp4.BoxTypeMp4v(),
},
DataReferenceIndex: 1,
},
Expand Down Expand Up @@ -594,7 +594,7 @@ func (track *InitTrack) marshal(w *mp4Writer) error {
_, err = w.writeBoxStart(&mp4.VisualSampleEntry{ // <mp4v>
SampleEntry: mp4.SampleEntry{
AnyTypeBox: mp4.AnyTypeBox{
Type: BoxTypeMp4v(),
Type: mp4.BoxTypeMp4v(),
},
DataReferenceIndex: 1,
},
Expand Down Expand Up @@ -771,7 +771,7 @@ func (track *InitTrack) marshal(w *mp4Writer) error {
_, err = w.writeBoxStart(&mp4.AudioSampleEntry{ // <ac-3>
SampleEntry: mp4.SampleEntry{
AnyTypeBox: mp4.AnyTypeBox{
Type: BoxTypeAC3(),
Type: mp4.BoxTypeAC3(),
},
DataReferenceIndex: 1,
},
Expand All @@ -783,7 +783,7 @@ func (track *InitTrack) marshal(w *mp4Writer) error {
return err
}

_, err = w.writeBox(&Dac3{ // <dac3/>
_, err = w.writeBox(&mp4.Dac3{ // <dac3/>
Fscod: codec.Fscod,
Bsid: codec.Bsid,
Bsmod: codec.Bsmod,
Expand Down

0 comments on commit 77460f6

Please sign in to comment.