Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #198 from bcherry/fix_mirroring
Browse files Browse the repository at this point in the history
Setup mirroring after session configuration so output respects mirror setting
  • Loading branch information
piemonte committed Oct 18, 2014
2 parents e6cd719 + 386169a commit 5df593c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/PBJVision.m
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ - (void)_setCameraMode:(PBJCameraMode)cameraMode cameraDevice:(PBJCameraDevice)c
_cameraDevice = cameraDevice;
_cameraMode = cameraMode;

[self setMirroringMode:_mirroringMode];

_outputFormat = outputFormat;

// since there is no session in progress, set and bail
Expand All @@ -409,6 +407,8 @@ - (void)_setCameraMode:(PBJCameraMode)cameraMode cameraDevice:(PBJCameraDevice)c
[self _enqueueBlockOnCaptureSessionQueue:^{
// camera is already setup, no need to call _setupCamera
[self _setupSession];

[self setMirroringMode:_mirroringMode];

[self _enqueueBlockOnMainQueue:^{
_flags.changingModes = NO;
Expand Down Expand Up @@ -1184,6 +1184,8 @@ - (void)startPreview
[self _setupCamera];
[self _setupSession];
}

[self setMirroringMode:_mirroringMode];

if (_previewLayer && _previewLayer.session != _captureSession) {
_previewLayer.session = _captureSession;
Expand Down

0 comments on commit 5df593c

Please sign in to comment.