Index: content/common/gpu/media/gpu_video_decode_accelerator.h |
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h |
index be093025a9300e6e85eb2a0012be528afdc30485..70d9a440437a932eefd260684fc19efc61f84758 100644 |
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h |
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h |
@@ -11,10 +11,15 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/shared_memory.h" |
#include "content/common/gpu/gpu_command_buffer_stub.h" |
+#include "content/common/gpu/media/video_decode_accelerator_impl.h" |
#include "ipc/ipc_listener.h" |
#include "ipc/ipc_sender.h" |
#include "media/video/video_decode_accelerator.h" |
+namespace base { |
+class MessageLoopProxy; |
+} |
+ |
namespace content { |
class GpuVideoDecodeAccelerator |
@@ -55,9 +60,12 @@ class GpuVideoDecodeAccelerator |
// The renderer process handle is valid as long as we have a channel between |
// GPU process and the renderer. |
void Initialize(const media::VideoCodecProfile profile, |
- IPC::Message* init_done_msg); |
+ IPC::Message* init_done_msg, |
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop); |
private: |
+ class MessageFilter; |
+ |
// Handlers for IPC messages. |
void OnDecode(base::SharedMemoryHandle handle, int32 id, uint32 size); |
void OnAssignPictureBuffers( |
@@ -70,6 +78,9 @@ class GpuVideoDecodeAccelerator |
void OnReset(); |
void OnDestroy(); |
+ // Called on IO thread when |filter_| has been removed. |
+ void OnFilterRemoved(); |
+ |
// Message to Send() when initialization is done. Is only non-NULL during |
// initialization and is owned by the IPC channel underlying the |
// GpuCommandBufferStub. |
@@ -82,7 +93,7 @@ class GpuVideoDecodeAccelerator |
GpuCommandBufferStub* stub_; |
// The underlying VideoDecodeAccelerator. |
- scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
+ scoped_ptr<VideoDecodeAcceleratorImpl> video_decode_accelerator_; |
// Callback for making the relevant context current for GL calls. |
// Returns false if failed. |
@@ -91,6 +102,12 @@ class GpuVideoDecodeAccelerator |
// The texture target as requested by ProvidePictureBuffers(). |
uint32 texture_target_; |
+ // The message filter to run VDA::Decode on IO thread if VDA supports it. |
+ scoped_refptr<MessageFilter> filter_; |
+ |
+ // GPU child message loop. |
+ scoped_refptr<base::MessageLoopProxy> child_message_loop_; |
+ |
DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
}; |