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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated RTP/RTCP module to use setter methods instead of passing the event log pointer in the const… Created 4 years, 9 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 12 matching lines...) Expand all
23 23
24 #include "webrtc/audio/audio_sink.h" 24 #include "webrtc/audio/audio_sink.h"
25 #include "webrtc/base/arraysize.h" 25 #include "webrtc/base/arraysize.h"
26 #include "webrtc/base/base64.h" 26 #include "webrtc/base/base64.h"
27 #include "webrtc/base/byteorder.h" 27 #include "webrtc/base/byteorder.h"
28 #include "webrtc/base/common.h" 28 #include "webrtc/base/common.h"
29 #include "webrtc/base/helpers.h" 29 #include "webrtc/base/helpers.h"
30 #include "webrtc/base/logging.h" 30 #include "webrtc/base/logging.h"
31 #include "webrtc/base/stringencode.h" 31 #include "webrtc/base/stringencode.h"
32 #include "webrtc/base/stringutils.h" 32 #include "webrtc/base/stringutils.h"
33 #include "webrtc/call/rtc_event_log.h"
34 #include "webrtc/common.h" 33 #include "webrtc/common.h"
35 #include "webrtc/media/base/audioframe.h" 34 #include "webrtc/media/base/audioframe.h"
36 #include "webrtc/media/base/audiorenderer.h" 35 #include "webrtc/media/base/audiorenderer.h"
37 #include "webrtc/media/base/constants.h" 36 #include "webrtc/media/base/constants.h"
38 #include "webrtc/media/base/streamparams.h" 37 #include "webrtc/media/base/streamparams.h"
39 #include "webrtc/media/engine/webrtcmediaengine.h" 38 #include "webrtc/media/engine/webrtcmediaengine.h"
40 #include "webrtc/media/engine/webrtcvoe.h" 39 #include "webrtc/media/engine/webrtcvoe.h"
41 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" 40 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
42 #include "webrtc/modules/audio_processing/include/audio_processing.h" 41 #include "webrtc/modules/audio_processing/include/audio_processing.h"
43 #include "webrtc/system_wrappers/include/field_trial.h" 42 #include "webrtc/system_wrappers/include/field_trial.h"
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 if (is_dumping_aec_) { 1102 if (is_dumping_aec_) {
1104 // Stop dumping AEC when we are dumping. 1103 // Stop dumping AEC when we are dumping.
1105 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != 1104 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() !=
1106 webrtc::AudioProcessing::kNoError) { 1105 webrtc::AudioProcessing::kNoError) {
1107 LOG_RTCERR0(StopDebugRecording); 1106 LOG_RTCERR0(StopDebugRecording);
1108 } 1107 }
1109 is_dumping_aec_ = false; 1108 is_dumping_aec_ = false;
1110 } 1109 }
1111 } 1110 }
1112 1111
1113 bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file) {
1114 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1115 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog();
1116 if (event_log) {
1117 return event_log->StartLogging(file);
1118 }
1119 LOG_RTCERR0(StartRtcEventLog);
1120 return false;
1121 }
1122
1123 void WebRtcVoiceEngine::StopRtcEventLog() {
1124 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1125 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog();
1126 if (event_log) {
1127 event_log->StopLogging();
1128 return;
1129 }
1130 LOG_RTCERR0(StopRtcEventLog);
1131 }
1132
1133 int WebRtcVoiceEngine::CreateVoEChannel() { 1112 int WebRtcVoiceEngine::CreateVoEChannel() {
1134 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1113 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1135 return voe_wrapper_->base()->CreateChannel(voe_config_); 1114 return voe_wrapper_->base()->CreateChannel(voe_config_);
1136 } 1115 }
1137 1116
1138 class WebRtcVoiceMediaChannel::WebRtcAudioSendStream 1117 class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
1139 : public AudioRenderer::Sink { 1118 : public AudioRenderer::Sink {
1140 public: 1119 public:
1141 WebRtcAudioSendStream(int ch, webrtc::AudioTransport* voe_audio_transport, 1120 WebRtcAudioSendStream(int ch, webrtc::AudioTransport* voe_audio_transport,
1142 uint32_t ssrc, const std::string& c_name, 1121 uint32_t ssrc, const std::string& c_name,
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 } 2499 }
2521 } else { 2500 } else {
2522 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2501 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2523 engine()->voe()->base()->StopPlayout(channel); 2502 engine()->voe()->base()->StopPlayout(channel);
2524 } 2503 }
2525 return true; 2504 return true;
2526 } 2505 }
2527 } // namespace cricket 2506 } // namespace cricket
2528 2507
2529 #endif // HAVE_WEBRTC_VOICE 2508 #endif // HAVE_WEBRTC_VOICE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698