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

Unified Diff: chrome/renderer/gpu_video_service_host.h

Issue 3215008: Connect GpuVideoDecodeServiceHost with ggl::Context and CommandBufferProxy (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fixed comments 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
index 1d458e96e38f0e533ae299ba38bfdf2fd1632e24..1cb5ad5f64318e86f6a10174c4b807d85f075471 100644
--- a/chrome/renderer/gpu_video_service_host.h
+++ b/chrome/renderer/gpu_video_service_host.h
@@ -13,6 +13,9 @@
#include "media/base/buffers.h"
#include "media/base/video_frame.h"
+// A GpuVideoServiceHost is a singleton in the renderer process that provides
+// access to hardware accelerated video decoding device in the GPU process
+// though a GpuVideoDecoderHost.
class GpuVideoServiceHost : public IPC::Channel::Listener,
public Singleton<GpuVideoServiceHost> {
public:
@@ -26,10 +29,31 @@ class GpuVideoServiceHost : public IPC::Channel::Listener,
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>);
+ // Called by GpuChannelHost when a GPU channel is established.
+ void OnGpuChannelConnected(GpuChannelHost* channel_host,
scherkus (not reviewing) 2010/09/01 03:29:40 wait.. this method is not declared twice what's g
+ MessageRouter* router,
+ IPC::SyncChannel* channel);
+
+ // Called on RenderThread to create a hardware accelerated video decoder
+ // in the GPU process.
+ //
+ // A routing ID for the GLES2 context needs to be provided when creating a
+ // hardware video decoder. This is important because the resources used by
+ // the video decoder needs to be shared with the GLES2 context corresponding
+ // to the RenderView.
+ //
+ // This means that a GPU video decoder is tied to a specific RenderView and
+ // its GLES2 context in the GPU process.
+ //
+ // Returns a GpuVideoDecoderHost as a handle to control the video decoder.
+ GpuVideoDecoderHost* CreateVideoDecoder(int context_route_id);
+
+ // TODO(hclam): Provide a method to destroy the decoder. We also need to
+ // listen to context lost event.
+
+ // Methods called by GpuVideoDecoderHost.
+ void AddRoute(int route_id, GpuVideoDecoderHost* decoder_host);
+ void RemoveRoute(int route_id);
private:
GpuVideoServiceHost();
@@ -44,4 +68,3 @@ class GpuVideoServiceHost : public IPC::Channel::Listener,
};
#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