| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.hardware.camerahwaccel; |
| |
| enum FrameStatus : uint8 { |
| OK = 0; |
| ERROR_FRAME = 1; |
| ERROR_BUFFER_FULL = 2; |
| }; |
| |
| enum TaskRemoveStatus : uint8 { |
| OK = 0; |
| ERROR_INVALID = 1; |
| }; |
| |
| struct FrameMetadata { |
| // The value of the system monotonic clock at the time the frame data was received by the |
| // driver. |
| uint64 timestamp; |
| uint32 image_format_index; |
| uint32 input_buffer_index; |
| // The value of the system monotonic clock at the time the root frame associated with this frame |
| // was received by the ISP driver. |
| uint64 capture_timestamp; |
| }; |
| |
| struct FrameAvailableInfo { |
| FrameStatus frame_status; |
| uint32 buffer_id; |
| FrameMetadata metadata; |
| }; |
| |
| [Layout = "ddk-callback"] |
| protocol HwAccelFrameCallback { |
| // This is called by the camera HW Accel drivers (gdc, ge2d, ...), every time a |
| // frame is ready to be consumed. |
| FrameReady(FrameAvailableInfo info); |
| }; |
| |
| // This is the same signature as the Frame callback above, but separating this, in |
| // case we want to change things around later. |
| [Layout = "ddk-callback"] |
| protocol HwAccelResChangeCallback { |
| // This is called by the camera HW Accel drivers (gdc, ge2d, ...), every time a |
| // change of resolution completes. |
| FrameResolutionChanged(FrameAvailableInfo info); |
| }; |
| |
| [Layout = "ddk-callback"] |
| protocol HwAccelRemoveTaskCallback { |
| // This is called by the camera HW Accel drivers (gdc, ge2d, ...), every time a |
| // task is released. |
| TaskRemoved(TaskRemoveStatus status); |
| }; |