| 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 13 matching lines...) Expand all Loading... |
| 24 #include "webrtc/audio_sink.h" | 24 #include "webrtc/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/base/trace_event.h" | 33 #include "webrtc/base/trace_event.h" |
| 34 #include "webrtc/call/rtc_event_log.h" | |
| 35 #include "webrtc/common.h" | 34 #include "webrtc/common.h" |
| 36 #include "webrtc/media/base/audioframe.h" | 35 #include "webrtc/media/base/audioframe.h" |
| 37 #include "webrtc/media/base/audiosource.h" | 36 #include "webrtc/media/base/audiosource.h" |
| 38 #include "webrtc/media/base/mediaconstants.h" | 37 #include "webrtc/media/base/mediaconstants.h" |
| 39 #include "webrtc/media/base/streamparams.h" | 38 #include "webrtc/media/base/streamparams.h" |
| 40 #include "webrtc/media/engine/webrtcmediaengine.h" | 39 #include "webrtc/media/engine/webrtcmediaengine.h" |
| 41 #include "webrtc/media/engine/webrtcvoe.h" | 40 #include "webrtc/media/engine/webrtcvoe.h" |
| 42 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 41 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
| 43 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 42 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 44 #include "webrtc/system_wrappers/include/field_trial.h" | 43 #include "webrtc/system_wrappers/include/field_trial.h" |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 if (is_dumping_aec_) { | 1108 if (is_dumping_aec_) { |
| 1110 // Stop dumping AEC when we are dumping. | 1109 // Stop dumping AEC when we are dumping. |
| 1111 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != | 1110 if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != |
| 1112 webrtc::AudioProcessing::kNoError) { | 1111 webrtc::AudioProcessing::kNoError) { |
| 1113 LOG_RTCERR0(StopDebugRecording); | 1112 LOG_RTCERR0(StopDebugRecording); |
| 1114 } | 1113 } |
| 1115 is_dumping_aec_ = false; | 1114 is_dumping_aec_ = false; |
| 1116 } | 1115 } |
| 1117 } | 1116 } |
| 1118 | 1117 |
| 1119 bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file) { | |
| 1120 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
| 1121 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog(); | |
| 1122 if (event_log) { | |
| 1123 return event_log->StartLogging(file); | |
| 1124 } | |
| 1125 LOG_RTCERR0(StartRtcEventLog); | |
| 1126 return false; | |
| 1127 } | |
| 1128 | |
| 1129 void WebRtcVoiceEngine::StopRtcEventLog() { | |
| 1130 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
| 1131 webrtc::RtcEventLog* event_log = voe_wrapper_->codec()->GetEventLog(); | |
| 1132 if (event_log) { | |
| 1133 event_log->StopLogging(); | |
| 1134 return; | |
| 1135 } | |
| 1136 LOG_RTCERR0(StopRtcEventLog); | |
| 1137 } | |
| 1138 | |
| 1139 int WebRtcVoiceEngine::CreateVoEChannel() { | 1118 int WebRtcVoiceEngine::CreateVoEChannel() { |
| 1140 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1119 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 1141 return voe_wrapper_->base()->CreateChannel(voe_config_); | 1120 return voe_wrapper_->base()->CreateChannel(voe_config_); |
| 1142 } | 1121 } |
| 1143 | 1122 |
| 1144 class WebRtcVoiceMediaChannel::WebRtcAudioSendStream | 1123 class WebRtcVoiceMediaChannel::WebRtcAudioSendStream |
| 1145 : public AudioSource::Sink { | 1124 : public AudioSource::Sink { |
| 1146 public: | 1125 public: |
| 1147 WebRtcAudioSendStream(int ch, webrtc::AudioTransport* voe_audio_transport, | 1126 WebRtcAudioSendStream(int ch, webrtc::AudioTransport* voe_audio_transport, |
| 1148 uint32_t ssrc, const std::string& c_name, | 1127 uint32_t ssrc, const std::string& c_name, |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 } | 2519 } |
| 2541 } else { | 2520 } else { |
| 2542 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2521 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
| 2543 engine()->voe()->base()->StopPlayout(channel); | 2522 engine()->voe()->base()->StopPlayout(channel); |
| 2544 } | 2523 } |
| 2545 return true; | 2524 return true; |
| 2546 } | 2525 } |
| 2547 } // namespace cricket | 2526 } // namespace cricket |
| 2548 | 2527 |
| 2549 #endif // HAVE_WEBRTC_VOICE | 2528 #endif // HAVE_WEBRTC_VOICE |
| OLD | NEW |