[Accessibility] Handle adapter activation/deactivation.
This commit is contained in:
@@ -63,8 +63,22 @@
|
||||
width[1] = 0;
|
||||
height[1] = 0;
|
||||
|
||||
#ifdef APPLE_EMBEDDED_ENABLED
|
||||
[p_device lockForConfiguration:&error];
|
||||
|
||||
[p_device setFocusMode:AVCaptureFocusModeLocked];
|
||||
[p_device setExposureMode:AVCaptureExposureModeLocked];
|
||||
[p_device setWhiteBalanceMode:AVCaptureWhiteBalanceModeLocked];
|
||||
|
||||
[p_device unlockForConfiguration];
|
||||
#endif // APPLE_EMBEDDED_ENABLED
|
||||
|
||||
[self beginConfiguration];
|
||||
|
||||
#ifdef APPLE_EMBEDDED_ENABLED
|
||||
self.sessionPreset = AVCaptureSessionPreset1280x720;
|
||||
#endif // APPLE_EMBEDDED_ENABLED
|
||||
|
||||
input = [AVCaptureDeviceInput deviceInputWithDevice:p_device error:&error];
|
||||
if (!input) {
|
||||
print_line("Couldn't get input device for camera");
|
||||
|
||||
Reference in New Issue
Block a user