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

Unified Diff: chrome/renderer/gpu_video_service_host.h

Issue 2873089: media: gpu process ipc video decoder implementation (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: remove mft Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/gpu_video_decoder_host.cc ('k') | chrome/renderer/gpu_video_service_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/gpu_video_service_host.h
diff --git a/chrome/renderer/gpu_video_service_host.h b/chrome/renderer/gpu_video_service_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..7b9fb65b86b4587cc495dcd410f5f8b42bf729c8
--- /dev/null
+++ b/chrome/renderer/gpu_video_service_host.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2010 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 CHROME_RENDERER_GPU_VIDEO_SERVICE_HOST_H_
+#define CHROME_RENDERER_GPU_VIDEO_SERVICE_HOST_H_
+
+#include <map>
+
+#include "base/singleton.h"
+#include "chrome/common/gpu_video_common.h"
+#include "chrome/renderer/gpu_channel_host.h"
+#include "chrome/renderer/gpu_video_decoder_host.h"
+#include "ipc/ipc_channel.h"
+#include "media/base/buffers.h"
+#include "media/base/video_frame.h"
+
+class GpuVideoServiceHost : public IPC::Channel::Listener,
+ public Singleton<GpuVideoServiceHost> {
+ public:
+ // IPC::Channel::Listener.
+ virtual void OnChannelConnected(int32 peer_pid) {}
+ virtual void OnChannelError();
+ virtual void OnMessageReceived(const IPC::Message& message);
+
+ void OnRendererThreadInit(MessageLoop* message_loop);
+ void OnGpuChannelConnected(GpuChannelHost* channel_host,
+ MessageRouter* router,
+ IPC::SyncChannel* channel);
+
+ // call at RenderThread. one per renderer process.
+ scoped_refptr<GpuVideoDecoderHost> CreateVideoDecoder(
+ GpuVideoDecoderHost::EventHandler* event_handler);
+ void DestroyVideoDecoder(scoped_refptr<GpuVideoDecoderHost>);
+
+ private:
+ GpuVideoServiceHost() : message_loop_(NULL) {
+ service_info_.service_available_ = 0;
+ }
+
+ scoped_refptr<GpuChannelHost> channel_host_;
+ MessageRouter* router_;
+ GpuVideoServiceInfoParam service_info_;
+ MessageLoop* message_loop_; // Message loop of render thread.
+
+ friend struct DefaultSingletonTraits<GpuVideoServiceHost>;
+ DISALLOW_COPY_AND_ASSIGN(GpuVideoServiceHost);
+};
+
+#endif // CHROME_RENDERER_GPU_VIDEO_SERVICE_HOST_H_
+
« no previous file with comments | « chrome/renderer/gpu_video_decoder_host.cc ('k') | chrome/renderer/gpu_video_service_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698