Skip to content

Commit

Permalink
Minor fix for ISO in AVFLiveVideo
Browse files Browse the repository at this point in the history
Summary: Ensuring that we set the exposure mode before setting the ISO.

Reviewed By: enpe

Differential Revision: D67609862

fbshipit-source-id: 16738ffd6550ad996140f0d4e5aa7da0dcc313b9
  • Loading branch information
janherling authored and facebook-github-bot committed Jan 6, 2025
1 parent 409f513 commit 76fa76b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion impl/ocean/media/avfoundation/AVFLiveVideo.mm
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,14 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CM
if (iso <= 0.0f)
{
[captureDevice_ setExposureMode:AVCaptureExposureModeContinuousAutoExposure];

result = true;
}
else
{
[captureDevice_ setExposureModeCustomWithDuration:[captureDevice_ exposureDuration] ISO:iso completionHandler:nil];
[captureDevice_ setExposureMode:AVCaptureExposureModeLocked];
[captureDevice_ setExposureModeCustomWithDuration:AVCaptureExposureDurationCurrent ISO:iso completionHandler:nil];

result = true;
}

Expand Down

0 comments on commit 76fa76b

Please sign in to comment.