| 1 | /***************************************************************** |
| 2 | | |
| 3 | | AP4 - co64 Atoms |
| 4 | | |
| 5 | | Copyright 2002-2008 Axiomatic Systems, LLC |
| 6 | | |
| 7 | | |
| 8 | | This file is part of Bento4/AP4 (MP4 Atom Processing Library). |
| 9 | | |
| 10 | | Unless you have obtained Bento4 under a difference license, |
| 11 | | this version of Bento4 is Bento4|GPL. |
| 12 | | Bento4|GPL is free software; you can redistribute it and/or modify |
| 13 | | it under the terms of the GNU General Public License as published by |
| 14 | | the Free Software Foundation; either version 2, or (at your option) |
| 15 | | any later version. |
| 16 | | |
| 17 | | Bento4|GPL is distributed in the hope that it will be useful, |
| 18 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | | GNU General Public License for more details. |
| 21 | | |
| 22 | | You should have received a copy of the GNU General Public License |
| 23 | | along with Bento4|GPL; see the file COPYING. If not, write to the |
| 24 | | Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
| 25 | | 02111-1307, USA. |
| 26 | | |
| 27 | ****************************************************************/ |
| 28 | |
| 29 | #ifndef _AP4_CO64_ATOM_H_ |
| 30 | #define _AP4_CO64_ATOM_H_ |
| 31 | |
| 32 | /*---------------------------------------------------------------------- |
| 33 | | includes |
| 34 | +---------------------------------------------------------------------*/ |
| 35 | #include "Ap4Types.h" |
| 36 | #include "Ap4Atom.h" |
| 37 | |
| 38 | /*---------------------------------------------------------------------- |
| 39 | | AP4_Co64Atom |
| 40 | +---------------------------------------------------------------------*/ |
| 41 | class AP4_Co64Atom : public AP4_Atom |
| 42 | { |
| 43 | public: |
| 44 | AP4_IMPLEMENT_DYNAMIC_CAST_D(AP4_Co64Atom, AP4_Atom) |
| 45 | |
| 46 | // class methods |
| 47 | static AP4_Co64Atom* Create(AP4_Size size, AP4_ByteStream& stream); |
| 48 | |
| 49 | // methods |
| 50 | AP4_Co64Atom(AP4_UI64* offsets, AP4_UI32 offset_count); |
| 51 | ~AP4_Co64Atom(); |
| 52 | virtual AP4_Result InspectFields(AP4_AtomInspector& inspector); |
| 53 | virtual AP4_Result WriteFields(AP4_ByteStream& stream); |
| 54 | AP4_Cardinal GetChunkCount() { return m_EntryCount; } |
| 55 | AP4_UI64* GetChunkOffsets() { return m_Entries; } |
| 56 | AP4_Result GetChunkOffset(AP4_Ordinal chunk, AP4_UI64& chunk_offset); |
| 57 | AP4_Result SetChunkOffset(AP4_Ordinal chunk, AP4_UI64 chunk_offset); |
| 58 | AP4_Result AdjustChunkOffsets(AP4_SI64 delta); |
| 59 | |
| 60 | private: |
| 61 | // methods |
| 62 | AP4_Co64Atom(AP4_UI32 size, |
| 63 | AP4_UI08 version, |
| 64 | AP4_UI32 flags, |
| 65 | AP4_ByteStream& stream); |
| 66 | |
| 67 | // members |
| 68 | AP4_UI64* m_Entries; |
| 69 | AP4_UI32 m_EntryCount; |
| 70 | }; |
| 71 | |
| 72 | #endif // _AP4_CO64_ATOM_H_ |