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 __AVCSubSeqDescriptionEntry_H__ 19 #define __AVCSubSeqDescriptionEntry_H__ 20 21 #include "atom.h" 22 #include "atomutils.h" 23 #include "oscl_file_io.h" 24 25 26 class DependencyInfo 27 { 28 29 public: 30 DependencyInfo(MP4_FF_FILE *fp); ~DependencyInfo()31 ~DependencyInfo() {}; 32 getSubSeqCount()33 uint8 getSubSeqCount() 34 { 35 return _subSeqCount; 36 } 37 getlayerNumber()38 uint8 getlayerNumber() 39 { 40 return _layerNumber; 41 } 42 getSubSequenceIdentifier()43 uint16 getSubSequenceIdentifier() 44 { 45 return _subSequenceIdentifier; 46 } 47 48 private: 49 uint8 _subSeqCount; 50 uint8 _layerNumber; 51 uint16 _subSequenceIdentifier; 52 }; 53 54 55 56 class AVCSubSequenceEntry : public Atom 57 { 58 59 public: 60 AVCSubSequenceEntry(MP4_FF_FILE *fp, uint32 size, uint32 type); 61 virtual ~AVCSubSequenceEntry(); 62 getSubSequenceIdentifier()63 uint16 getSubSequenceIdentifier() 64 { 65 return _subSequenceIdentifier; 66 } 67 getlayerNumber()68 uint8 getlayerNumber() 69 { 70 return _layerNumber; 71 } 72 getDurationFlag()73 uint8 getDurationFlag() 74 { 75 return _durationFlag; 76 } 77 getAvgRateFlag()78 uint8 getAvgRateFlag() 79 { 80 return _avgRateFlag; 81 } 82 getDuration()83 uint32 getDuration() 84 { 85 if (_durationFlag) 86 return _duration; 87 return 0; 88 } 89 getAccurateStatisticsFlag()90 uint8 getAccurateStatisticsFlag() 91 { 92 if (_avgRateFlag) 93 return _accurateStatisticsFlag; 94 return 0; 95 } 96 getAvgBitRate()97 uint16 getAvgBitRate() 98 { 99 if (_avgRateFlag) 100 return _avgBitRate; 101 return 0; 102 } 103 getAvgFrameRate()104 uint16 getAvgFrameRate() 105 { 106 if (_avgRateFlag) 107 return _avgFrameRate; 108 return 0; 109 } 110 111 112 private: 113 uint16 _subSequenceIdentifier; 114 uint8 _layerNumber; 115 uint8 _durationFlag; 116 uint8 _avgRateFlag; 117 uint8 _reserved; 118 uint32 _duration; 119 uint8 _accurateStatisticsFlag; 120 uint16 _avgBitRate; 121 uint16 _avgFrameRate; 122 uint8 numReferences; 123 DependencyInfo *dependencyinfo; 124 125 126 }; 127 128 129 #endif 130