OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 10 matching lines...) Expand all Loading... |
21 #include "webrtc/base/arraysize.h" | 21 #include "webrtc/base/arraysize.h" |
22 #include "webrtc/base/base64.h" | 22 #include "webrtc/base/base64.h" |
23 #include "webrtc/base/byteorder.h" | 23 #include "webrtc/base/byteorder.h" |
24 #include "webrtc/base/common.h" | 24 #include "webrtc/base/common.h" |
25 #include "webrtc/base/constructormagic.h" | 25 #include "webrtc/base/constructormagic.h" |
26 #include "webrtc/base/helpers.h" | 26 #include "webrtc/base/helpers.h" |
27 #include "webrtc/base/logging.h" | 27 #include "webrtc/base/logging.h" |
28 #include "webrtc/base/stringencode.h" | 28 #include "webrtc/base/stringencode.h" |
29 #include "webrtc/base/stringutils.h" | 29 #include "webrtc/base/stringutils.h" |
30 #include "webrtc/base/trace_event.h" | 30 #include "webrtc/base/trace_event.h" |
31 #include "webrtc/call/rtc_event_log.h" | |
32 #include "webrtc/common.h" | 31 #include "webrtc/common.h" |
33 #include "webrtc/media/base/audiosource.h" | 32 #include "webrtc/media/base/audiosource.h" |
34 #include "webrtc/media/base/mediaconstants.h" | 33 #include "webrtc/media/base/mediaconstants.h" |
35 #include "webrtc/media/base/streamparams.h" | 34 #include "webrtc/media/base/streamparams.h" |
36 #include "webrtc/media/engine/webrtcmediaengine.h" | 35 #include "webrtc/media/engine/webrtcmediaengine.h" |
37 #include "webrtc/media/engine/webrtcvoe.h" | 36 #include "webrtc/media/engine/webrtcvoe.h" |
38 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 37 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
39 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 38 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
40 #include "webrtc/system_wrappers/include/field_trial.h" | 39 #include "webrtc/system_wrappers/include/field_trial.h" |
41 #include "webrtc/system_wrappers/include/trace.h" | 40 #include "webrtc/system_wrappers/include/trace.h" |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 if (is_dumping_aec_) { | 1032 if (is_dumping_aec_) { |
1034 // Stop dumping AEC when we are dumping. | 1033 // Stop dumping AEC when we are dumping. |
1035 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != | 1034 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != |
1036 webrtc::AudioProcessing::kNoError) { | 1035 webrtc::AudioProcessing::kNoError) { |
1037 LOG_RTCERR0(StopDebugRecording); | 1036 LOG_RTCERR0(StopDebugRecording); |
1038 } | 1037 } |
1039 is_dumping_aec_ = false; | 1038 is_dumping_aec_ = false; |
1040 } | 1039 } |
1041 } | 1040 } |
1042 | 1041 |
1043 bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file, | |
1044 int64_t max_size_bytes) { | |
1045 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
1046 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog(); | |
1047 if (event_log) { | |
1048 return event_log->StartLogging(file, max_size_bytes); | |
1049 } | |
1050 LOG_RTCERR0(StartRtcEventLog); | |
1051 return false; | |
1052 } | |
1053 | |
1054 void WebRtcVoiceEngine::StopRtcEventLog() { | |
1055 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
1056 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog(); | |
1057 if (event_log) { | |
1058 event_log->StopLogging(); | |
1059 return; | |
1060 } | |
1061 LOG_RTCERR0(StopRtcEventLog); | |
1062 } | |
1063 | |
1064 int WebRtcVoiceEngine::CreateVoEChannel() { | 1042 int WebRtcVoiceEngine::CreateVoEChannel() { |
1065 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1043 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
1066 return voe_wrapper_->base()->CreateChannel(voe_config_); | 1044 return voe_wrapper_->base()->CreateChannel(voe_config_); |
1067 } | 1045 } |
1068 | 1046 |
1069 webrtc::AudioDeviceModule* WebRtcVoiceEngine::adm() { | 1047 webrtc::AudioDeviceModule* WebRtcVoiceEngine::adm() { |
1070 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1048 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
1071 RTC_DCHECK(adm_); | 1049 RTC_DCHECK(adm_); |
1072 return adm_; | 1050 return adm_; |
1073 } | 1051 } |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2607 } | 2585 } |
2608 } else { | 2586 } else { |
2609 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2587 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2610 engine()->voe()->base()->StopPlayout(channel); | 2588 engine()->voe()->base()->StopPlayout(channel); |
2611 } | 2589 } |
2612 return true; | 2590 return true; |
2613 } | 2591 } |
2614 } // namespace cricket | 2592 } // namespace cricket |
2615 | 2593 |
2616 #endif // HAVE_WEBRTC_VOICE | 2594 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |