Index: content/common/gpu/client/gpu_video_decode_accelerator_host.h |
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.h b/content/common/gpu/client/gpu_video_decode_accelerator_host.h |
index 5e4ba9df1f6cced6d26096f163b0bda63bd10368..e55b4dcd1186cefce81ea9924acaaa3a959b489f 100644 |
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.h |
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.h |
@@ -13,7 +13,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/threading/non_thread_safe.h" |
#include "content/common/gpu/client/command_buffer_proxy_impl.h" |
-#include "ipc/ipc_listener.h" |
+#include "content/common/gpu/client/ipc/gpu_video_decode_accelerator_host_ipc_transport.h" |
#include "media/video/video_decode_accelerator.h" |
#include "ui/gfx/geometry/size.h" |
@@ -23,22 +23,21 @@ class GpuChannelHost; |
// This class is used to talk to VideoDecodeAccelerator in the Gpu process |
// through IPC messages. |
class GpuVideoDecodeAcceleratorHost |
- : public IPC::Listener, |
- public media::VideoDecodeAccelerator, |
+ : public media::VideoDecodeAccelerator, |
public CommandBufferProxyImpl::DeletionObserver, |
+ public GpuVideoDecodeAcceleratorHostIPCTransport::Client, |
public base::NonThreadSafe { |
public: |
// |this| is guaranteed not to outlive |channel| and |impl|. (See comments |
// for |channel_| and |impl_|.) |
- GpuVideoDecodeAcceleratorHost(GpuChannelHost* channel, |
- CommandBufferProxyImpl* impl); |
- |
- // IPC::Listener implementation. |
- void OnChannelError() override; |
- bool OnMessageReceived(const IPC::Message& message) override; |
+ GpuVideoDecodeAcceleratorHost( |
+ GpuChannelHost* channel, |
+ scoped_ptr<GpuVideoDecodeAcceleratorHostIPCTransport> transport, |
+ CommandBufferProxyImpl* impl); |
// media::VideoDecodeAccelerator implementation. |
- bool Initialize(const Config& config, Client* client) override; |
+ bool Initialize(const Config& config, |
+ media::VideoDecodeAccelerator::Client* client) override; |
void SetCdm(int cdm_id) override; |
void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
void AssignPictureBuffers( |
@@ -56,36 +55,33 @@ class GpuVideoDecodeAcceleratorHost |
~GpuVideoDecodeAcceleratorHost() override; |
// Notify |client_| of an error. Posts a task to avoid re-entrancy. |
- void PostNotifyError(Error); |
- |
- void Send(IPC::Message* message); |
+ void PostNotifyError(media::VideoDecodeAccelerator::Error error); |
// IPC handlers, proxying media::VideoDecodeAccelerator::Client for the GPU |
// process. Should not be called directly. |
- void OnCdmAttached(bool success); |
- void OnBitstreamBufferProcessed(int32_t bitstream_buffer_id); |
+ void OnCdmAttached(bool success) override; |
+ void OnBitstreamBufferProcessed(int32_t bitstream_buffer_id) override; |
void OnProvidePictureBuffer(uint32_t num_requested_buffers, |
const gfx::Size& dimensions, |
- uint32_t texture_target); |
- void OnDismissPictureBuffer(int32_t picture_buffer_id); |
+ uint32_t texture_target) override; |
+ void OnDismissPictureBuffer(int32_t picture_buffer_id) override; |
void OnPictureReady(int32_t picture_buffer_id, |
int32_t bitstream_buffer_id, |
const gfx::Rect& visible_rect, |
- bool allow_overlay); |
- void OnFlushDone(); |
- void OnResetDone(); |
- void OnNotifyError(uint32_t error); |
+ bool allow_overlay) override; |
+ void OnFlushDone() override; |
+ void OnResetDone() override; |
+ void OnNotifyError(uint32_t error) override; |
// Unowned reference to the GpuChannelHost to send IPC messages to the GPU |
// process. |channel_| outlives |impl_|, so the reference is always valid as |
// long as it is not NULL. |
GpuChannelHost* channel_; |
- // Route ID for the associated decoder in the GPU process. |
- int32_t decoder_route_id_; |
+ scoped_ptr<GpuVideoDecodeAcceleratorHostIPCTransport> transport_; |
// The client that will receive callbacks from the decoder. |
- Client* client_; |
+ media::VideoDecodeAccelerator::Client* client_; |
// Unowned reference to the CommandBufferProxyImpl that created us. |this| |
// registers as a DeletionObserver of |impl_|, the so reference is always |