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

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

Issue 2544113002: Example MojoVideoDecoder decoder using the command buffer.
Patch Set: Created 4 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
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/gpu_mojo_media_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_MOJO_SERVICES_GPU_MOJO_MEDIA_CLIENT_H_
6 #define MEDIA_MOJO_SERVICES_GPU_MOJO_MEDIA_CLIENT_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/single_thread_task_runner.h"
14 #include "media/mojo/services/mojo_media_client.h"
15
16 namespace media {
17
18 class MediaGpuChannelManager;
19
20 class GpuMojoMediaClient : public MojoMediaClient {
21 public:
22 // |media_gpu_channel_manager| must only be used on |gpu_task_runner|, which
23 // is expected to be the GPU main thread task runner.
24 GpuMojoMediaClient(
25 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner,
26 base::WeakPtr<MediaGpuChannelManager> media_gpu_channel_manager);
27 ~GpuMojoMediaClient() final;
28
29 // MojoMediaClient implementation.
30 std::unique_ptr<AudioDecoder> CreateAudioDecoder(
31 scoped_refptr<base::SingleThreadTaskRunner> task_runner) final;
32 std::unique_ptr<VideoDecoder> CreateVideoDecoder(
33 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
34 mojom::CommandBufferIdPtr command_buffer_id) final;
35 std::unique_ptr<CdmFactory> CreateCdmFactory(
36 service_manager::mojom::InterfaceProvider* interface_provider) final;
37
38 private:
39 scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner_;
40 base::WeakPtr<MediaGpuChannelManager> media_gpu_channel_manager_;
41
42 DISALLOW_COPY_AND_ASSIGN(GpuMojoMediaClient);
43 };
44
45 } // namespace media
46
47 #endif // MEDIA_MOJO_SERVICES_GPU_MOJO_MEDIA_CLIENT_H_
OLDNEW
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/gpu_mojo_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698