Camera: Add lastCompletedFrameNumber in CaptureResultExtras
The new fields in CaptureResultExtras notify the application the last
completed frame numbers. A frame number is completed if:
- All buffers are returned
- Final capture result is returned, or CAPTURE_ERROR is called,
- For buffers that are cancelled, all notifyError() is called.
This makes sure client doesn't ignore BUFFER_ERROR after capture
result metadata callback.
Public API and NDK logic are fixed. VNDK is yet to be done.
Test: Camera CTS
Bug: 155353799
Change-Id: I43f0f5ea18a670dfa00872ebc581567e2df76ad4
diff --git a/camera/CaptureResult.cpp b/camera/CaptureResult.cpp
index 9cbfdb0..755051c 100644
--- a/camera/CaptureResult.cpp
+++ b/camera/CaptureResult.cpp
@@ -49,6 +49,9 @@
}
errorPhysicalCameraId = cameraId;
}
+ parcel->readInt64(&lastCompletedRegularFrameNumber);
+ parcel->readInt64(&lastCompletedReprocessFrameNumber);
+ parcel->readInt64(&lastCompletedZslFrameNumber);
return OK;
}
@@ -76,6 +79,9 @@
} else {
parcel->writeBool(false);
}
+ parcel->writeInt64(lastCompletedRegularFrameNumber);
+ parcel->writeInt64(lastCompletedReprocessFrameNumber);
+ parcel->writeInt64(lastCompletedZslFrameNumber);
return OK;
}