-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmovie.h
39 lines (33 loc) · 813 Bytes
/
movie.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
//
// Created by wlanjie on 2018/3/14.
//
#ifndef MP4_MOVIE_H
#define MP4_MOVIE_H
#include "types.h"
#include "moov.h"
#include "mvhd.h"
#include "track.h"
namespace mp4 {
class Movie {
public:
Movie(UI32 timeScale = 0, UI64 duration = 0);
Movie(Moov* moov, ByteStream& stream, bool transferMoovOwnerShip = true);
virtual ~Movie();
Moov* getMoov() { return moov; }
Mvhd* getMvhd() { return mvhd; }
List<Track>& getTracks() { return tracks; }
Track* getTrack(UI32 trackId);
Track* getTrack(Track::Type type, Ordinal index = 0);
Result addTrack(Track* track);
UI32 getTimeScale();
UI64 getDuration();
UI32 getDurationMs();
bool hasFragments();
private:
Moov* moov;
bool moovIsOwned;
Mvhd* mvhd;
List<Track> tracks;
};
}
#endif //MP4_MOVIE_H