android: hal: implement repeatingRequestEnd callback

Add proper implementation of repeatingRequestEnd() function for Android
Camera HAL compliance. Validates stream IDs and logs notification about
the final frame number when repeating requests end.

This is a lightweight notification callback that informs the HAL when
repeating capture requests will terminate at a specific frame number
for given streams, as required by the Android Camera HAL specification.

Always return Status::OK since the method must always succeed as described in [1].

[1] https://android.googlesource.com/platform/hardware/interfaces/+/master/camera/device/aidl/android/hardware/camera/device/ICameraDeviceSession.aidl#570

Signed-off-by: Maxime Fournier <mfournier@baylibre.com>
This commit is contained in:
Maxime Fournier
2025-08-25 11:08:11 +02:00
committed by Konsta
parent 276d062e23
commit 3002f283ea

View File

@@ -1657,8 +1657,32 @@ ScopedAStatus LibcameraDeviceSession::switchToOffline(
}
ScopedAStatus LibcameraDeviceSession::repeatingRequestEnd(
int32_t in_frameNumber, const std::vector<int32_t>& in_streamIds) {
ALOGI("%s()", __func__);
return fromStatus(Status::INTERNAL_ERROR);
ALOGV("%s: frameNumber %d, streamIds size %zu", __FUNCTION__, in_frameNumber, in_streamIds.size());
Status status = initStatus();
if (status != Status::OK) {
ALOGE("%s: camera init failed or disconnected", __FUNCTION__);
return fromStatus(Status::OK);
}
// Validate stream IDs
for (int32_t streamId : in_streamIds) {
if (mStreamMap.find(streamId) == mStreamMap.end()) {
ALOGE("%s: Invalid stream ID %d", __FUNCTION__, streamId);
return fromStatus(Status::OK);
}
}
// Log the notification for debugging purposes
ALOGD("%s: Repeating request ending at frame %d for %zu streams",
__FUNCTION__, in_frameNumber, in_streamIds.size());
// This is a notification callback - no action required by HAL
// The framework is informing us that the repeating request will end
// at the specified frame number for the given streams.
// Since this is lightweight notification, we simply acknowledge it.
return fromStatus(Status::OK);
}
} // namespace implementation