feat: Basic Flash for Android (#2081)
Implements a semi-working version of flash photo capture for Android. This isn't properly implemented because a proper implementation requires a fully custom precapture sequence that enables the torch, then waits for AE/AF to adjust, lock AE/AF, then capture with a single torch burst, and then turn the torch off again. This is quite complex, that's why the feature request #1890 is marked at $3,000. For now, this is a simple flash burst which _sometimes works_, _sometimes not_ - highly depends on the device. If anyone wants true working flash capture, sponsor in #1890.
This commit is contained in:
@@ -55,9 +55,11 @@ fun CameraDevice.createPhotoCaptureRequest(
|
||||
// Set the Flash Mode
|
||||
Flash.OFF -> {
|
||||
captureRequest.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON)
|
||||
captureRequest.set(CaptureRequest.FLASH_MODE, CaptureRequest.FLASH_MODE_OFF)
|
||||
}
|
||||
Flash.ON -> {
|
||||
captureRequest.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON_ALWAYS_FLASH)
|
||||
captureRequest.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON)
|
||||
captureRequest.set(CaptureRequest.FLASH_MODE, CaptureRequest.FLASH_MODE_TORCH)
|
||||
}
|
||||
Flash.AUTO -> {
|
||||
if (enableRedEyeReduction) {
|
||||
|
Reference in New Issue
Block a user