I'm trying to enable AVCaptureDevice automaticallyEnablesLowLightBoostWhenAvailable in an iOS camera application, but I'm completely unable to make AVCaptureDevice isLowLightBoostSupported return true.
Question: Is there anything that needs to be done to turn on low-light acceleration beyond the blocking limits for configuration? Is there any known reason why isLowLightBoostSupported will always return false (for all devices) in a fully updated, modern system?
I am testing 5S with iOS 7.1.
For simplicity in this matter, I have ported the changes to the Apple AVCam testing application. The difference in AVCam is this:
diff --git a/AVCam/AVCam/AVCamViewController.m b/AVCam/AVCam/AVCamViewController.m index 84a2c77..4e15fc4 100644 --- a/AVCam/AVCam/AVCamViewController.m +++ b/AVCam/AVCam/AVCamViewController.m @@ -175,6 +175,18 @@ static void * SessionRunningAndDeviceAuthorizedContext = &SessionRunningAndDevic [session addOutput:stillImageOutput]; [self setStillImageOutput:stillImageOutput]; } + + if ([videoDevice respondsToSelector:@selector(isLowLightBoostSupported)]) { + if ([videoDevice lockForConfiguration:nil]) { + if (videoDevice.isLowLightBoostSupported) { + videoDevice.automaticallyEnablesLowLightBoostWhenAvailable = YES; + NSLog(@"was supported"); + } else { + NSLog(@"was not supported"); + } + [videoDevice unlockForConfiguration]; + } + } }); }
AVCam github .
SO, . , :
AVCaptureSession sessionPreset AVCaptureSessionPresetHigh, AVCaptureSessionPresetPhoto AVCaptureSessionPresetLow isLowLightBoostSupported.
, - , !:)
, , 5S . Apple , , , / 5S, , , .
, , , . , (iPhone 5), (iPhone 5S).
, iPod Touches iPads, . , iPhone 5c , iPhone 5, .
Source: https://habr.com/ru/post/1532345/More articles:Node.js HTTP Proxy изменить тело - javascriptСоздание типа настраиваемого формата в Struct - pythonColdFusion CFC CORS and AJAX Messages - javascriptGetting ValueMember from a selected item in a ListBox with C # - c #вызов php: parse псевдо-regex - phpperf cannot find external module symbols - symbolsFind a winner in a match with a tick - cIPhone 5 Low Light Backlight Mode - iosLow light AVCaptureDevice not working - iosDetermine if SqlTransaction was written or only read - c #All Articles