OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 #include "talk/media/base/constants.h" | 43 #include "talk/media/base/constants.h" |
44 #include "talk/media/base/streamparams.h" | 44 #include "talk/media/base/streamparams.h" |
45 #include "talk/media/webrtc/webrtcvoe.h" | 45 #include "talk/media/webrtc/webrtcvoe.h" |
46 #include "webrtc/base/base64.h" | 46 #include "webrtc/base/base64.h" |
47 #include "webrtc/base/byteorder.h" | 47 #include "webrtc/base/byteorder.h" |
48 #include "webrtc/base/common.h" | 48 #include "webrtc/base/common.h" |
49 #include "webrtc/base/helpers.h" | 49 #include "webrtc/base/helpers.h" |
50 #include "webrtc/base/logging.h" | 50 #include "webrtc/base/logging.h" |
51 #include "webrtc/base/stringencode.h" | 51 #include "webrtc/base/stringencode.h" |
52 #include "webrtc/base/stringutils.h" | 52 #include "webrtc/base/stringutils.h" |
53 #include "webrtc/call/rtc_event_log.h" | |
53 #include "webrtc/common.h" | 54 #include "webrtc/common.h" |
54 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 55 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
55 | 56 |
56 namespace cricket { | 57 namespace cricket { |
57 namespace { | 58 namespace { |
58 | 59 |
59 const int kMaxNumPacketSize = 6; | 60 const int kMaxNumPacketSize = 6; |
60 struct CodecPref { | 61 struct CodecPref { |
61 const char* name; | 62 const char* name; |
62 int clockrate; | 63 int clockrate; |
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1269 if (is_dumping_aec_) { | 1270 if (is_dumping_aec_) { |
1270 // Stop dumping AEC when we are dumping. | 1271 // Stop dumping AEC when we are dumping. |
1271 if (voe_wrapper_->processing()->StopDebugRecording() != | 1272 if (voe_wrapper_->processing()->StopDebugRecording() != |
1272 webrtc::AudioProcessing::kNoError) { | 1273 webrtc::AudioProcessing::kNoError) { |
1273 LOG_RTCERR0(StopDebugRecording); | 1274 LOG_RTCERR0(StopDebugRecording); |
1274 } | 1275 } |
1275 is_dumping_aec_ = false; | 1276 is_dumping_aec_ = false; |
1276 } | 1277 } |
1277 } | 1278 } |
1278 | 1279 |
1280 bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file) { | |
1281 if (voe_wrapper_->codec()->GetEventLog()->StartLogging(file) != 0) { | |
1282 LOG_RTCERR0(StartLogging); | |
1283 if (!rtc::ClosePlatformFile(file)) { | |
the sun
2015/10/14 09:29:09
RtcEventLogImpl::StartLogging() takes ownership of
ivoc
2015/10/14 12:23:47
Good point, removed.
| |
1284 LOG(LS_WARNING) << "Could not close file."; | |
1285 } | |
1286 return false; | |
1287 } | |
1288 return true; | |
1289 } | |
1290 | |
1291 void WebRtcVoiceEngine::StopRtcEventLog() { | |
1292 voe_wrapper_->codec()->GetEventLog()->StopLogging(); | |
1293 } | |
1294 | |
1279 int WebRtcVoiceEngine::CreateVoiceChannel(VoEWrapper* voice_engine_wrapper) { | 1295 int WebRtcVoiceEngine::CreateVoiceChannel(VoEWrapper* voice_engine_wrapper) { |
1280 return voice_engine_wrapper->base()->CreateChannel(voe_config_); | 1296 return voice_engine_wrapper->base()->CreateChannel(voe_config_); |
1281 } | 1297 } |
1282 | 1298 |
1283 int WebRtcVoiceEngine::CreateMediaVoiceChannel() { | 1299 int WebRtcVoiceEngine::CreateMediaVoiceChannel() { |
1284 return CreateVoiceChannel(voe_wrapper_.get()); | 1300 return CreateVoiceChannel(voe_wrapper_.get()); |
1285 } | 1301 } |
1286 | 1302 |
1287 class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer | 1303 class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer |
1288 : public AudioRenderer::Sink { | 1304 : public AudioRenderer::Sink { |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3220 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); | 3236 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); |
3221 return false; | 3237 return false; |
3222 } | 3238 } |
3223 } | 3239 } |
3224 return true; | 3240 return true; |
3225 } | 3241 } |
3226 | 3242 |
3227 } // namespace cricket | 3243 } // namespace cricket |
3228 | 3244 |
3229 #endif // HAVE_WEBRTC_VOICE | 3245 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |