OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace acm2 { | 38 namespace acm2 { |
39 | 39 |
40 class AcmReceiver { | 40 class AcmReceiver { |
41 public: | 41 public: |
42 struct Decoder { | 42 struct Decoder { |
43 int acm_codec_id; | 43 int acm_codec_id; |
44 uint8_t payload_type; | 44 uint8_t payload_type; |
45 // This field is meaningful for codecs where both mono and | 45 // This field is meaningful for codecs where both mono and |
46 // stereo versions are registered under the same ID. | 46 // stereo versions are registered under the same ID. |
47 int channels; | 47 size_t channels; |
48 int sample_rate_hz; | 48 int sample_rate_hz; |
49 }; | 49 }; |
50 | 50 |
51 // Constructor of the class | 51 // Constructor of the class |
52 explicit AcmReceiver(const AudioCodingModule::Config& config); | 52 explicit AcmReceiver(const AudioCodingModule::Config& config); |
53 | 53 |
54 // Destructor of the class. | 54 // Destructor of the class. |
55 ~AcmReceiver(); | 55 ~AcmReceiver(); |
56 | 56 |
57 // | 57 // |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // used for built-in decoders if NetEq doesn't have | 109 // used for built-in decoders if NetEq doesn't have |
110 // all the info it needs to construct them properly | 110 // all the info it needs to construct them properly |
111 // (e.g. iSAC, where the decoder needs to be paired | 111 // (e.g. iSAC, where the decoder needs to be paired |
112 // with an encoder). | 112 // with an encoder). |
113 // | 113 // |
114 // Return value : 0 if OK. | 114 // Return value : 0 if OK. |
115 // <0 if NetEq returned an error. | 115 // <0 if NetEq returned an error. |
116 // | 116 // |
117 int AddCodec(int acm_codec_id, | 117 int AddCodec(int acm_codec_id, |
118 uint8_t payload_type, | 118 uint8_t payload_type, |
119 int channels, | 119 size_t channels, |
120 int sample_rate_hz, | 120 int sample_rate_hz, |
121 AudioDecoder* audio_decoder, | 121 AudioDecoder* audio_decoder, |
122 const std::string& name); | 122 const std::string& name); |
123 | 123 |
124 // | 124 // |
125 // Sets a minimum delay for packet buffer. The given delay is maintained, | 125 // Sets a minimum delay for packet buffer. The given delay is maintained, |
126 // unless channel condition dictates a higher delay. | 126 // unless channel condition dictates a higher delay. |
127 // | 127 // |
128 // Input: | 128 // Input: |
129 // - delay_ms : minimum delay in milliseconds. | 129 // - delay_ms : minimum delay in milliseconds. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 Clock* clock_; // TODO(henrik.lundin) Make const if possible. | 298 Clock* clock_; // TODO(henrik.lundin) Make const if possible. |
299 bool resampled_last_output_frame_ GUARDED_BY(crit_sect_); | 299 bool resampled_last_output_frame_ GUARDED_BY(crit_sect_); |
300 rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_); | 300 rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_); |
301 }; | 301 }; |
302 | 302 |
303 } // namespace acm2 | 303 } // namespace acm2 |
304 | 304 |
305 } // namespace webrtc | 305 } // namespace webrtc |
306 | 306 |
307 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_ | 307 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_ |
OLD | NEW |