| Index: content/common/gpu/client/ipc/gpu_video_encode_accelerator_host_ipc_transport.h
|
| diff --git a/content/common/gpu/client/ipc/gpu_video_encode_accelerator_host_ipc_transport.h b/content/common/gpu/client/ipc/gpu_video_encode_accelerator_host_ipc_transport.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3f6e2cb1fddb424a309ec95f147b08f2206fd97e
|
| --- /dev/null
|
| +++ b/content/common/gpu/client/ipc/gpu_video_encode_accelerator_host_ipc_transport.h
|
| @@ -0,0 +1,58 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_COMMON_GPU_CLIENT_IPC_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
|
| +#define CONTENT_COMMON_GPU_CLIENT_IPC_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include "media/video/video_encode_accelerator.h"
|
| +
|
| +namespace content {
|
| +
|
| +struct VideoEncodeParams;
|
| +struct VideoEncodeParams2;
|
| +
|
| +class GpuVideoEncodeAcceleratorHostIPCTransport {
|
| + public:
|
| + class Client {
|
| + public:
|
| + virtual void OnRequireBitstreamBuffers(uint32_t input_count,
|
| + const gfx::Size& input_coded_size,
|
| + uint32_t output_buffer_size) = 0;
|
| +
|
| + virtual void OnNotifyInputDone(int32_t frame_id) = 0;
|
| +
|
| + virtual void OnBitstreamBufferReady(int32_t bitstream_buffer_id,
|
| + uint32_t payload_size,
|
| + bool key_frame) = 0;
|
| +
|
| + virtual void OnNotifyError(media::VideoEncodeAccelerator::Error error) = 0;
|
| +
|
| + protected:
|
| + virtual ~Client() {}
|
| + };
|
| +
|
| + virtual ~GpuVideoEncodeAcceleratorHostIPCTransport() {}
|
| +
|
| + virtual bool Destroy() = 0;
|
| +
|
| + virtual bool Encode(const content::VideoEncodeParams& params) = 0;
|
| +
|
| + virtual bool Encode2(const content::VideoEncodeParams2& params) = 0;
|
| +
|
| + virtual bool RequestEncodingParametersChange(uint32_t bitrate,
|
| + uint32_t framerate) = 0;
|
| +
|
| + virtual void SetClient(Client* client) = 0;
|
| +
|
| + virtual bool UseOutputBitstreamBuffer(
|
| + int32_t buffer_id,
|
| + const base::SharedMemoryHandle& buffer_handle,
|
| + uint32_t buffer_size) = 0;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_COMMON_GPU_CLIENT_IPC_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
|
|
|