Skip to content

Commit

Permalink
Merge pull request #25 from abema/all-box-test
Browse files Browse the repository at this point in the history
Create test cases for all box types
  • Loading branch information
sunfish-shogi authored Jul 28, 2020
2 parents 1c1ec59 + f68508f commit 9ebcc25
Show file tree
Hide file tree
Showing 4 changed files with 869 additions and 121 deletions.
14 changes: 5 additions & 9 deletions box_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,13 @@ func init() {

// Mdhd is ISOBMFF mdhd box type
type Mdhd struct {
FullBox `mp4:"extend"`
// Version 0
FullBox `mp4:"extend"`
CreationTimeV0 uint32 `mp4:"size=32,ver=0"`
ModificationTimeV0 uint32 `mp4:"size=32,ver=0"`
TimescaleV0 uint32 `mp4:"size=32,ver=0"`
DurationV0 uint32 `mp4:"size=32,ver=0"`
// Version 1
CreationTimeV1 uint64 `mp4:"size=64,ver=1"`
ModificationTimeV1 uint64 `mp4:"size=64,ver=1"`
TimescaleV1 uint32 `mp4:"size=32,ver=1"`
Timescale uint32 `mp4:"size=32"`
DurationV0 uint32 `mp4:"size=32,ver=0"`
DurationV1 uint64 `mp4:"size=64,ver=1"`
//
Pad bool `mp4:"size=1"`
Expand Down Expand Up @@ -682,11 +679,10 @@ type Mvhd struct {
FullBox `mp4:"extend"`
CreationTimeV0 uint32 `mp4:"size=32,ver=0"`
ModificationTimeV0 uint32 `mp4:"size=32,ver=0"`
TimescaleV0 uint32 `mp4:"size=32,ver=0"`
DurationV0 uint32 `mp4:"size=32,ver=0"`
CreationTimeV1 uint64 `mp4:"size=64,ver=1"`
ModificationTimeV1 uint64 `mp4:"size=64,ver=1"`
TimescaleV1 uint32 `mp4:"size=32,ver=1"`
Timescale uint32 `mp4:"size=32"`
DurationV0 uint32 `mp4:"size=32,ver=0"`
DurationV1 uint64 `mp4:"size=64,ver=1"`
Rate int32 `mp4:"size=32"` // template=0x00010000
Volume int16 `mp4:"size=16"` // template=0x0100
Expand Down
Loading

0 comments on commit 9ebcc25

Please sign in to comment.