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

Unified 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 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..3ed67ae86dd5c5488766f71c350c744794d90362
--- /dev/null
+++ b/media/mojo/services/gpu_mojo_media_client.h
@@ -0,0 +1,47 @@
+// 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,
+ mojom::CommandBufferIdPtr command_buffer_id) 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