00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _AP4_ATOM_SAMPLE_TABLE_H_
00030 #define _AP4_ATOM_SAMPLE_TABLE_H_
00031
00032
00033
00034
00035 #include "Ap4Types.h"
00036 #include "Ap4SampleTable.h"
00037
00038
00039
00040
00041 class AP4_Atom;
00042 class AP4_ByteStream;
00043 class AP4_StscAtom;
00044 class AP4_StcoAtom;
00045 class AP4_Co64Atom;
00046 class AP4_StszAtom;
00047 class AP4_SttsAtom;
00048 class AP4_CttsAtom;
00049 class AP4_StssAtom;
00050 class AP4_StsdAtom;
00051
00052
00053
00054
00055 class AP4_AtomSampleTable : public AP4_SampleTable
00056 {
00057 public:
00058
00059 AP4_AtomSampleTable(AP4_ContainerAtom* stbl_atom,
00060 AP4_ByteStream& sample_stream);
00061 virtual ~AP4_AtomSampleTable();
00062
00063
00064 virtual AP4_Result GetSample(AP4_Ordinal index, AP4_Sample& sample);
00065 virtual AP4_Cardinal GetSampleCount();
00066 virtual AP4_SampleDescription* GetSampleDescription(AP4_Ordinal index);
00067 virtual AP4_Cardinal GetSampleDescriptionCount();
00068 virtual AP4_Result GetChunkForSample(AP4_Ordinal sample,
00069 AP4_Ordinal& chunk,
00070 AP4_Ordinal& skip,
00071 AP4_Ordinal& sample_description);
00072 virtual AP4_Result GetChunkOffset(AP4_Ordinal chunk, AP4_Offset& offset);
00073 virtual AP4_Result SetChunkOffset(AP4_Ordinal chunk, AP4_Offset offset);
00074 virtual AP4_Result SetSampleSize(AP4_Ordinal sample, AP4_Size size);
00075 virtual AP4_Result GetSampleIndexForTimeStamp(AP4_TimeStamp ts,
00076 AP4_Ordinal& index);
00077
00078 private:
00079
00080 AP4_ByteStream& m_SampleStream;
00081 AP4_StscAtom* m_StscAtom;
00082 AP4_StcoAtom* m_StcoAtom;
00083 AP4_Co64Atom* m_Co64Atom;
00084 AP4_StszAtom* m_StszAtom;
00085 AP4_SttsAtom* m_SttsAtom;
00086 AP4_CttsAtom* m_CttsAtom;
00087 AP4_StsdAtom* m_StsdAtom;
00088 AP4_StssAtom* m_StssAtom;
00089 };
00090
00091 #endif // _AP4_ATOM_SAMPLE_TABLE_H_