1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 /*********************************************************************************/ 19 /* ------------------------------------------------------------------- */ 20 /* MPEG-4 ChunkLargeOffsetAtom Class */ 21 /* ------------------------------------------------------------------- */ 22 /*********************************************************************************/ 23 /* 24 This ChunkLargeOffsetAtom Class gives the index of each chunk into the 25 containing file. 26 */ 27 28 29 #ifndef CHUNKLARGEOFFSETATOM_H_INCLUDED 30 #define CHUNKLARGEOFFSETATOM_H_INCLUDED 31 32 #ifndef OSCL_FILE_IO_H_INCLUDED 33 #include "oscl_file_io.h" 34 #endif 35 36 #ifndef FULLATOM_H_INCLUDED 37 #include "fullatom.h" 38 #endif 39 40 class ChunkLargeOffsetAtom : public FullAtom 41 { 42 43 public: 44 ChunkLargeOffsetAtom(uint8 version, uint32 flags); // Constructor 45 ChunkLargeOffsetAtom(ChunkLargeOffsetAtom atom); // Copy Constructor 46 virtual ~ChunkLargeOffsetAtom(); 47 48 // Member gets and sets getEntryCount()49 uint32 getEntryCount() 50 { 51 return _entryCount; 52 } setEntryCount(uint32 count)53 void setEntryCount(uint32 count) 54 { 55 _entryCount = count; 56 } 57 58 // Adding to and getting first chunk offset values 59 void addChunkOffset(uint64 offset); getChunkOffsets()60 vector<uint64>* getChunkOffsets() 61 { 62 return _pchunkOffsets; 63 } 64 65 // Rendering the Atom in proper format (bitlengths, etc.) to an ostream 66 virtual void renderToFileStream(ofstream &os); 67 // Reading in the Atom components from an input stream 68 virtual void readFromFileStream(ifstream &is); 69 70 71 private: 72 uint32 _entryCount; 73 vector<uint64>* _pchunkOffsets; 74 75 }; 76 77 78 #endif // CHUNKLARGEOFFSETATOM_H_INCLUDED 79