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 <string> | 14 #include <string> |
15 | 15 |
16 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/criticalsection.h" |
17 #include "webrtc/base/scoped_ptr.h" | 18 #include "webrtc/base/scoped_ptr.h" |
18 #include "webrtc/base/thread_annotations.h" | 19 #include "webrtc/base/thread_annotations.h" |
19 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" | 20 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" |
20 #include "webrtc/modules/audio_coding/neteq/defines.h" | 21 #include "webrtc/modules/audio_coding/neteq/defines.h" |
21 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" | 22 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" |
22 #include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. | 23 #include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. |
23 #include "webrtc/modules/audio_coding/neteq/random_vector.h" | 24 #include "webrtc/modules/audio_coding/neteq/random_vector.h" |
24 #include "webrtc/modules/audio_coding/neteq/rtcp.h" | 25 #include "webrtc/modules/audio_coding/neteq/rtcp.h" |
25 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" | 26 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" |
26 #include "webrtc/typedefs.h" | 27 #include "webrtc/typedefs.h" |
27 | 28 |
28 namespace webrtc { | 29 namespace webrtc { |
29 | 30 |
30 // Forward declarations. | 31 // Forward declarations. |
31 class Accelerate; | 32 class Accelerate; |
32 class BackgroundNoise; | 33 class BackgroundNoise; |
33 class BufferLevelFilter; | 34 class BufferLevelFilter; |
34 class ComfortNoise; | 35 class ComfortNoise; |
35 class CriticalSectionWrapper; | |
36 class DecisionLogic; | 36 class DecisionLogic; |
37 class DecoderDatabase; | 37 class DecoderDatabase; |
38 class DelayManager; | 38 class DelayManager; |
39 class DelayPeakDetector; | 39 class DelayPeakDetector; |
40 class DtmfBuffer; | 40 class DtmfBuffer; |
41 class DtmfToneGenerator; | 41 class DtmfToneGenerator; |
42 class Expand; | 42 class Expand; |
43 class Merge; | 43 class Merge; |
44 class Nack; | 44 class Nack; |
45 class Normal; | 45 class Normal; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 // GetAudio(). | 331 // GetAudio(). |
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 const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; | 341 mutable rtc::CriticalSection crit_sect_; |
342 const rtc::scoped_ptr<BufferLevelFilter> buffer_level_filter_ | 342 const rtc::scoped_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 rtc::scoped_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 rtc::scoped_ptr<DelayManager> delay_manager_ GUARDED_BY(crit_sect_); |
347 const rtc::scoped_ptr<DelayPeakDetector> delay_peak_detector_ | 347 const rtc::scoped_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 rtc::scoped_ptr<DtmfBuffer> dtmf_buffer_ GUARDED_BY(crit_sect_); |
350 const rtc::scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_ | 350 const rtc::scoped_ptr<DtmfToneGenerator> dtmf_tone_generator_ |
351 GUARDED_BY(crit_sect_); | 351 GUARDED_BY(crit_sect_); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 rtc::scoped_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 |