forked from wlanjie/mp4
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontainer.h
66 lines (49 loc) · 1.54 KB
/
container.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// Created by wlanjie on 2018/2/7.
//
#ifndef MP4_CONTAINERATOM_H
#define MP4_CONTAINERATOM_H
#include "atom.h"
#include "atomfactory.h"
namespace mp4 {
class Container : public Atom, public AtomParent {
public:
// class methods
static Container *Create(Type type,
UI64 size,
bool isFull,
bool force64,
ByteStream &stream,
AtomFactory &factory);
// methods
explicit Container(Type type);
explicit Container(Type type, UI08 version, UI32 flags);
explicit Container(Type type, UI64 size, bool force64);
explicit Container(Type type, UI64 size, bool force64, UI08 version, UI32 flags);
Result writeFields(ByteStream &stream) override;
Atom *clone() override;
// AtomParent methods
void onChildChanged(Atom *child) override;
void onChildAdded(Atom *child) override;
void onChildRemoved(Atom *child) override;
protected:
// constructors
Container(Type type,
UI64 size,
bool force64,
UI08 version,
UI32 flags,
ByteStream &stream,
AtomFactory &factory);
Container(Type type,
UI64 size,
bool force64,
ByteStream &stream,
AtomFactory &factory);
// methods
void readChildren(AtomFactory &atom_factory,
ByteStream &stream,
UI64 size);
};
}
#endif //MP4_CONTAINERATOM_H