| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // owns_decoder - if true, it means that the codec should own the | 144 // owns_decoder - if true, it means that the codec should own the |
| 145 // decoder instance. In this case, the codec should | 145 // decoder instance. In this case, the codec should |
| 146 // implement ACMGenericCodec::Decoder(), which returns | 146 // implement ACMGenericCodec::Decoder(), which returns |
| 147 // a pointer to AudioDecoder. This pointer is injected | 147 // a pointer to AudioDecoder. This pointer is injected |
| 148 // into NetEq when this codec is registered as receive | 148 // into NetEq when this codec is registered as receive |
| 149 // codec. DEPRECATED. | 149 // codec. DEPRECATED. |
| 150 struct CodecSettings { | 150 struct CodecSettings { |
| 151 int num_packet_sizes; | 151 int num_packet_sizes; |
| 152 int packet_sizes_samples[kMaxNumPacketSize]; | 152 int packet_sizes_samples[kMaxNumPacketSize]; |
| 153 int basic_block_samples; | 153 int basic_block_samples; |
| 154 int channel_support; | 154 size_t channel_support; |
| 155 bool owns_decoder; | 155 bool owns_decoder; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 // Gets codec information from database at the position in database given by | 158 // Gets codec information from database at the position in database given by |
| 159 // [codec_id]. | 159 // [codec_id]. |
| 160 // Input: | 160 // Input: |
| 161 // [codec_id] - number that specifies at what position in the database to | 161 // [codec_id] - number that specifies at what position in the database to |
| 162 // get the information. | 162 // get the information. |
| 163 // Output: | 163 // Output: |
| 164 // [codec_inst] - filled with information about the codec. | 164 // [codec_inst] - filled with information about the codec. |
| 165 // Return: | 165 // Return: |
| 166 // 0 if successful, otherwise -1. | 166 // 0 if successful, otherwise -1. |
| 167 static int Codec(int codec_id, CodecInst* codec_inst); | 167 static int Codec(int codec_id, CodecInst* codec_inst); |
| 168 | 168 |
| 169 // Returns codec id from database, given the information received in the input | 169 // Returns codec id from database, given the information received in the input |
| 170 // [codec_inst]. | 170 // [codec_inst]. |
| 171 // Input: | 171 // Input: |
| 172 // [codec_inst] - Information about the codec for which we require the | 172 // [codec_inst] - Information about the codec for which we require the |
| 173 // database id. | 173 // database id. |
| 174 // Return: | 174 // Return: |
| 175 // codec id if successful, otherwise < 0. | 175 // codec id if successful, otherwise < 0. |
| 176 static int CodecNumber(const CodecInst& codec_inst); | 176 static int CodecNumber(const CodecInst& codec_inst); |
| 177 static int CodecId(const CodecInst& codec_inst); | 177 static int CodecId(const CodecInst& codec_inst); |
| 178 static int CodecId(const char* payload_name, int frequency, int channels); | 178 static int CodecId(const char* payload_name, int frequency, size_t channels); |
| 179 static int ReceiverCodecNumber(const CodecInst& codec_inst); | 179 static int ReceiverCodecNumber(const CodecInst& codec_inst); |
| 180 | 180 |
| 181 // Returns the codec sampling frequency for codec with id = "codec_id" in | 181 // Returns the codec sampling frequency for codec with id = "codec_id" in |
| 182 // database. | 182 // database. |
| 183 // TODO(tlegrand): Check if function is needed, or if we can change | 183 // TODO(tlegrand): Check if function is needed, or if we can change |
| 184 // to access database directly. | 184 // to access database directly. |
| 185 // Input: | 185 // Input: |
| 186 // [codec_id] - number that specifies at what position in the database to | 186 // [codec_id] - number that specifies at what position in the database to |
| 187 // get the information. | 187 // get the information. |
| 188 // Return: | 188 // Return: |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 static const CodecInst database_[kMaxNumCodecs]; | 241 static const CodecInst database_[kMaxNumCodecs]; |
| 242 static const CodecSettings codec_settings_[kMaxNumCodecs]; | 242 static const CodecSettings codec_settings_[kMaxNumCodecs]; |
| 243 static const NetEqDecoder neteq_decoders_[kMaxNumCodecs]; | 243 static const NetEqDecoder neteq_decoders_[kMaxNumCodecs]; |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 } // namespace acm2 | 246 } // namespace acm2 |
| 247 | 247 |
| 248 } // namespace webrtc | 248 } // namespace webrtc |
| 249 | 249 |
| 250 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CODEC_DATABASE_H_ | 250 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CODEC_DATABASE_H_ |
| OLD | NEW |