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

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

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