| Index: content/common/gpu/client/ipc/gpu_video_decode_accelerator_host_ipc_transport.h
|
| diff --git a/content/common/gpu/client/ipc/gpu_video_decode_accelerator_host_ipc_transport.h b/content/common/gpu/client/ipc/gpu_video_decode_accelerator_host_ipc_transport.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f4e1bd23498eb8aab3af54c58cdb3bc1eae62c24
|
| --- /dev/null
|
| +++ b/content/common/gpu/client/ipc/gpu_video_decode_accelerator_host_ipc_transport.h
|
| @@ -0,0 +1,66 @@
|
| +// Copyright 2015 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_GPU_VIDEO_DECODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
|
| +#define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include <vector>
|
| +
|
| +namespace gfx {
|
| +class Rect;
|
| +class Size;
|
| +}
|
| +
|
| +namespace content {
|
| +
|
| +struct VideoDecodeParams;
|
| +
|
| +class GpuVideoDecodeAcceleratorHostIPCTransport {
|
| + public:
|
| + class Client {
|
| + public:
|
| + virtual void OnCdmAttached(bool success) = 0;
|
| + virtual void OnBitstreamBufferProcessed(int32_t bitstream_buffer_id) = 0;
|
| + virtual void OnProvidePictureBuffer(uint32_t num_requested_buffers,
|
| + const gfx::Size& dimensions,
|
| + uint32_t texture_target) = 0;
|
| + virtual void OnDismissPictureBuffer(int32_t picture_buffer_id) = 0;
|
| + virtual void OnPictureReady(int32_t picture_buffer_id,
|
| + int32_t bitstream_buffer_id,
|
| + const gfx::Rect& visible_rect,
|
| + bool allow_overlay) = 0;
|
| + virtual void OnFlushDone() = 0;
|
| + virtual void OnResetDone() = 0;
|
| + virtual void OnNotifyError(uint32_t error) = 0;
|
| +
|
| + protected:
|
| + virtual ~Client() {}
|
| + };
|
| +
|
| + virtual ~GpuVideoDecodeAcceleratorHostIPCTransport() {}
|
| +
|
| + virtual bool AssignPictureBuffers(
|
| + const std::vector<int32_t>& buffer_ids,
|
| + const std::vector<uint32_t>& texture_ids) = 0;
|
| +
|
| + virtual bool Decode(const VideoDecodeParams& params) = 0;
|
| +
|
| + virtual bool Destroy() = 0;
|
| +
|
| + virtual bool Flush() = 0;
|
| +
|
| + virtual bool Reset() = 0;
|
| +
|
| + virtual bool ReusePictureBuffer(int32_t picture_buffer_id) = 0;
|
| +
|
| + virtual bool SetCdm(int cdm_id) = 0;
|
| +
|
| + virtual void SetClient(Client* client) = 0;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
|
|
|