| 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_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ |
| 13 | 13 |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/base/buffer.h" |
| 16 #include "webrtc/base/scoped_ptr.h" | 17 #include "webrtc/base/scoped_ptr.h" |
| 17 #include "webrtc/base/thread_annotations.h" | 18 #include "webrtc/base/thread_annotations.h" |
| 18 #include "webrtc/common_types.h" | 19 #include "webrtc/common_types.h" |
| 19 #include "webrtc/engine_configurations.h" | 20 #include "webrtc/engine_configurations.h" |
| 20 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h" | 21 #include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h" |
| 21 #include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h" | 22 #include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h" |
| 22 #include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h" | 23 #include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h" |
| 23 #include "webrtc/modules/audio_coding/main/acm2/codec_manager.h" | 24 #include "webrtc/modules/audio_coding/main/acm2/codec_manager.h" |
| 24 | 25 |
| 25 namespace webrtc { | 26 namespace webrtc { |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // 0: otherwise. | 259 // 0: otherwise. |
| 259 int PreprocessToAddData(const AudioFrame& in_frame, | 260 int PreprocessToAddData(const AudioFrame& in_frame, |
| 260 const AudioFrame** ptr_out) | 261 const AudioFrame** ptr_out) |
| 261 EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_); | 262 EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_); |
| 262 | 263 |
| 263 // Change required states after starting to receive the codec corresponding | 264 // Change required states after starting to receive the codec corresponding |
| 264 // to |index|. | 265 // to |index|. |
| 265 int UpdateUponReceivingCodec(int index); | 266 int UpdateUponReceivingCodec(int index); |
| 266 | 267 |
| 267 const rtc::scoped_ptr<CriticalSectionWrapper> acm_crit_sect_; | 268 const rtc::scoped_ptr<CriticalSectionWrapper> acm_crit_sect_; |
| 269 rtc::Buffer encode_buffer_ GUARDED_BY(acm_crit_sect_); |
| 268 int id_; // TODO(henrik.lundin) Make const. | 270 int id_; // TODO(henrik.lundin) Make const. |
| 269 uint32_t expected_codec_ts_ GUARDED_BY(acm_crit_sect_); | 271 uint32_t expected_codec_ts_ GUARDED_BY(acm_crit_sect_); |
| 270 uint32_t expected_in_ts_ GUARDED_BY(acm_crit_sect_); | 272 uint32_t expected_in_ts_ GUARDED_BY(acm_crit_sect_); |
| 271 ACMResampler resampler_ GUARDED_BY(acm_crit_sect_); | 273 ACMResampler resampler_ GUARDED_BY(acm_crit_sect_); |
| 272 AcmReceiver receiver_; // AcmReceiver has it's own internal lock. | 274 AcmReceiver receiver_; // AcmReceiver has it's own internal lock. |
| 273 ChangeLogger bitrate_logger_ GUARDED_BY(acm_crit_sect_); | 275 ChangeLogger bitrate_logger_ GUARDED_BY(acm_crit_sect_); |
| 274 CodecManager codec_manager_ GUARDED_BY(acm_crit_sect_); | 276 CodecManager codec_manager_ GUARDED_BY(acm_crit_sect_); |
| 275 | 277 |
| 276 // This is to keep track of CN instances where we can send DTMFs. | 278 // This is to keep track of CN instances where we can send DTMFs. |
| 277 uint8_t previous_pltype_ GUARDED_BY(acm_crit_sect_); | 279 uint8_t previous_pltype_ GUARDED_BY(acm_crit_sect_); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 int playout_frequency_hz_; | 371 int playout_frequency_hz_; |
| 370 // TODO(henrik.lundin): All members below this line are temporary and should | 372 // TODO(henrik.lundin): All members below this line are temporary and should |
| 371 // be removed after refactoring is completed. | 373 // be removed after refactoring is completed. |
| 372 rtc::scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_; | 374 rtc::scoped_ptr<acm2::AudioCodingModuleImpl> acm_old_; |
| 373 CodecInst current_send_codec_; | 375 CodecInst current_send_codec_; |
| 374 }; | 376 }; |
| 375 | 377 |
| 376 } // namespace webrtc | 378 } // namespace webrtc |
| 377 | 379 |
| 378 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ | 380 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ |
| OLD | NEW |