-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmdhd.h
45 lines (38 loc) · 1.04 KB
/
mdhd.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
//
// Created by wlanjie on 2018/3/9.
//
#ifndef MP4_MDHDATOM_H
#define MP4_MDHDATOM_H
#include "atom.h"
namespace mp4 {
/**
* 定义了媒体的特性,例如time scale和duration。
*/
class Mdhd : public Atom {
public:
static Mdhd* create(Size size, ByteStream& stream);
Mdhd(UI32 creationTime,
UI32 modificationTime,
UI32 timeScale,
UI64 duration,
const char* language);
virtual Result writeFields(ByteStream& stream);
UI32 getDurationMs() const;
UI64 getDuration() { return duration; }
void setDuration(UI64 duration) { this->duration = duration; }
UI32 getTimeScale() { return timeScale; }
void setTimeScale(UI32 timeScale) { this->timeScale = timeScale; }
const String& getLanguage() { return language; }
private:
Mdhd(UI32 size,
UI08 version,
UI32 flags,
ByteStream& stream);
UI64 creationTime;
UI64 modificationTime;
UI32 timeScale;
UI64 duration;
String language;
};
}
#endif //MP4_MDHDATOM_H