Loading camera/CaptureResult.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,10 @@ status_t CaptureResultExtras::readFromParcel(const android::Parcel *parcel) { parcel->readInt64(&lastCompletedRegularFrameNumber); parcel->readInt64(&lastCompletedReprocessFrameNumber); parcel->readInt64(&lastCompletedZslFrameNumber); parcel->readBool(&hasReadoutTimestamp); if (hasReadoutTimestamp) { parcel->readInt64(&readoutTimestamp); } return OK; } Loading Loading @@ -82,6 +85,10 @@ status_t CaptureResultExtras::writeToParcel(android::Parcel *parcel) const { parcel->writeInt64(lastCompletedRegularFrameNumber); parcel->writeInt64(lastCompletedReprocessFrameNumber); parcel->writeInt64(lastCompletedZslFrameNumber); parcel->writeBool(hasReadoutTimestamp); if (hasReadoutTimestamp) { parcel->writeInt64(readoutTimestamp); } return OK; } Loading camera/include/camera/CaptureResult.h +14 −1 Original line number Diff line number Diff line Loading @@ -103,6 +103,17 @@ struct CaptureResultExtras : public android::Parcelable { */ int64_t lastCompletedZslFrameNumber; /** * Whether the readoutTimestamp variable is valid and should be used. */ bool hasReadoutTimestamp; /** * The readout timestamp of the capture. Its value is equal to the * start-of-exposure timestamp plus the exposure time (and a possible fixed * offset due to sensor crop). */ int64_t readoutTimestamp; /** * Constructor initializes object as invalid by setting requestId to be -1. Loading @@ -118,7 +129,9 @@ struct CaptureResultExtras : public android::Parcelable { errorPhysicalCameraId(), lastCompletedRegularFrameNumber(-1), lastCompletedReprocessFrameNumber(-1), lastCompletedZslFrameNumber(-1) { lastCompletedZslFrameNumber(-1), hasReadoutTimestamp(false), readoutTimestamp(0) { } /** Loading camera/include/camera/camera2/OutputConfiguration.h +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,9 @@ public: TIMESTAMP_BASE_SENSOR = 1, TIMESTAMP_BASE_MONOTONIC = 2, TIMESTAMP_BASE_REALTIME = 3, TIMESTAMP_BASE_CHOREOGRAPHER_SYNCED = 4 TIMESTAMP_BASE_CHOREOGRAPHER_SYNCED = 4, TIMESTAMP_BASE_READOUT_SENSOR = 5, TIMESTAMP_BASE_MAX = TIMESTAMP_BASE_READOUT_SENSOR, }; enum MirrorModeType { MIRROR_MODE_AUTO = 0, Loading services/camera/libcameraservice/common/CameraProviderManager.cpp +22 −0 Original line number Diff line number Diff line Loading @@ -1405,6 +1405,28 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addPreCorrectionActiv return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addReadoutTimestampTag() { status_t res = OK; auto& c = mCameraCharacteristics; auto entry = c.find(ANDROID_SENSOR_READOUT_TIMESTAMP); if (entry.count != 0) { ALOGE("%s: CameraCharacteristics must not contain ANDROID_SENSOR_READOUT_TIMESTAMP!", __FUNCTION__); } uint8_t readoutTimestamp = ANDROID_SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED; int deviceVersion = HARDWARE_DEVICE_API_VERSION( mVersion.get_major(), mVersion.get_minor()); if (deviceVersion >= CAMERA_DEVICE_API_VERSION_3_8) { readoutTimestamp = ANDROID_SENSOR_READOUT_TIMESTAMP_HARDWARE; } res = c.update(ANDROID_SENSOR_READOUT_TIMESTAMP, &readoutTimestamp, 1); return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::removeAvailableKeys( CameraMetadata& c, const std::vector<uint32_t>& keys, uint32_t keyTag) { status_t res = OK; Loading services/camera/libcameraservice/common/CameraProviderManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -672,6 +672,7 @@ private: status_t deriveHeicTags(bool maxResolution = false); status_t addRotateCropTags(); status_t addPreCorrectionActiveArraySize(); status_t addReadoutTimestampTag(); static void getSupportedSizes(const CameraMetadata& ch, uint32_t tag, android_pixel_format_t format, Loading Loading
camera/CaptureResult.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,10 @@ status_t CaptureResultExtras::readFromParcel(const android::Parcel *parcel) { parcel->readInt64(&lastCompletedRegularFrameNumber); parcel->readInt64(&lastCompletedReprocessFrameNumber); parcel->readInt64(&lastCompletedZslFrameNumber); parcel->readBool(&hasReadoutTimestamp); if (hasReadoutTimestamp) { parcel->readInt64(&readoutTimestamp); } return OK; } Loading Loading @@ -82,6 +85,10 @@ status_t CaptureResultExtras::writeToParcel(android::Parcel *parcel) const { parcel->writeInt64(lastCompletedRegularFrameNumber); parcel->writeInt64(lastCompletedReprocessFrameNumber); parcel->writeInt64(lastCompletedZslFrameNumber); parcel->writeBool(hasReadoutTimestamp); if (hasReadoutTimestamp) { parcel->writeInt64(readoutTimestamp); } return OK; } Loading
camera/include/camera/CaptureResult.h +14 −1 Original line number Diff line number Diff line Loading @@ -103,6 +103,17 @@ struct CaptureResultExtras : public android::Parcelable { */ int64_t lastCompletedZslFrameNumber; /** * Whether the readoutTimestamp variable is valid and should be used. */ bool hasReadoutTimestamp; /** * The readout timestamp of the capture. Its value is equal to the * start-of-exposure timestamp plus the exposure time (and a possible fixed * offset due to sensor crop). */ int64_t readoutTimestamp; /** * Constructor initializes object as invalid by setting requestId to be -1. Loading @@ -118,7 +129,9 @@ struct CaptureResultExtras : public android::Parcelable { errorPhysicalCameraId(), lastCompletedRegularFrameNumber(-1), lastCompletedReprocessFrameNumber(-1), lastCompletedZslFrameNumber(-1) { lastCompletedZslFrameNumber(-1), hasReadoutTimestamp(false), readoutTimestamp(0) { } /** Loading
camera/include/camera/camera2/OutputConfiguration.h +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,9 @@ public: TIMESTAMP_BASE_SENSOR = 1, TIMESTAMP_BASE_MONOTONIC = 2, TIMESTAMP_BASE_REALTIME = 3, TIMESTAMP_BASE_CHOREOGRAPHER_SYNCED = 4 TIMESTAMP_BASE_CHOREOGRAPHER_SYNCED = 4, TIMESTAMP_BASE_READOUT_SENSOR = 5, TIMESTAMP_BASE_MAX = TIMESTAMP_BASE_READOUT_SENSOR, }; enum MirrorModeType { MIRROR_MODE_AUTO = 0, Loading
services/camera/libcameraservice/common/CameraProviderManager.cpp +22 −0 Original line number Diff line number Diff line Loading @@ -1405,6 +1405,28 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addPreCorrectionActiv return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addReadoutTimestampTag() { status_t res = OK; auto& c = mCameraCharacteristics; auto entry = c.find(ANDROID_SENSOR_READOUT_TIMESTAMP); if (entry.count != 0) { ALOGE("%s: CameraCharacteristics must not contain ANDROID_SENSOR_READOUT_TIMESTAMP!", __FUNCTION__); } uint8_t readoutTimestamp = ANDROID_SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED; int deviceVersion = HARDWARE_DEVICE_API_VERSION( mVersion.get_major(), mVersion.get_minor()); if (deviceVersion >= CAMERA_DEVICE_API_VERSION_3_8) { readoutTimestamp = ANDROID_SENSOR_READOUT_TIMESTAMP_HARDWARE; } res = c.update(ANDROID_SENSOR_READOUT_TIMESTAMP, &readoutTimestamp, 1); return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::removeAvailableKeys( CameraMetadata& c, const std::vector<uint32_t>& keys, uint32_t keyTag) { status_t res = OK; Loading
services/camera/libcameraservice/common/CameraProviderManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -672,6 +672,7 @@ private: status_t deriveHeicTags(bool maxResolution = false); status_t addRotateCropTags(); status_t addPreCorrectionActiveArraySize(); status_t addReadoutTimestampTag(); static void getSupportedSizes(const CameraMetadata& ch, uint32_t tag, android_pixel_format_t format, Loading