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

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

Issue 1231623003: media: Support CdmFactory in MojoMediaClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 5 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 | « no previous file | media/mojo/services/mojo_cdm_service.h » ('j') | 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/mojo_media_client.h" 5 #include "media/mojo/services/mojo_media_client.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "media/audio/audio_manager_base.h" 8 #include "media/audio/audio_manager_base.h"
9 #include "media/audio/audio_output_stream_sink.h" 9 #include "media/audio/audio_output_stream_sink.h"
10 #include "media/audio/fake_audio_log_factory.h" 10 #include "media/audio/fake_audio_log_factory.h"
11 #include "media/base/media.h" 11 #include "media/base/media.h"
12 #include "media/base/null_video_sink.h" 12 #include "media/base/null_video_sink.h"
13 #include "media/cdm/default_cdm_factory.h"
13 #include "media/renderers/default_renderer_factory.h" 14 #include "media/renderers/default_renderer_factory.h"
14 #include "media/renderers/gpu_video_accelerator_factories.h" 15 #include "media/renderers/gpu_video_accelerator_factories.h"
15 16
16 namespace media { 17 namespace media {
17 namespace internal { 18 namespace internal {
18 19
19 class DefaultMojoMediaClient : public PlatformMojoMediaClient { 20 class DefaultMojoMediaClient : public PlatformMojoMediaClient {
20 public: 21 public:
21 DefaultMojoMediaClient() { 22 DefaultMojoMediaClient() {
22 InitializeMediaLibrary(); 23 InitializeMediaLibrary();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) override { 66 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) override {
66 return make_scoped_ptr( 67 return make_scoped_ptr(
67 new NullVideoSink(false, base::TimeDelta::FromSecondsD(1.0 / 60), 68 new NullVideoSink(false, base::TimeDelta::FromSecondsD(1.0 / 60),
68 NullVideoSink::NewFrameCB(), task_runner)); 69 NullVideoSink::NewFrameCB(), task_runner));
69 } 70 }
70 71
71 const AudioHardwareConfig& GetAudioHardwareConfig() override { 72 const AudioHardwareConfig& GetAudioHardwareConfig() override {
72 return *audio_hardware_config_; 73 return *audio_hardware_config_;
73 } 74 }
74 75
76 scoped_ptr<CdmFactory> GetCdmFactory() override {
77 return make_scoped_ptr(new DefaultCdmFactory());
78 }
79
75 private: 80 private:
76 FakeAudioLogFactory fake_audio_log_factory_; 81 FakeAudioLogFactory fake_audio_log_factory_;
77 scoped_ptr<AudioHardwareConfig> audio_hardware_config_; 82 scoped_ptr<AudioHardwareConfig> audio_hardware_config_;
78 83
79 DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient); 84 DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient);
80 }; 85 };
81 86
82 scoped_ptr<PlatformMojoMediaClient> CreatePlatformMojoMediaClient() { 87 scoped_ptr<PlatformMojoMediaClient> CreatePlatformMojoMediaClient() {
83 return make_scoped_ptr(new DefaultMojoMediaClient()); 88 return make_scoped_ptr(new DefaultMojoMediaClient());
84 } 89 }
85 90
86 } // namespace internal 91 } // namespace internal
87 } // namespace media 92 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/mojo/services/mojo_cdm_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698