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

Side by Side Diff: mojo/services/html_viewer/webmediaplayer_factory.cc

Issue 651373003: Add support for real audio output to mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_ari
Patch Set: Cleanup. Created 6 years, 2 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 "mojo/services/html_viewer/webmediaplayer_factory.h" 5 #include "mojo/services/html_viewer/webmediaplayer_factory.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/audio/audio_manager.h" 10 #include "media/audio/audio_manager.h"
11 #include "media/audio/audio_manager_base.h" 11 #include "media/audio/audio_manager_base.h"
12 #include "media/audio/null_audio_sink.h" 12 #include "media/audio/audio_output_stream_sink.h"
13 #include "media/base/audio_hardware_config.h" 13 #include "media/base/audio_hardware_config.h"
14 #include "media/base/media.h" 14 #include "media/base/media.h"
15 #include "media/base/media_log.h" 15 #include "media/base/media_log.h"
16 #include "media/blink/null_encrypted_media_player_support.h" 16 #include "media/blink/null_encrypted_media_player_support.h"
17 #include "media/blink/webmediaplayer_impl.h" 17 #include "media/blink/webmediaplayer_impl.h"
18 #include "media/blink/webmediaplayer_params.h" 18 #include "media/blink/webmediaplayer_params.h"
19 #include "media/filters/gpu_video_accelerator_factories.h" 19 #include "media/filters/gpu_video_accelerator_factories.h"
20 20
21 namespace mojo { 21 namespace mojo {
22 22
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #endif 64 #endif
65 } 65 }
66 66
67 const media::AudioHardwareConfig& 67 const media::AudioHardwareConfig&
68 WebMediaPlayerFactory::GetAudioHardwareConfig() { 68 WebMediaPlayerFactory::GetAudioHardwareConfig() {
69 return audio_hardware_config_; 69 return audio_hardware_config_;
70 } 70 }
71 71
72 scoped_refptr<media::AudioRendererSink> 72 scoped_refptr<media::AudioRendererSink>
73 WebMediaPlayerFactory::CreateAudioRendererSink() { 73 WebMediaPlayerFactory::CreateAudioRendererSink() {
74 // TODO(acolwell): Replace this with an AudioRendererSink implementation 74 // TODO(dalecurtis): Replace this with an interface to an actual mojo service;
jamesr 2014/10/21 00:15:45 can you tie this to a crbug that describes the iss
DaleCurtis 2014/10/21 00:23:32 Done.
75 // that actually talks to the audio device or an audio mojo service. 75 // the AudioOutputStreamSink will not work in sandboxed processes.
76 return new media::NullAudioSink(GetMediaThreadTaskRunner()); 76 return new media::AudioOutputStreamSink();
77 } 77 }
78 78
79 scoped_refptr<base::SingleThreadTaskRunner> 79 scoped_refptr<base::SingleThreadTaskRunner>
80 WebMediaPlayerFactory::GetMediaThreadTaskRunner() { 80 WebMediaPlayerFactory::GetMediaThreadTaskRunner() {
81 if (!media_thread_.IsRunning()) 81 if (!media_thread_.IsRunning())
82 media_thread_.Start(); 82 media_thread_.Start();
83 83
84 return media_thread_.message_loop_proxy(); 84 return media_thread_.message_loop_proxy();
85 } 85 }
86 86
87 } // namespace mojo 87 } // namespace mojo
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