-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathatom_sampletable.h
44 lines (37 loc) · 1.34 KB
/
atom_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
38
39
40
41
42
43
44
//
// Created by wlanjie on 2018/3/11.
//
#ifndef MP4_ATOMSAMPLETABLE_H
#define MP4_ATOMSAMPLETABLE_H
#include "sampletable.h"
#include "stz2.h"
namespace mp4 {
class AtomSampleTable : public SampleTable {
public:
AtomSampleTable(Container* stbl, ByteStream& stream);
virtual ~AtomSampleTable();
virtual Result getSample(Ordinal sampleIndex, Sample& sample);
virtual Cardinal getSampleCount();
virtual SampleDescription* getSampleDescription(Ordinal index);
virtual Cardinal getSampleDescriptionCount();
virtual Result getSampleChunkPosition(Ordinal sampleIndex, Ordinal& chunkIndex, Ordinal& positionInChunk);
virtual Result getSampleIndexForTimeStamp(UI64 ts, Ordinal& sampleIndex);
virtual Ordinal getNearestSyncSampleIndex(Ordinal index, bool before = true);
virtual Result getChunkForSample(Ordinal sampleIndex, Ordinal& chunkIndex, Ordinal& positionInChunk, Ordinal& sampleDescriptionIndex);
virtual Result getChunkOffset(Ordinal chunkIndex, Position& offset);
virtual Result setChunkOffset(Ordinal chunkIndex, Position offset);
virtual Result setSampleSize(Ordinal sampleIndex, Size size);
private:
ByteStream& stream;
Stsc* stsc;
Stco* stco;
Stsz* stsz;
Stz2* stz2;
Stts* stts;
Ctts* ctts;
Stsd* stsd;
Stss* stss;
Co64* co64;
};
}
#endif //MP4_ATOMSAMPLETABLE_H