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

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

Issue 2643713003: Allow to use the DefaultRendererFactory from a Utility Process (Closed)
Patch Set: Rebase Created 3 years, 10 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_UTILITY_MOJO_MEDIA_CLIENT_H_ 5 #ifndef MEDIA_MOJO_SERVICES_UTILITY_MOJO_MEDIA_CLIENT_H_
6 #define MEDIA_MOJO_SERVICES_UTILITY_MOJO_MEDIA_CLIENT_H_ 6 #define MEDIA_MOJO_SERVICES_UTILITY_MOJO_MEDIA_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/single_thread_task_runner.h"
10 #include "media/mojo/services/mojo_media_client.h" 11 #include "media/mojo/services/mojo_media_client.h"
11 12
12 namespace base { 13 namespace base {
13 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
14 } 15 }
15 16
16 namespace media { 17 namespace media {
17 18
18 class VideoDecoder; 19 class VideoDecoder;
19 20
20 // Default MojoMediaClient for MediaService. 21 // Default MojoMediaClient for MediaService.
21 class UtilityMojoMediaClient : public MojoMediaClient { 22 class UtilityMojoMediaClient : public MojoMediaClient {
22 public: 23 public:
23 UtilityMojoMediaClient(); 24 UtilityMojoMediaClient(
25 scoped_refptr<base::SingleThreadTaskRunner> utility_task_runner);
24 ~UtilityMojoMediaClient() final; 26 ~UtilityMojoMediaClient() final;
25 27
26 // MojoMediaClient implementation. 28 // MojoMediaClient implementation.
27 void Initialize(service_manager::Connector* connector) final; 29 void Initialize(service_manager::Connector* connector) final;
30 scoped_refptr<AudioRendererSink> CreateAudioRendererSink(
31 const std::string& audio_device_id) final;
32 std::unique_ptr<VideoRendererSink> CreateVideoRendererSink(
33 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) final;
28 std::unique_ptr<VideoDecoder> CreateVideoDecoder( 34 std::unique_ptr<VideoDecoder> CreateVideoDecoder(
29 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 35 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
30 mojom::CommandBufferIdPtr command_buffer_id) final; 36 mojom::CommandBufferIdPtr command_buffer_id) final;
37 std::unique_ptr<RendererFactory> CreateRendererFactory(
38 const scoped_refptr<MediaLog>& media_log) final;
39
40 private:
41 scoped_refptr<base::SingleThreadTaskRunner> utility_task_runner_;
31 42
32 DISALLOW_COPY_AND_ASSIGN(UtilityMojoMediaClient); 43 DISALLOW_COPY_AND_ASSIGN(UtilityMojoMediaClient);
33 }; 44 };
34 45
35 } // namespace media 46 } // namespace media
36 47
37 #endif // MEDIA_MOJO_SERVICES_UTILITY_MOJO_MEDIA_CLIENT_H_ 48 #endif // MEDIA_MOJO_SERVICES_UTILITY_MOJO_MEDIA_CLIENT_H_
OLDNEW
« no previous file with comments | « media/mojo/services/test_mojo_media_client.cc ('k') | media/mojo/services/utility_mojo_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698