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 #ifndef __TrackExtendsAtom_H__ 19 #define __TrackExtendsAtom_H__ 20 21 #include "fullatom.h" 22 #include "a_atomdefs.h" 23 #include "atomutils.h" 24 25 class PVA_FF_TrackExtendsAtom : public PVA_FF_FullAtom 26 { 27 28 public: 29 PVA_FF_TrackExtendsAtom(uint32 mediaType, int32 codecType, uint32 trackId); 30 31 virtual ~PVA_FF_TrackExtendsAtom(); 32 33 // To set parameters according to codec 34 void setSampleParameters(uint32 index, uint32 duration, uint32 size, uint32 flags); 35 36 uint32 getTrackId(); 37 38 void setTrackId(uint32 trackId); 39 40 virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP* fp); 41 42 private: 43 uint32 _mediaType; 44 int32 _codecType; 45 46 uint32 _trackId; 47 uint32 _defaultSampleDescriptionIndex; 48 uint32 _defaultSampleDuration; 49 uint32 _defaultSampleSize; 50 uint32 _defaultSampleFlags; 51 52 virtual void recomputeSize(); 53 54 }; 55 56 #endif 57