| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 virtual bool Empty() const; | 142 virtual bool Empty() const; |
| 143 | 143 |
| 144 // Returns the number of decoders registered in the database. | 144 // Returns the number of decoders registered in the database. |
| 145 virtual int Size() const; | 145 virtual int Size() const; |
| 146 | 146 |
| 147 // Resets the database, erasing all registered payload types, and deleting | 147 // Resets the database, erasing all registered payload types, and deleting |
| 148 // any AudioDecoder objects that were not externally created and inserted | 148 // any AudioDecoder objects that were not externally created and inserted |
| 149 // using InsertExternal(). | 149 // using InsertExternal(). |
| 150 virtual void Reset(); | 150 virtual void Reset(); |
| 151 | 151 |
| 152 // Replaces the existing set of decoders with the given set. Returns the |
| 153 // payload types that were reassigned or removed while doing so. |
| 154 virtual std::vector<int> SetCodecs( |
| 155 const std::map<int, SdpAudioFormat>& codecs); |
| 156 |
| 152 // Registers |rtp_payload_type| as a decoder of type |codec_type|. The |name| | 157 // Registers |rtp_payload_type| as a decoder of type |codec_type|. The |name| |
| 153 // is only used to populate the name field in the DecoderInfo struct in the | 158 // is only used to populate the name field in the DecoderInfo struct in the |
| 154 // database, and can be arbitrary (including empty). Returns kOK on success; | 159 // database, and can be arbitrary (including empty). Returns kOK on success; |
| 155 // otherwise an error code. | 160 // otherwise an error code. |
| 156 virtual int RegisterPayload(uint8_t rtp_payload_type, | 161 virtual int RegisterPayload(uint8_t rtp_payload_type, |
| 157 NetEqDecoder codec_type, | 162 NetEqDecoder codec_type, |
| 158 const std::string& name); | 163 const std::string& name); |
| 159 | 164 |
| 160 // Registers a decoder for the given payload type. Returns kOK on success; | 165 // Registers a decoder for the given payload type. Returns kOK on success; |
| 161 // otherwise an error code. | 166 // otherwise an error code. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 int active_decoder_type_; | 237 int active_decoder_type_; |
| 233 int active_cng_decoder_type_; | 238 int active_cng_decoder_type_; |
| 234 mutable std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_; | 239 mutable std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_; |
| 235 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 240 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
| 236 | 241 |
| 237 RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase); | 242 RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase); |
| 238 }; | 243 }; |
| 239 | 244 |
| 240 } // namespace webrtc | 245 } // namespace webrtc |
| 241 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ | 246 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ |
| OLD | NEW |