| 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 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <string> | 15 #include <string> |
| 15 | 16 |
| 16 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
| 18 #include "webrtc/base/scoped_ptr.h" | |
| 19 #include "webrtc/base/thread_annotations.h" | 19 #include "webrtc/base/thread_annotations.h" |
| 20 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" | 20 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" |
| 21 #include "webrtc/modules/audio_coding/neteq/defines.h" | 21 #include "webrtc/modules/audio_coding/neteq/defines.h" |
| 22 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" | 22 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" |
| 23 #include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. | 23 #include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. |
| 24 #include "webrtc/modules/audio_coding/neteq/random_vector.h" | 24 #include "webrtc/modules/audio_coding/neteq/random_vector.h" |
| 25 #include "webrtc/modules/audio_coding/neteq/rtcp.h" | 25 #include "webrtc/modules/audio_coding/neteq/rtcp.h" |
| 26 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" | 26 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" |
| 27 #include "webrtc/typedefs.h" | 27 #include "webrtc/typedefs.h" |
| 28 | 28 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 NetEqOutputType LastOutputType() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 332 NetEqOutputType LastOutputType() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 333 | 333 |
| 334 // Updates Expand and Merge. | 334 // Updates Expand and Merge. |
| 335 virtual void UpdatePlcComponents(int fs_hz, size_t channels) | 335 virtual void UpdatePlcComponents(int fs_hz, size_t channels) |
| 336 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 336 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 337 | 337 |
| 338 // Creates DecisionLogic object with the mode given by |playout_mode_|. | 338 // Creates DecisionLogic object with the mode given by |playout_mode_|. |
| 339 virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 339 virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 340 | 340 |
| 341 rtc::CriticalSection crit_sect_; | 341 rtc::CriticalSection crit_sect_; |
| 342 const rtc::scoped_ptr<BufferLevelFilter> buffer_level_filter_ | 342 const std::unique_ptr<BufferLevelFilter> buffer_level_filter_ |
| 343 GUARDED_BY(crit_sect_); | 343 GUARDED_BY(crit_sect_); |
| 344 const rtc::scoped_ptr<DecoderDatabase> decoder_database_ | 344 const std::unique_ptr<DecoderDatabase> decoder_database_ |
| 345 GUARDED_BY(crit_sect_); | 345 GUARDED_BY(crit_sect_); |
| 346 const rtc::scoped_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_); | 346 const std::unique_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_); |
| 347 const rtc::scoped_ptr<DelayPeakDetector> delay_peak_detector_ | 347 const std::unique_ptr<DelayPeakDetector> delay_peak_detector_ |
| 348 GUARDED_BY(crit_sect_); | 348 GUARDED_BY(crit_sect_); |
| 349 const rtc::scoped_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_); | 349 const std::unique_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_); |
| 350 const rtc::scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_ | 350 const std::unique_ptr<DtmfToneGenerator> dtmf_tone_generator_ |
| 351 GUARDED_BY(crit_sect_); | 351 GUARDED_BY(crit_sect_); |
| 352 const rtc::scoped_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_); | 352 const std::unique_ptr<PacketBuffer> packet_buffer_ GUARDED_BY(crit_sect_); |
| 353 const rtc::scoped_ptr<PayloadSplitter> payload_splitter_ | 353 const std::unique_ptr<PayloadSplitter> payload_splitter_ |
| 354 GUARDED_BY(crit_sect_); | 354 GUARDED_BY(crit_sect_); |
| 355 const rtc::scoped_ptr<TimestampScaler> timestamp_scaler_ | 355 const std::unique_ptr<TimestampScaler> timestamp_scaler_ |
| 356 GUARDED_BY(crit_sect_); | 356 GUARDED_BY(crit_sect_); |
| 357 const rtc::scoped_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_); | 357 const std::unique_ptr<PostDecodeVad> vad_ GUARDED_BY(crit_sect_); |
| 358 const rtc::scoped_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_); | 358 const std::unique_ptr<ExpandFactory> expand_factory_ GUARDED_BY(crit_sect_); |
| 359 const rtc::scoped_ptr<AccelerateFactory> accelerate_factory_ | 359 const std::unique_ptr<AccelerateFactory> accelerate_factory_ |
| 360 GUARDED_BY(crit_sect_); | 360 GUARDED_BY(crit_sect_); |
| 361 const rtc::scoped_ptr<PreemptiveExpandFactory> preemptive_expand_factory_ | 361 const std::unique_ptr<PreemptiveExpandFactory> preemptive_expand_factory_ |
| 362 GUARDED_BY(crit_sect_); | 362 GUARDED_BY(crit_sect_); |
| 363 | 363 |
| 364 rtc::scoped_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_); | 364 std::unique_ptr<BackgroundNoise> background_noise_ GUARDED_BY(crit_sect_); |
| 365 rtc::scoped_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_); | 365 std::unique_ptr<DecisionLogic> decision_logic_ GUARDED_BY(crit_sect_); |
| 366 rtc::scoped_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_); | 366 std::unique_ptr<AudioMultiVector> algorithm_buffer_ GUARDED_BY(crit_sect_); |
| 367 rtc::scoped_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_); | 367 std::unique_ptr<SyncBuffer> sync_buffer_ GUARDED_BY(crit_sect_); |
| 368 rtc::scoped_ptr<Expand> expand_ GUARDED_BY(crit_sect_); | 368 std::unique_ptr<Expand> expand_ GUARDED_BY(crit_sect_); |
| 369 rtc::scoped_ptr<Normal> normal_ GUARDED_BY(crit_sect_); | 369 std::unique_ptr<Normal> normal_ GUARDED_BY(crit_sect_); |
| 370 rtc::scoped_ptr<Merge> merge_ GUARDED_BY(crit_sect_); | 370 std::unique_ptr<Merge> merge_ GUARDED_BY(crit_sect_); |
| 371 rtc::scoped_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_); | 371 std::unique_ptr<Accelerate> accelerate_ GUARDED_BY(crit_sect_); |
| 372 rtc::scoped_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_); | 372 std::unique_ptr<PreemptiveExpand> preemptive_expand_ GUARDED_BY(crit_sect_); |
| 373 RandomVector random_vector_ GUARDED_BY(crit_sect_); | 373 RandomVector random_vector_ GUARDED_BY(crit_sect_); |
| 374 rtc::scoped_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_); | 374 std::unique_ptr<ComfortNoise> comfort_noise_ GUARDED_BY(crit_sect_); |
| 375 Rtcp rtcp_ GUARDED_BY(crit_sect_); | 375 Rtcp rtcp_ GUARDED_BY(crit_sect_); |
| 376 StatisticsCalculator stats_ GUARDED_BY(crit_sect_); | 376 StatisticsCalculator stats_ GUARDED_BY(crit_sect_); |
| 377 int fs_hz_ GUARDED_BY(crit_sect_); | 377 int fs_hz_ GUARDED_BY(crit_sect_); |
| 378 int fs_mult_ GUARDED_BY(crit_sect_); | 378 int fs_mult_ GUARDED_BY(crit_sect_); |
| 379 int last_output_sample_rate_hz_ GUARDED_BY(crit_sect_); | 379 int last_output_sample_rate_hz_ GUARDED_BY(crit_sect_); |
| 380 size_t output_size_samples_ GUARDED_BY(crit_sect_); | 380 size_t output_size_samples_ GUARDED_BY(crit_sect_); |
| 381 size_t decoder_frame_length_ GUARDED_BY(crit_sect_); | 381 size_t decoder_frame_length_ GUARDED_BY(crit_sect_); |
| 382 Modes last_mode_ GUARDED_BY(crit_sect_); | 382 Modes last_mode_ GUARDED_BY(crit_sect_); |
| 383 rtc::scoped_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_); | 383 std::unique_ptr<int16_t[]> mute_factor_array_ GUARDED_BY(crit_sect_); |
| 384 size_t decoded_buffer_length_ GUARDED_BY(crit_sect_); | 384 size_t decoded_buffer_length_ GUARDED_BY(crit_sect_); |
| 385 rtc::scoped_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_); | 385 std::unique_ptr<int16_t[]> decoded_buffer_ GUARDED_BY(crit_sect_); |
| 386 uint32_t playout_timestamp_ GUARDED_BY(crit_sect_); | 386 uint32_t playout_timestamp_ GUARDED_BY(crit_sect_); |
| 387 bool new_codec_ GUARDED_BY(crit_sect_); | 387 bool new_codec_ GUARDED_BY(crit_sect_); |
| 388 uint32_t timestamp_ GUARDED_BY(crit_sect_); | 388 uint32_t timestamp_ GUARDED_BY(crit_sect_); |
| 389 bool reset_decoder_ GUARDED_BY(crit_sect_); | 389 bool reset_decoder_ GUARDED_BY(crit_sect_); |
| 390 uint8_t current_rtp_payload_type_ GUARDED_BY(crit_sect_); | 390 uint8_t current_rtp_payload_type_ GUARDED_BY(crit_sect_); |
| 391 uint8_t current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_); | 391 uint8_t current_cng_rtp_payload_type_ GUARDED_BY(crit_sect_); |
| 392 uint32_t ssrc_ GUARDED_BY(crit_sect_); | 392 uint32_t ssrc_ GUARDED_BY(crit_sect_); |
| 393 bool first_packet_ GUARDED_BY(crit_sect_); | 393 bool first_packet_ GUARDED_BY(crit_sect_); |
| 394 int error_code_ GUARDED_BY(crit_sect_); // Store last error code. | 394 int error_code_ GUARDED_BY(crit_sect_); // Store last error code. |
| 395 int decoder_error_code_ GUARDED_BY(crit_sect_); | 395 int decoder_error_code_ GUARDED_BY(crit_sect_); |
| 396 const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_); | 396 const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_); |
| 397 NetEqPlayoutMode playout_mode_ GUARDED_BY(crit_sect_); | 397 NetEqPlayoutMode playout_mode_ GUARDED_BY(crit_sect_); |
| 398 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); | 398 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); |
| 399 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); | 399 std::unique_ptr<Nack> nack_ GUARDED_BY(crit_sect_); |
| 400 bool nack_enabled_ GUARDED_BY(crit_sect_); | 400 bool nack_enabled_ GUARDED_BY(crit_sect_); |
| 401 | 401 |
| 402 private: | 402 private: |
| 403 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 403 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
| 404 }; | 404 }; |
| 405 | 405 |
| 406 } // namespace webrtc | 406 } // namespace webrtc |
| 407 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 407 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| OLD | NEW |