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

Side by Side Diff: media/mojo/services/mojo_media_client.h

Issue 1466633002: media: Add ProvisionFetcher mojo interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix std::move use Created 5 years 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 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 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_
7 7
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "media/base/audio_decoder.h" 11 #include "media/base/audio_decoder.h"
12 #include "media/base/audio_hardware_config.h" 12 #include "media/base/audio_hardware_config.h"
13 #include "media/base/audio_renderer_sink.h" 13 #include "media/base/audio_renderer_sink.h"
14 #include "media/base/cdm_factory.h" 14 #include "media/base/cdm_factory.h"
15 #include "media/base/media_log.h" 15 #include "media/base/media_log.h"
16 #include "media/base/renderer_factory.h" 16 #include "media/base/renderer_factory.h"
17 #include "media/base/video_decoder.h" 17 #include "media/base/video_decoder.h"
18 #include "media/base/video_renderer_sink.h" 18 #include "media/base/video_renderer_sink.h"
19 19
20 namespace mojo {
21 class ServiceProvider;
22 }
23
20 namespace media { 24 namespace media {
21 25
22 // Interface class which clients will extend to override (at compile time) the 26 // Interface class which clients will extend to override (at compile time) the
23 // default configurations for mojo media services. 27 // default configurations for mojo media services.
24 class PlatformMojoMediaClient { 28 class PlatformMojoMediaClient {
25 public: 29 public:
26 virtual ~PlatformMojoMediaClient(); 30 virtual ~PlatformMojoMediaClient();
27 31
28 // Returns the RendererFactory to be used by MojoRendererService. If returns 32 // Returns the RendererFactory to be used by MojoRendererService. If returns
29 // null, a RendererImpl will be used with audio/video decoders provided in 33 // null, a RendererImpl will be used with audio/video decoders provided in
(...skipping 16 matching lines...) Expand all
46 // The output sink used for rendering audio or video respectively. 50 // The output sink used for rendering audio or video respectively.
47 virtual scoped_refptr<AudioRendererSink> CreateAudioRendererSink(); 51 virtual scoped_refptr<AudioRendererSink> CreateAudioRendererSink();
48 virtual scoped_ptr<VideoRendererSink> CreateVideoRendererSink( 52 virtual scoped_ptr<VideoRendererSink> CreateVideoRendererSink(
49 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); 53 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
50 54
51 // The platform's audio hardware configuration. Note, this must remain 55 // The platform's audio hardware configuration. Note, this must remain
52 // constant for the lifetime of the PlatformMojoMediaClient. 56 // constant for the lifetime of the PlatformMojoMediaClient.
53 virtual const AudioHardwareConfig* GetAudioHardwareConfig(); 57 virtual const AudioHardwareConfig* GetAudioHardwareConfig();
54 58
55 // Returns the CdmFactory to be used by MojoCdmService. 59 // Returns the CdmFactory to be used by MojoCdmService.
56 virtual scoped_ptr<CdmFactory> CreateCdmFactory(); 60 virtual scoped_ptr<CdmFactory> CreateCdmFactory(
61 mojo::ServiceProvider* service_provider);
57 }; 62 };
58 63
59 class MojoMediaClient { 64 class MojoMediaClient {
60 public: 65 public:
61 // Returns an instance of the MojoMediaClient object. Only one instance will 66 // Returns an instance of the MojoMediaClient object. Only one instance will
62 // exist per process. 67 // exist per process.
63 static MojoMediaClient* Get(); 68 static MojoMediaClient* Get();
64 69
65 // Copy of the PlatformMojoMediaClient interface. 70 // Copy of the PlatformMojoMediaClient interface.
66 scoped_ptr<RendererFactory> CreateRendererFactory( 71 scoped_ptr<RendererFactory> CreateRendererFactory(
67 const scoped_refptr<MediaLog>& media_log); 72 const scoped_refptr<MediaLog>& media_log);
68 ScopedVector<AudioDecoder> CreateAudioDecoders( 73 ScopedVector<AudioDecoder> CreateAudioDecoders(
69 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 74 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
70 const scoped_refptr<MediaLog>& media_log); 75 const scoped_refptr<MediaLog>& media_log);
71 ScopedVector<VideoDecoder> CreateVideoDecoders( 76 ScopedVector<VideoDecoder> CreateVideoDecoders(
72 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 77 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
73 const scoped_refptr<MediaLog>& media_log); 78 const scoped_refptr<MediaLog>& media_log);
74 scoped_refptr<AudioRendererSink> CreateAudioRendererSink(); 79 scoped_refptr<AudioRendererSink> CreateAudioRendererSink();
75 scoped_ptr<VideoRendererSink> CreateVideoRendererSink( 80 scoped_ptr<VideoRendererSink> CreateVideoRendererSink(
76 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); 81 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
77 const AudioHardwareConfig* GetAudioHardwareConfig(); 82 const AudioHardwareConfig* GetAudioHardwareConfig();
78 scoped_ptr<CdmFactory> CreateCdmFactory(); 83 scoped_ptr<CdmFactory> CreateCdmFactory(
84 mojo::ServiceProvider* service_provider);
79 85
80 private: 86 private:
81 friend struct base::DefaultLazyInstanceTraits<MojoMediaClient>; 87 friend struct base::DefaultLazyInstanceTraits<MojoMediaClient>;
82 88
83 MojoMediaClient(); 89 MojoMediaClient();
84 ~MojoMediaClient(); 90 ~MojoMediaClient();
85 91
86 scoped_ptr<PlatformMojoMediaClient> mojo_media_client_; 92 scoped_ptr<PlatformMojoMediaClient> mojo_media_client_;
87 93
88 DISALLOW_COPY_AND_ASSIGN(MojoMediaClient); 94 DISALLOW_COPY_AND_ASSIGN(MojoMediaClient);
89 }; 95 };
90 96
91 } // namespace media 97 } // namespace media
92 98
93 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ 99 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_
OLDNEW
« no previous file with comments | « media/mojo/services/default_mojo_media_client.cc ('k') | media/mojo/services/mojo_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698