Ap4AtomSampleTable.h

00001 /*****************************************************************
00002 |
00003 |    AP4 - Atom Based Sample Table
00004 |
00005 |    Copyright 2003 Gilles Boccon-Gibod & Julien Boeuf
00006 |
00007 |
00008 |    This atom is part of AP4 (MP4 Audio Proatom Library).
00009 |
00010 |    Unless you have obtained Bento4 under a difference license,
00011 |    this version of Bento4 is Bento4|GPL.
00012 |    Bento4|GPL is free software; you can redistribute it and/or modify
00013 |    it under the terms of the GNU General Public License as published by
00014 |    the Free Software Foundation; either version 2, or (at your option)
00015 |    any later version.
00016 |
00017 |    Bento4|GPL is distributed in the hope that it will be useful,
00018 |    but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 |    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 |    GNU General Public License for more details.
00021 |
00022 |    You should have received a copy of the GNU General Public License
00023 |    along with Bento4|GPL; see the atom COPYING.  If not, write to the
00024 |    Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
00025 |    02111-1307, USA.
00026 |
00027  ****************************************************************/
00028 
00029 #ifndef _AP4_ATOM_SAMPLE_TABLE_H_
00030 #define _AP4_ATOM_SAMPLE_TABLE_H_
00031 
00032 /*----------------------------------------------------------------------
00033 |       includes
00034 +---------------------------------------------------------------------*/
00035 #include "Ap4Types.h"
00036 #include "Ap4SampleTable.h"
00037 
00038 /*----------------------------------------------------------------------
00039 |       forward declarations
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 |       AP4_AtomSampleTable
00054 +---------------------------------------------------------------------*/
00055 class AP4_AtomSampleTable : public AP4_SampleTable
00056 {
00057  public:
00058     // methods
00059              AP4_AtomSampleTable(AP4_ContainerAtom* stbl_atom, 
00060                                  AP4_ByteStream&    sample_stream);
00061     virtual ~AP4_AtomSampleTable();
00062 
00063     // AP4_SampleTable methods
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     // members
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_

Generated on Tue Dec 13 14:47:19 2005 for guliverkli by  doxygen 1.4.5