| Index: content/common/gpu/client/gpu_video_encode_accelerator_host.h
|
| diff --git a/content/common/gpu/client/gpu_video_encode_accelerator_host.h b/content/common/gpu/client/gpu_video_encode_accelerator_host.h
|
| index 38995938259325cd243d02ce5f34d30cd963c995..f70c7c3af31282e838b8fefa62b669c2a7e8e345 100644
|
| --- a/content/common/gpu/client/gpu_video_encode_accelerator_host.h
|
| +++ b/content/common/gpu/client/gpu_video_encode_accelerator_host.h
|
| @@ -15,8 +15,8 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/threading/non_thread_safe.h"
|
| #include "content/common/gpu/client/command_buffer_proxy_impl.h"
|
| +#include "content/common/gpu/client/ipc/gpu_video_encode_accelerator_host_ipc_transport.h"
|
| #include "gpu/config/gpu_info.h"
|
| -#include "ipc/ipc_listener.h"
|
| #include "media/video/video_encode_accelerator.h"
|
|
|
| namespace gfx {
|
| @@ -38,19 +38,17 @@ class GpuChannelHost;
|
| // This class is the renderer-side host for the VideoEncodeAccelerator in the
|
| // GPU process, coordinated over IPC.
|
| class GpuVideoEncodeAcceleratorHost
|
| - : public IPC::Listener,
|
| - public media::VideoEncodeAccelerator,
|
| + : public media::VideoEncodeAccelerator,
|
| public CommandBufferProxyImpl::DeletionObserver,
|
| + public GpuVideoEncodeAcceleratorHostIPCTransport::Client,
|
| public base::NonThreadSafe {
|
| public:
|
| // |this| is guaranteed not to outlive |channel| and |impl|. (See comments
|
| // for |channel_| and |impl_|.)
|
| - GpuVideoEncodeAcceleratorHost(GpuChannelHost* channel,
|
| - CommandBufferProxyImpl* impl);
|
| -
|
| - // IPC::Listener implementation.
|
| - bool OnMessageReceived(const IPC::Message& message) override;
|
| - void OnChannelError() override;
|
| + GpuVideoEncodeAcceleratorHost(
|
| + GpuChannelHost* channel,
|
| + scoped_ptr<GpuVideoEncodeAcceleratorHostIPCTransport> transport,
|
| + CommandBufferProxyImpl* impl);
|
|
|
| // media::VideoEncodeAccelerator implementation.
|
| SupportedProfiles GetSupportedProfiles() override;
|
| @@ -58,7 +56,7 @@ class GpuVideoEncodeAcceleratorHost
|
| const gfx::Size& input_visible_size,
|
| media::VideoCodecProfile output_profile,
|
| uint32_t initial_bitrate,
|
| - Client* client) override;
|
| + media::VideoEncodeAccelerator::Client* client) override;
|
| void Encode(const scoped_refptr<media::VideoFrame>& frame,
|
| bool force_keyframe) override;
|
| void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) override;
|
| @@ -83,29 +81,26 @@ class GpuVideoEncodeAcceleratorHost
|
| void PostNotifyError(const tracked_objects::Location& location,
|
| Error error, const std::string& message);
|
|
|
| - void Send(IPC::Message* message);
|
| -
|
| // IPC handlers, proxying media::VideoEncodeAccelerator::Client for the GPU
|
| // process. Should not be called directly.
|
| void OnRequireBitstreamBuffers(uint32_t input_count,
|
| const gfx::Size& input_coded_size,
|
| - uint32_t output_buffer_size);
|
| - void OnNotifyInputDone(int32_t frame_id);
|
| + uint32_t output_buffer_size) override;
|
| + void OnNotifyInputDone(int32_t frame_id) override;
|
| void OnBitstreamBufferReady(int32_t bitstream_buffer_id,
|
| uint32_t payload_size,
|
| - bool key_frame);
|
| - void OnNotifyError(Error error);
|
| + bool key_frame) override;
|
| + void OnNotifyError(Error 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 encoder in the GPU process.
|
| - int32_t encoder_route_id_;
|
| + scoped_ptr<GpuVideoEncodeAcceleratorHostIPCTransport> transport_;
|
|
|
| // The client that will receive callbacks from the encoder.
|
| - Client* client_;
|
| + media::VideoEncodeAccelerator::Client* client_;
|
|
|
| // Unowned reference to the CommandBufferProxyImpl that created us. |this|
|
| // registers as a DeletionObserver of |impl_|, so the reference is always
|
|
|