| // camera/mojo/gpu/mjpeg_decode_accelerator.mojom-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2019 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef CAMERA_MOJO_GPU_MJPEG_DECODE_ACCELERATOR_MOJOM_TEST_UTILS_H_ |
| #define CAMERA_MOJO_GPU_MJPEG_DECODE_ACCELERATOR_MOJOM_TEST_UTILS_H_ |
| |
| #include "camera/mojo/gpu/mjpeg_decode_accelerator.mojom.h" |
| |
| |
| namespace cros::mojom { |
| |
| |
| class MjpegDecodeAcceleratorInterceptorForTesting : public MjpegDecodeAccelerator { |
| virtual MjpegDecodeAccelerator* GetForwardingInterface() = 0; |
| void Initialize(InitializeCallback callback) override; |
| void DecodeWithDmaBuf(int32_t task_id, ::mojo::ScopedHandle src_dmabuf_fd, uint32_t src_size, uint32_t src_offset, ::cros::mojom::DmaBufVideoFramePtr dst_frame, DecodeWithDmaBufCallback callback) override; |
| void Uninitialize() override; |
| }; |
| class MjpegDecodeAcceleratorAsyncWaiter { |
| public: |
| explicit MjpegDecodeAcceleratorAsyncWaiter(MjpegDecodeAccelerator* proxy); |
| |
| MjpegDecodeAcceleratorAsyncWaiter(const MjpegDecodeAcceleratorAsyncWaiter&) = delete; |
| MjpegDecodeAcceleratorAsyncWaiter& operator=(const MjpegDecodeAcceleratorAsyncWaiter&) = delete; |
| |
| ~MjpegDecodeAcceleratorAsyncWaiter(); |
| void Initialize( |
| bool* out_success); |
| bool Initialize(); |
| void DecodeWithDmaBuf( |
| int32_t task_id, ::mojo::ScopedHandle src_dmabuf_fd, uint32_t src_size, uint32_t src_offset, ::cros::mojom::DmaBufVideoFramePtr dst_frame, DecodeError* out_error); |
| DecodeError DecodeWithDmaBuf(int32_t task_id, ::mojo::ScopedHandle src_dmabuf_fd, uint32_t src_size, uint32_t src_offset, ::cros::mojom::DmaBufVideoFramePtr dst_frame); |
| |
| private: |
| MjpegDecodeAccelerator* const proxy_; |
| }; |
| |
| |
| |
| |
| } // cros::mojom |
| |
| #endif // CAMERA_MOJO_GPU_MJPEG_DECODE_ACCELERATOR_MOJOM_TEST_UTILS_H_ |