| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/media/media_stream_audio_processor_options.h" | 5 #include "content/renderer/media/media_stream_audio_processor_options.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #if defined(CHROMEOS) | 73 #if defined(CHROMEOS) |
| 74 PathService::Get(base::DIR_TEMP, &path); | 74 PathService::Get(base::DIR_TEMP, &path); |
| 75 #elif defined(ANDROID) | 75 #elif defined(ANDROID) |
| 76 path = base::FilePath(FILE_PATH_LITERAL("sdcard")); | 76 path = base::FilePath(FILE_PATH_LITERAL("sdcard")); |
| 77 #else | 77 #else |
| 78 PathService::Get(base::DIR_EXE, &path); | 78 PathService::Get(base::DIR_EXE, &path); |
| 79 #endif | 79 #endif |
| 80 base::FilePath file = path.Append(FILE_PATH_LITERAL("audio.aecdump")); | 80 base::FilePath file = path.Append(FILE_PATH_LITERAL("audio.aecdump")); |
| 81 | 81 |
| 82 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
| 83 const std::string file_name = WideToUTF8(file.value()); | 83 const std::string file_name = base::WideToUTF8(file.value()); |
| 84 #else | 84 #else |
| 85 const std::string file_name = file.value(); | 85 const std::string file_name = file.value(); |
| 86 #endif | 86 #endif |
| 87 if (audio_processing->StartDebugRecording(file_name.c_str())) | 87 if (audio_processing->StartDebugRecording(file_name.c_str())) |
| 88 DLOG(ERROR) << "Fail to start AEC debug recording"; | 88 DLOG(ERROR) << "Fail to start AEC debug recording"; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void StopAecDump(AudioProcessing* audio_processing) { | 91 void StopAecDump(AudioProcessing* audio_processing) { |
| 92 if (audio_processing->StopDebugRecording()) | 92 if (audio_processing->StopDebugRecording()) |
| 93 DLOG(ERROR) << "Fail to stop AEC debug recording"; | 93 DLOG(ERROR) << "Fail to stop AEC debug recording"; |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace content | 96 } // namespace content |
| OLD | NEW |