piemonte/PBJVision — pull request #162 by wvteijlingen (2014-06-27 14:50:49+00:00)
Title: Better support for orientations

I keep finding little pieces of orientation related code that should have been updated along with https://github.com/piemonte/PBJVision/pull/157 and https://github.com/piemonte/PBJVision/pull/158.

This pull request fixes the setup of preview orientation in the `startPreview` method along with some other parts I initially missed.

To decrease code duplication I added two methods to the utilities class. These convert orientations from `PBJCameraOrientation` to `AVCaptureVideoOrientation` and from `UIDeviceOrientation` to `PBJCameraOrientation`. For this, the enums had to be moved into their own header (`PBJVisionTypes.h`).

I do not have full insight in the code for this project, so maybe someone else can check this pull request to make sure I didn't miss anything this time.