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 This PVA_FF_DataReferenceAtom Class contains a table of data references which declare 20 the location of the media data used within the MPEG-4 presentation. 21 */ 22 23 24 #ifndef __DataReferenceAtom_H__ 25 #define __DataReferenceAtom_H__ 26 27 #include "fullatom.h" 28 #include "dataentryatom.h" 29 30 class PVA_FF_DataReferenceAtom : public PVA_FF_FullAtom 31 { 32 33 public: 34 PVA_FF_DataReferenceAtom(); // Constructor 35 virtual ~PVA_FF_DataReferenceAtom(); 36 37 // Member gets and sets 38 uint32 getEntryCount() const 39 { 40 return _entryCount; 41 } 42 43 // Adding atoms to and getting the vector of DataEntryAtoms 44 void addDataEntryAtom(PVA_FF_DataEntryAtom *atom); 45 46 Oscl_Vector<PVA_FF_DataEntryAtom*, OsclMemAllocator>& getDataEntryVec() const 47 { 48 return *_pdataEntryVec; 49 } 50 Oscl_Vector<PVA_FF_DataEntryAtom*, OsclMemAllocator>& getMutableDataEntryVec() 51 { 52 return *_pdataEntryVec; 53 } 54 55 // Rendering the PVA_FF_Atom in proper format (bitlengths, etc.) to an ostream 56 virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP *fp); 57 58 private: 59 void init(); 60 virtual void recomputeSize(); 61 62 uint32 _entryCount; 63 Oscl_Vector<PVA_FF_DataEntryAtom*, OsclMemAllocator> *_pdataEntryVec; // Careful with vector access and cleanup! 64 65 }; 66 67 68 #endif 69 70