-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsampletable.h
37 lines (32 loc) · 1009 Bytes
/
sampletable.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
//
// Created by wlanjie on 2018/3/10.
//
#ifndef MP4_SAMPLETABLE_H
#define MP4_SAMPLETABLE_H
#include "types.h"
#include "container.h"
#include "sampledescription.h"
#include "sample.h"
#include "stsc.h"
#include "stco.h"
#include "stsz.h"
#include "stts.h"
#include "ctts.h"
#include "stsd.h"
#include "stss.h"
#include "co64.h"
namespace mp4 {
class SampleTable {
public:
virtual ~SampleTable(){};
virtual Result generateStbl(Container*& stbl);
virtual Cardinal getSampleCount() = 0;
virtual Result getSample(Ordinal sampleIndex, Sample& sample)= 0;
virtual Result getSampleChunkPosition(Ordinal sampleIndex, Ordinal& chunkIndex, Ordinal& positionInChunk) = 0;
virtual Cardinal getSampleDescriptionCount() = 0;
virtual SampleDescription* getSampleDescription(Ordinal index) = 0;
virtual Result getSampleIndexForTimeStamp(UI64 ts, Ordinal& index) = 0;
virtual Ordinal getNearestSyncSampleIndex(Ordinal index, bool before = true) = 0;
};
}
#endif //MP4_SAMPLETABLE_H