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

Unified Diff: media/mojo/services/gpu_mojo_media_client.h

Issue 2382103002: media: Add GpuMojoMediaClient. (Closed)
Patch Set: nogncheck 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/gpu_mojo_media_client.h
diff --git a/media/mojo/services/gpu_mojo_media_client.h b/media/mojo/services/gpu_mojo_media_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..1e5c4b17a59a1d8674ee347be6acb7693d410519
--- /dev/null
+++ b/media/mojo/services/gpu_mojo_media_client.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_MOJO_SERVICES_GPU_MOJO_MEDIA_CLIENT_H_
+#define MEDIA_MOJO_SERVICES_GPU_MOJO_MEDIA_CLIENT_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
+#include "media/mojo/services/mojo_media_client.h"
+
+namespace media {
+
+class MediaGpuChannelManager;
+
+class GpuMojoMediaClient : public MojoMediaClient {
+ public:
+ // |media_gpu_channel_manager| must only be used on |gpu_task_runner|, which
+ // is expected to be the GPU main thread task runner.
+ GpuMojoMediaClient(
+ scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner,
+ base::WeakPtr<MediaGpuChannelManager> media_gpu_channel_manager);
+ ~GpuMojoMediaClient() final;
+
+ // MojoMediaClient implementation.
+ std::unique_ptr<AudioDecoder> CreateAudioDecoder(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) final;
+ std::unique_ptr<VideoDecoder> CreateVideoDecoder(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) final;
+ std::unique_ptr<CdmFactory> CreateCdmFactory(
+ service_manager::mojom::InterfaceProvider* interface_provider) final;
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner_;
+ base::WeakPtr<MediaGpuChannelManager> media_gpu_channel_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuMojoMediaClient);
+};
+
+} // namespace media
+
+#endif // MEDIA_MOJO_SERVICES_GPU_MOJO_MEDIA_CLIENT_H_
« 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