forked from andrewzeneski/mp4
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathiods.go
More file actions
41 lines (35 loc) · 645 Bytes
/
Copy pathiods.go
File metadata and controls
41 lines (35 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package mp4
import (
"io"
)
// Object Descriptor Container Box (iods - optional)
//
// Contained in : Movie Box (‘moov’)
//
// Status: not decoded
type IodsBox struct {
notDecoded []byte
}
func DecodeIods(r io.Reader, size uint64) (Box, error) {
data, err := read(r, size)
if err != nil {
return nil, err
}
return &IodsBox{
notDecoded: data,
}, nil
}
func (b *IodsBox) Type() string {
return "iods"
}
func (b *IodsBox) Size() uint64 {
return uint64(len(b.notDecoded))
}
func (b *IodsBox) Encode(w io.Writer) error {
err := EncodeHeader(b, w)
if err != nil {
return err
}
_, err = w.Write(b.notDecoded)
return err
}