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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Get the AudioDecoder object, creating it first if necessary. | 47 // Get the AudioDecoder object, creating it first if necessary. |
48 AudioDecoder* GetDecoder(); | 48 AudioDecoder* GetDecoder(); |
49 | 49 |
50 // Delete the AudioDecoder object, unless it's external. (This means we can | 50 // Delete the AudioDecoder object, unless it's external. (This means we can |
51 // always recreate it later if we need it.) | 51 // always recreate it later if we need it.) |
52 void DropDecoder() { decoder_.reset(); } | 52 void DropDecoder() { decoder_.reset(); } |
53 | 53 |
54 const NetEqDecoder codec_type; | 54 const NetEqDecoder codec_type; |
55 const std::string name; | 55 const std::string name; |
56 const int fs_hz; | 56 const int fs_hz; |
57 const int rtp_sample_rate_hz; | |
58 AudioDecoder* const external_decoder; | 57 AudioDecoder* const external_decoder; |
59 | 58 |
60 private: | 59 private: |
61 std::unique_ptr<AudioDecoder> decoder_; | 60 std::unique_ptr<AudioDecoder> decoder_; |
62 }; | 61 }; |
63 | 62 |
64 // Maximum value for 8 bits, and an invalid RTP payload type (since it is | 63 // Maximum value for 8 bits, and an invalid RTP payload type (since it is |
65 // only 7 bits). | 64 // only 7 bits). |
66 static const uint8_t kRtpPayloadTypeError = 0xFF; | 65 static const uint8_t kRtpPayloadTypeError = 0xFF; |
67 | 66 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 153 |
155 DecoderMap decoders_; | 154 DecoderMap decoders_; |
156 int active_decoder_; | 155 int active_decoder_; |
157 int active_cng_decoder_; | 156 int active_cng_decoder_; |
158 | 157 |
159 RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase); | 158 RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase); |
160 }; | 159 }; |
161 | 160 |
162 } // namespace webrtc | 161 } // namespace webrtc |
163 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ | 162 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ |
OLD | NEW |