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

Side by Side Diff: media/mojo/services/test_mojo_media_client.cc

Issue 1892433002: Moving device description utils from AudioManager[Base] into AudioDeviceDescription; to be shared b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 4 years, 7 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
« no previous file with comments | « media/media.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/mojo/services/test_mojo_media_client.h" 5 #include "media/mojo/services/test_mojo_media_client.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "media/audio/audio_manager_base.h" 10 #include "media/audio/audio_device_description.h"
11 #include "media/audio/audio_manager.h"
11 #include "media/audio/audio_output_stream_sink.h" 12 #include "media/audio/audio_output_stream_sink.h"
12 #include "media/base/audio_hardware_config.h" 13 #include "media/base/audio_hardware_config.h"
13 #include "media/base/media.h" 14 #include "media/base/media.h"
14 #include "media/base/null_video_sink.h" 15 #include "media/base/null_video_sink.h"
15 #include "media/cdm/default_cdm_factory.h" 16 #include "media/cdm/default_cdm_factory.h"
16 #include "media/renderers/default_renderer_factory.h" 17 #include "media/renderers/default_renderer_factory.h"
17 #include "media/renderers/gpu_video_accelerator_factories.h" 18 #include "media/renderers/gpu_video_accelerator_factories.h"
18 19
19 namespace media { 20 namespace media {
20 21
(...skipping 10 matching lines...) Expand all
31 if (!audio_manager) { 32 if (!audio_manager) {
32 audio_manager_ = media::AudioManager::CreateForTesting( 33 audio_manager_ = media::AudioManager::CreateForTesting(
33 base::ThreadTaskRunnerHandle::Get()); 34 base::ThreadTaskRunnerHandle::Get());
34 audio_manager = audio_manager_.get(); 35 audio_manager = audio_manager_.get();
35 // Flush the message loop to ensure that the audio manager is initialized. 36 // Flush the message loop to ensure that the audio manager is initialized.
36 base::RunLoop().RunUntilIdle(); 37 base::RunLoop().RunUntilIdle();
37 } 38 }
38 39
39 audio_hardware_config_.reset(new AudioHardwareConfig( 40 audio_hardware_config_.reset(new AudioHardwareConfig(
40 audio_manager->GetInputStreamParameters( 41 audio_manager->GetInputStreamParameters(
41 AudioManagerBase::kDefaultDeviceId), 42 AudioDeviceDescription::kDefaultDeviceId),
42 audio_manager->GetDefaultOutputStreamParameters())); 43 audio_manager->GetDefaultOutputStreamParameters()));
43 } 44 }
44 45
45 void TestMojoMediaClient::WillQuit() { 46 void TestMojoMediaClient::WillQuit() {
46 DVLOG(1) << __FUNCTION__; 47 DVLOG(1) << __FUNCTION__;
47 // AudioManager destructor requires MessageLoop. 48 // AudioManager destructor requires MessageLoop.
48 // Destroy it before the message loop goes away. 49 // Destroy it before the message loop goes away.
49 audio_manager_.reset(); 50 audio_manager_.reset();
50 // Flush the message loop to ensure that the audio manager is destroyed. 51 // Flush the message loop to ensure that the audio manager is destroyed.
51 base::RunLoop().RunUntilIdle(); 52 base::RunLoop().RunUntilIdle();
(...skipping 25 matching lines...) Expand all
77 return video_renderer_sink_.get(); 78 return video_renderer_sink_.get();
78 } 79 }
79 80
80 std::unique_ptr<CdmFactory> TestMojoMediaClient::CreateCdmFactory( 81 std::unique_ptr<CdmFactory> TestMojoMediaClient::CreateCdmFactory(
81 shell::mojom::InterfaceProvider* /* interface_provider */) { 82 shell::mojom::InterfaceProvider* /* interface_provider */) {
82 DVLOG(1) << __FUNCTION__; 83 DVLOG(1) << __FUNCTION__;
83 return base::WrapUnique(new DefaultCdmFactory()); 84 return base::WrapUnique(new DefaultCdmFactory());
84 } 85 }
85 86
86 } // namespace media 87 } // namespace media
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698