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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 const Decoder* RtpHeaderToDecoder(const RTPHeader& rtp_header, | 273 const Decoder* RtpHeaderToDecoder(const RTPHeader& rtp_header, |
274 uint8_t payload_type) const | 274 uint8_t payload_type) const |
275 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 275 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
276 | 276 |
277 uint32_t NowInTimestamp(int decoder_sampling_rate) const; | 277 uint32_t NowInTimestamp(int decoder_sampling_rate) const; |
278 | 278 |
279 rtc::CriticalSection crit_sect_; | 279 rtc::CriticalSection crit_sect_; |
280 const Decoder* last_audio_decoder_ GUARDED_BY(crit_sect_); | 280 const Decoder* last_audio_decoder_ GUARDED_BY(crit_sect_); |
281 AudioFrame::VADActivity previous_audio_activity_ GUARDED_BY(crit_sect_); | 281 AudioFrame::VADActivity previous_audio_activity_ GUARDED_BY(crit_sect_); |
282 ACMResampler resampler_ GUARDED_BY(crit_sect_); | 282 ACMResampler resampler_ GUARDED_BY(crit_sect_); |
283 // Used in GetAudio, declared as member to avoid allocating every 10ms. | |
284 // TODO(henrik.lundin) Stack-allocate in GetAudio instead? | |
285 std::unique_ptr<int16_t[]> audio_buffer_ GUARDED_BY(crit_sect_); | |
286 std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_); | 283 std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_); |
287 CallStatistics call_stats_ GUARDED_BY(crit_sect_); | 284 CallStatistics call_stats_ GUARDED_BY(crit_sect_); |
288 NetEq* neteq_; | 285 NetEq* neteq_; |
289 // Decoders map is keyed by payload type | 286 // Decoders map is keyed by payload type |
290 std::map<uint8_t, Decoder> decoders_ GUARDED_BY(crit_sect_); | 287 std::map<uint8_t, Decoder> decoders_ GUARDED_BY(crit_sect_); |
291 bool vad_enabled_; | 288 bool vad_enabled_; |
292 Clock* clock_; // TODO(henrik.lundin) Make const if possible. | 289 Clock* clock_; // TODO(henrik.lundin) Make const if possible. |
293 bool resampled_last_output_frame_ GUARDED_BY(crit_sect_); | 290 bool resampled_last_output_frame_ GUARDED_BY(crit_sect_); |
294 rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_); | 291 rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_); |
295 }; | 292 }; |
296 | 293 |
297 } // namespace acm2 | 294 } // namespace acm2 |
298 | 295 |
299 } // namespace webrtc | 296 } // namespace webrtc |
300 | 297 |
301 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_ | 298 #endif // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_ |
OLD | NEW |