Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implemented PR feedback
  • Loading branch information
BeMacized committed Aug 24, 2021
commit f4bf3afe289a01bde28295b3539fed69a81cef7d
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,9 @@ private void setImageStreamImageAvailableListener(final EventChannel.EventSink i
imageBuffer.put("planes", planes);
imageBuffer.put("lensAperture", this.captureProps.getLastLensAperture());
imageBuffer.put("sensorExposureTime", this.captureProps.getLastSensorExposureTime());
Integer sensorSensitivity = this.captureProps.getLastSensorSensitivity();
imageBuffer.put(
"sensorSensitivity", (double) this.captureProps.getLastSensorSensitivity());
"sensorSensitivity", sensorSensitivity == null ? null : (double) sensorSensitivity);

final Handler handler = new Handler(Looper.getMainLooper());
handler.post(() -> imageStreamSink.success(imageBuffer));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ private void process(CaptureResult result) {
Integer afState = result.get(CaptureResult.CONTROL_AF_STATE);

// Update capture properties
Float lensAperture = result.get(CaptureResult.LENS_APERTURE);
Long sensorExposureTime = result.get(CaptureResult.SENSOR_EXPOSURE_TIME);
Integer sensorSensitivity = result.get(CaptureResult.SENSOR_SENSITIVITY);
this.captureProps.setLastLensAperture(lensAperture);
this.captureProps.setLastSensorExposureTime(sensorExposureTime);
this.captureProps.setLastSensorSensitivity(sensorSensitivity);
if (result instanceof TotalCaptureResult) {
Float lensAperture = result.get(CaptureResult.LENS_APERTURE);
Long sensorExposureTime = result.get(CaptureResult.SENSOR_EXPOSURE_TIME);
Integer sensorSensitivity = result.get(CaptureResult.SENSOR_SENSITIVITY);
this.captureProps.setLastLensAperture(lensAperture);
this.captureProps.setLastSensorExposureTime(sensorExposureTime);
this.captureProps.setLastSensorSensitivity(sensorSensitivity);
}

if (cameraState != CameraState.STATE_PREVIEW) {
Log.d(
Expand Down