feat: movie extends box
This commit is contained in:
parent
27e34124ed
commit
29e84abf5b
2 changed files with 56 additions and 1 deletions
55
MovieExtendsBox.go
Normal file
55
MovieExtendsBox.go
Normal file
|
@ -0,0 +1,55 @@
|
|||
// Copyright 2024 Martin Riedl
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package gomp4
|
||||
|
||||
// MovieExtendsBox Movie Extends Box struct
|
||||
//
|
||||
// 8.8.1 Movie Extends Box
|
||||
//
|
||||
// Box Type: ‘mvex’
|
||||
// Container: Movie Box (‘moov’)
|
||||
// Mandatory: No
|
||||
// Quantity: Zero or one
|
||||
//
|
||||
// This box warns readers that there might be Movie Fragment Boxes in this file. To know of all samples in
|
||||
// the tracks, these Movie Fragment Boxes must be found and scanned in order, and their information
|
||||
// logically added to that found in the Movie Box.
|
||||
type MovieExtendsBox struct {
|
||||
*Box
|
||||
ChildBoxes []any
|
||||
}
|
||||
|
||||
// BoxTypeMovieExtends Movie Extends Box
|
||||
const BoxTypeMovieExtends = "mvex"
|
||||
|
||||
func init() {
|
||||
BoxDefinitions = append(BoxDefinitions, BoxDefinition{
|
||||
Type: BoxTypeMovieExtends,
|
||||
ParentTypes: []string{BoxTypeMovie},
|
||||
Parser: ParseMovieExtendsBox,
|
||||
})
|
||||
}
|
||||
|
||||
// ParseMovieExtendsBox creates a new movie extends box struct based on bytes
|
||||
func ParseMovieExtendsBox(parser *Parser, filePosition uint64, headerSize uint32, content []byte) (any, error) {
|
||||
box := &MovieExtendsBox{
|
||||
Box: &Box{filePosition, headerSize},
|
||||
}
|
||||
|
||||
// parse child boxes
|
||||
var err error
|
||||
box.ChildBoxes, err = box.parseChildBoxes(parser, BoxTypeMovieExtends, filePosition, content)
|
||||
return box, err
|
||||
}
|
|
@ -56,7 +56,7 @@ Implementation progress of ISO/IEC 14496-12:2015:
|
|||
| 8.7.7 Sub-Sample Information Box | subs | - |
|
||||
| 8.7.8 Sample Auxiliary Information Sizes Box | saiz | - |
|
||||
| 8.7.9 Sample Auxiliary Information Offsets Box | saio | - |
|
||||
| 8.8.1 Movie Extends Box | mvex | - |
|
||||
| 8.8.1 Movie Extends Box | mvex | 100% |
|
||||
| 8.8.2 Movie Extends Header Box | mehd | - |
|
||||
| 8.8.3 Track Extends Box | trex | - |
|
||||
| 8.8.4 Movie Fragment Box | moof | 100% |
|
||||
|
|
Loading…
Add table
Reference in a new issue