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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review. Rebase. Created 3 years, 10 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "content/browser/gpu/gpu_data_manager_impl.h" 61 #include "content/browser/gpu/gpu_data_manager_impl.h"
62 #include "content/browser/gpu/gpu_process_host.h" 62 #include "content/browser/gpu/gpu_process_host.h"
63 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 63 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
64 #include "content/browser/gpu/shader_cache_factory.h" 64 #include "content/browser/gpu/shader_cache_factory.h"
65 #include "content/browser/histogram_synchronizer.h" 65 #include "content/browser/histogram_synchronizer.h"
66 #include "content/browser/loader/resource_dispatcher_host_impl.h" 66 #include "content/browser/loader/resource_dispatcher_host_impl.h"
67 #include "content/browser/loader_delegate_impl.h" 67 #include "content/browser/loader_delegate_impl.h"
68 #include "content/browser/media/media_internals.h" 68 #include "content/browser/media/media_internals.h"
69 #include "content/browser/memory/memory_coordinator_impl.h" 69 #include "content/browser/memory/memory_coordinator_impl.h"
70 #include "content/browser/net/browser_online_state_observer.h" 70 #include "content/browser/net/browser_online_state_observer.h"
71 #include "content/browser/renderer_host/media/audio_debug_file_writer.h"
71 #include "content/browser/renderer_host/media/media_stream_manager.h" 72 #include "content/browser/renderer_host/media/media_stream_manager.h"
72 #include "content/browser/renderer_host/render_process_host_impl.h" 73 #include "content/browser/renderer_host/render_process_host_impl.h"
73 #include "content/browser/service_manager/service_manager_context.h" 74 #include "content/browser/service_manager/service_manager_context.h"
74 #include "content/browser/speech/speech_recognition_manager_impl.h" 75 #include "content/browser/speech/speech_recognition_manager_impl.h"
75 #include "content/browser/startup_task_runner.h" 76 #include "content/browser/startup_task_runner.h"
76 #include "content/browser/utility_process_host_impl.h" 77 #include "content/browser/utility_process_host_impl.h"
77 #include "content/browser/webui/content_web_ui_controller_factory.h" 78 #include "content/browser/webui/content_web_ui_controller_factory.h"
78 #include "content/browser/webui/url_data_manager.h" 79 #include "content/browser/webui/url_data_manager.h"
79 #include "content/common/content_switches_internal.h" 80 #include "content/common/content_switches_internal.h"
80 #include "content/common/host_shared_bitmap_manager.h" 81 #include "content/common/host_shared_bitmap_manager.h"
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 DCHECK(!audio_thread_); 1792 DCHECK(!audio_thread_);
1792 DCHECK(!audio_manager_); 1793 DCHECK(!audio_manager_);
1793 1794
1794 audio_manager_ = GetContentClient()->browser()->CreateAudioManager( 1795 audio_manager_ = GetContentClient()->browser()->CreateAudioManager(
1795 MediaInternals::GetInstance()); 1796 MediaInternals::GetInstance());
1796 if (!audio_manager_) { 1797 if (!audio_manager_) {
1797 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1798 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1798 audio_manager_ = media::AudioManager::Create( 1799 audio_manager_ = media::AudioManager::Create(
1799 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1800 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1800 MediaInternals::GetInstance()); 1801 MediaInternals::GetInstance());
1802 #if BUILDFLAG(ENABLE_WEBRTC)
1803 // AudioManager is deleted on the audio thread, so it's safe to post
1804 // unretained.
1805 audio_manager_->GetTaskRunner()->PostTask(
1806 FROM_HERE,
1807 base::Bind(&media::AudioManager::InitializeOutputDebugRecording,
1808 base::Unretained(audio_manager_.get()),
1809 base::BindRepeating(&AudioDebugFileWriter::Create)));
Max Morin 2017/02/09 09:47:26 Just use base::MakeUnique<media::AudioFileWriter>,
Henrik Grunell 2017/02/10 09:00:56 It would need to be base::MakeUnique<media::AudioD
1810 #endif
1801 } 1811 }
1802 CHECK(audio_manager_); 1812 CHECK(audio_manager_);
1803 1813
1804 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1814 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1805 CHECK(audio_system_); 1815 CHECK(audio_system_);
1806 } 1816 }
1807 1817
1808 } // namespace content 1818 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698