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

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

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Two more fixes. 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 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 DCHECK(!audio_thread_); 1789 DCHECK(!audio_thread_);
1789 DCHECK(!audio_manager_); 1790 DCHECK(!audio_manager_);
1790 1791
1791 audio_manager_ = GetContentClient()->browser()->CreateAudioManager( 1792 audio_manager_ = GetContentClient()->browser()->CreateAudioManager(
1792 MediaInternals::GetInstance()); 1793 MediaInternals::GetInstance());
1793 if (!audio_manager_) { 1794 if (!audio_manager_) {
1794 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1795 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1795 audio_manager_ = media::AudioManager::Create( 1796 audio_manager_ = media::AudioManager::Create(
1796 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1797 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1797 MediaInternals::GetInstance()); 1798 MediaInternals::GetInstance());
1799 #if BUILDFLAG(ENABLE_WEBRTC)
1800 // AudioManager is deleted on the audio thread, so it's safe to post
1801 // unretained.
1802 audio_manager_->GetTaskRunner()->PostTask(
pfeldman 2017/02/14 19:44:28 Why is this here, but not in the media::AudioMana
Henrik Grunell 2017/02/14 20:22:17 That's a good point. There was a discussion earlie
DaleCurtis 2017/02/14 20:30:29 Don't want this added as a parameter; instead I'd
Henrik Grunell 2017/02/15 11:45:11 That sounds like a reasonable option, I've changed
1803 FROM_HERE,
1804 base::Bind(&media::AudioManager::InitializeOutputDebugRecording,
1805 base::Unretained(audio_manager_.get()),
1806 base::BindRepeating(&AudioDebugFileWriter::Create)));
1807 #endif
1798 } 1808 }
1799 CHECK(audio_manager_); 1809 CHECK(audio_manager_);
1800 1810
1801 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1811 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1802 CHECK(audio_system_); 1812 CHECK(audio_system_);
1803 } 1813 }
1804 1814
1805 } // namespace content 1815 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698