Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2110113003: Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop f… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 if (is_dumping_aec_) { 1063 if (is_dumping_aec_) {
1065 // Stop dumping AEC when we are dumping. 1064 // Stop dumping AEC when we are dumping.
1066 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != 1065 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() !=
1067 webrtc::AudioProcessing::kNoError) { 1066 webrtc::AudioProcessing::kNoError) {
1068 LOG_RTCERR0(StopDebugRecording); 1067 LOG_RTCERR0(StopDebugRecording);
1069 } 1068 }
1070 is_dumping_aec_ = false; 1069 is_dumping_aec_ = false;
1071 } 1070 }
1072 } 1071 }
1073 1072
1074 bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file,
1075 int64_t max_size_bytes) {
1076 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1077 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog();
1078 if (event_log) {
1079 return event_log->StartLogging(file, max_size_bytes);
1080 }
1081 LOG_RTCERR0(StartRtcEventLog);
1082 return false;
1083 }
1084
1085 void WebRtcVoiceEngine::StopRtcEventLog() {
1086 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1087 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog();
1088 if (event_log) {
1089 event_log->StopLogging();
1090 return;
1091 }
1092 LOG_RTCERR0(StopRtcEventLog);
1093 }
1094
1095 int WebRtcVoiceEngine::CreateVoEChannel() { 1073 int WebRtcVoiceEngine::CreateVoEChannel() {
1096 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1074 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1097 return voe_wrapper_->base()->CreateChannel(voe_config_); 1075 return voe_wrapper_->base()->CreateChannel(voe_config_);
1098 } 1076 }
1099 1077
1100 webrtc::AudioDeviceModule* WebRtcVoiceEngine::adm() { 1078 webrtc::AudioDeviceModule* WebRtcVoiceEngine::adm() {
1101 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1079 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1102 RTC_DCHECK(adm_); 1080 RTC_DCHECK(adm_);
1103 return adm_; 1081 return adm_;
1104 } 1082 }
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 } 2616 }
2639 } else { 2617 } else {
2640 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2618 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2641 engine()->voe()->base()->StopPlayout(channel); 2619 engine()->voe()->base()->StopPlayout(channel);
2642 } 2620 }
2643 return true; 2621 return true;
2644 } 2622 }
2645 } // namespace cricket 2623 } // namespace cricket
2646 2624
2647 #endif // HAVE_WEBRTC_VOICE 2625 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/modules/bitrate_controller/bitrate_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698