blob: d07bdd3e519c5255bf98c978285de2f0499d95be [file] [log] [blame]
// 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;
type FrameStatus = strict enum : uint8 {
OK = 0;
ERROR_FRAME = 1;
ERROR_BUFFER_FULL = 2;
};
type TaskRemoveStatus = strict enum : uint8 {
OK = 0;
ERROR_INVALID = 1;
};
type FrameMetadata = struct {
// The value of the system monotonic clock at the time the frame data was received by the
// driver.
timestamp uint64;
image_format_index uint32;
input_buffer_index uint32;
// The value of the system monotonic clock at the time the root frame associated with this frame
// was received by the ISP driver.
capture_timestamp uint64;
};
type FrameAvailableInfo = struct {
frame_status FrameStatus;
buffer_id uint32;
metadata FrameMetadata;
};
@transport("Banjo")
@banjo_layout("ddk-callback")
closed protocol HwAccelFrameCallback {
// This is called by the camera HW Accel drivers (gdc, ge2d, ...), every time a
// frame is ready to be consumed.
strict FrameReady(struct {
info FrameAvailableInfo;
});
};
// This is the same signature as the Frame callback above, but separating this, in
// case we want to change things around later.
@transport("Banjo")
@banjo_layout("ddk-callback")
closed protocol HwAccelResChangeCallback {
// This is called by the camera HW Accel drivers (gdc, ge2d, ...), every time a
// change of resolution completes.
strict FrameResolutionChanged(struct {
info FrameAvailableInfo;
});
};
@transport("Banjo")
@banjo_layout("ddk-callback")
closed protocol HwAccelRemoveTaskCallback {
// This is called by the camera HW Accel drivers (gdc, ge2d, ...), every time a
// task is released.
strict TaskRemoved(struct {
status TaskRemoveStatus;
});
};