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 | 58 |
58 static const int kMaxNumPacketSize = 6; | 59 static const int kMaxNumPacketSize = 6; |
59 struct CodecPref { | 60 struct CodecPref { |
60 const char* name; | 61 const char* name; |
61 int clockrate; | 62 int clockrate; |
62 int channels; | 63 int channels; |
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1329 if (is_dumping_aec_) { | 1330 if (is_dumping_aec_) { |
1330 // Stop dumping AEC when we are dumping. | 1331 // Stop dumping AEC when we are dumping. |
1331 if (voe_wrapper_->processing()->StopDebugRecording() != | 1332 if (voe_wrapper_->processing()->StopDebugRecording() != |
1332 webrtc::AudioProcessing::kNoError) { | 1333 webrtc::AudioProcessing::kNoError) { |
1333 LOG_RTCERR0(StopDebugRecording); | 1334 LOG_RTCERR0(StopDebugRecording); |
1334 } | 1335 } |
1335 is_dumping_aec_ = false; | 1336 is_dumping_aec_ = false; |
1336 } | 1337 } |
1337 } | 1338 } |
1338 | 1339 |
1340 bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file) { | |
1341 FILE* event_log_file = rtc::FdopenPlatformFileForWriting(file); | |
1342 if (!event_log_file) { | |
1343 LOG(LS_ERROR) << "Could not open AEC dump file stream."; | |
Henrik Grunell WebRTC
2015/10/02 10:23:42
Update text.
ivoc
2015/10/07 14:27:27
Done.
| |
1344 if (!rtc::ClosePlatformFile(file)) | |
pthatcher1
2015/10/06 20:49:09
{}s please
ivoc
2015/10/07 14:27:27
Done.
| |
1345 LOG(LS_WARNING) << "Could not close file."; | |
1346 return false; | |
1347 } | |
1348 if (voe_wrapper_->codec()->GetEventLog()->StartLogging(event_log_file) != 0) { | |
1349 LOG_RTCERR0(StartLogging); | |
pthatcher1
2015/10/06 20:49:09
Why does this go through the voice engine? Why do
ivoc
2015/10/07 14:27:27
See other reply. For now VoE owns the logging obje
pthatcher1
2015/10/07 15:59:23
Then can you put a comment in PeerConnectionFactor
ivoc
2015/10/08 16:20:17
Good idea, I added some comments there like you su
| |
1350 fclose(event_log_file); | |
1351 return false; | |
1352 } | |
1353 return true; | |
1354 } | |
1355 | |
1356 void WebRtcVoiceEngine::StopRtcEventLog() { | |
1357 voe_wrapper_->codec()->GetEventLog()->StopLogging(); | |
1358 } | |
1359 | |
1339 int WebRtcVoiceEngine::CreateVoiceChannel(VoEWrapper* voice_engine_wrapper) { | 1360 int WebRtcVoiceEngine::CreateVoiceChannel(VoEWrapper* voice_engine_wrapper) { |
1340 return voice_engine_wrapper->base()->CreateChannel(voe_config_); | 1361 return voice_engine_wrapper->base()->CreateChannel(voe_config_); |
1341 } | 1362 } |
1342 | 1363 |
1343 int WebRtcVoiceEngine::CreateMediaVoiceChannel() { | 1364 int WebRtcVoiceEngine::CreateMediaVoiceChannel() { |
1344 return CreateVoiceChannel(voe_wrapper_.get()); | 1365 return CreateVoiceChannel(voe_wrapper_.get()); |
1345 } | 1366 } |
1346 | 1367 |
1347 class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer | 1368 class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer |
1348 : public AudioRenderer::Sink { | 1369 : public AudioRenderer::Sink { |
(...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3285 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); | 3306 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); |
3286 return false; | 3307 return false; |
3287 } | 3308 } |
3288 } | 3309 } |
3289 return true; | 3310 return true; |
3290 } | 3311 } |
3291 | 3312 |
3292 } // namespace cricket | 3313 } // namespace cricket |
3293 | 3314 |
3294 #endif // HAVE_WEBRTC_VOICE | 3315 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |