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_ |
- |