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 #ifndef H264_PAYLOAD_INFO_H 20 #define H264_PAYLOAD_INFO_H 21 22 #include "payload_info.h" 23 24 #define PVMF_SDP_DEFAULT_H264_SAMPLE_RATE 90000 25 26 class H264PayloadSpecificInfoType : public PayloadSpecificInfoTypeBase 27 { 28 public: H264PayloadSpecificInfoType(int payload)29 H264PayloadSpecificInfoType(int payload) 30 { 31 payloadNumber = payload; 32 33 max_mbps = -1; 34 max_fs = -1; 35 max_cpb = -1; 36 max_dpb = -1; 37 max_br = -1; 38 redundant_pic_cap = -1; 39 packetization_mode = -1; 40 sprop_interleaving_depth = 0; 41 deint_buf_cap = -1; 42 sprop_deint_buf_req = -1; 43 sprop_init_buf_time = -1; 44 sprop_max_don_diff = -1; 45 max_rcmd_nalu_size = -1; 46 }; 47 setMaxMbps(int val)48 inline void setMaxMbps(int val) 49 { 50 max_mbps = (int)val; 51 }; 52 getMaxMbps()53 inline int getMaxMbps() 54 { 55 return max_mbps; 56 }; 57 setMaxFs(int val)58 inline void setMaxFs(int val) 59 { 60 max_fs = (int)val; 61 }; 62 getMaxFs()63 inline int getMaxFs() 64 { 65 return max_fs; 66 }; 67 setMaxCpb(int val)68 inline void setMaxCpb(int val) 69 { 70 max_cpb = (int)val; 71 }; 72 getMaxCpb()73 inline int getMaxCpb() 74 { 75 return max_cpb; 76 }; 77 setMaxDpb(int val)78 inline void setMaxDpb(int val) 79 { 80 max_dpb = (int)val; 81 }; 82 getMaxDpb()83 inline int getMaxDpb() 84 { 85 return max_dpb; 86 }; 87 setMaxBr(int val)88 inline void setMaxBr(int val) 89 { 90 max_br = (int)val; 91 }; 92 getMaxBr()93 inline int getMaxBr() 94 { 95 return max_br; 96 }; 97 setRedundantPicCap(int val)98 inline void setRedundantPicCap(int val) 99 { 100 redundant_pic_cap = (int)val; 101 }; 102 getRedundantPicCap()103 inline int getRedundantPicCap() 104 { 105 return redundant_pic_cap; 106 }; 107 setPacketizationMode(int val)108 inline void setPacketizationMode(int val) 109 { 110 packetization_mode = (int)val; 111 }; 112 getPacketizationMode()113 inline int getPacketizationMode() 114 { 115 return packetization_mode; 116 }; 117 setSpropInterleavingDepth(int val)118 inline void setSpropInterleavingDepth(int val) 119 { 120 sprop_interleaving_depth = (int)val; 121 }; 122 getSpropInterleavingDepth()123 inline int getSpropInterleavingDepth() 124 { 125 return sprop_interleaving_depth; 126 }; 127 setDeintBufCap(int val)128 inline void setDeintBufCap(int val) 129 { 130 deint_buf_cap = (int)val; 131 }; 132 getDeintBufCap()133 inline int getDeintBufCap() 134 { 135 return deint_buf_cap; 136 }; 137 setSpropDeintBufReq(int val)138 inline void setSpropDeintBufReq(int val) 139 { 140 sprop_deint_buf_req = (int)val; 141 }; 142 getSpropDeintBufReq()143 inline int getSpropDeintBufReq() 144 { 145 return sprop_deint_buf_req; 146 }; 147 setSpropInitBufTime(int val)148 inline void setSpropInitBufTime(int val) 149 { 150 sprop_init_buf_time = (int)val; 151 }; 152 getSpropInitBufTime()153 inline int getSpropInitBufTime() 154 { 155 return sprop_init_buf_time; 156 }; 157 setSpropMaxDonDiff(int val)158 inline void setSpropMaxDonDiff(int val) 159 { 160 sprop_max_don_diff = (int)val; 161 }; 162 getSpropMaxDonDiff()163 inline int getSpropMaxDonDiff() 164 { 165 return sprop_max_don_diff; 166 }; 167 setMaxRcmdNaluSize(int val)168 inline void setMaxRcmdNaluSize(int val) 169 { 170 max_rcmd_nalu_size = (int)val; 171 }; 172 getMaxRcmdNaluSize()173 inline int getMaxRcmdNaluSize() 174 { 175 return max_rcmd_nalu_size; 176 }; 177 178 private: 179 int max_mbps; 180 int max_fs; 181 int max_cpb; 182 int max_dpb; 183 int max_br; 184 int redundant_pic_cap; 185 int packetization_mode; 186 int sprop_interleaving_depth; 187 int deint_buf_cap; 188 int sprop_deint_buf_req; 189 int sprop_init_buf_time; 190 int sprop_max_don_diff; 191 int max_rcmd_nalu_size; 192 }; 193 194 #endif 195