Skip to content

Commit

Permalink
Exposed CameraError to allow calling function to more gracefully hand…
Browse files Browse the repository at this point in the history
…le Camera init when e.g. frontFacing camera does not exist
  • Loading branch information
Dave T authored and Dave T committed Feb 17, 2018
1 parent 2683a19 commit 86f23d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/Source/iOS/Camera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public enum PhysicalCameraLocation {
}
}

struct CameraError: Error {
public struct CameraError: Error {
}

let initialBenchmarkFramesToIgnore = 5
Expand Down Expand Up @@ -161,7 +161,7 @@ public class Camera: NSObject, ImageSource, AVCaptureVideoDataOutputSampleBuffer
deinit {
sharedImageProcessingContext.runOperationSynchronously{
self.stopCapture()
self.videoOutput.setSampleBufferDelegate(nil, queue:nil)
self.videoOutput?.setSampleBufferDelegate(nil, queue:nil)
self.audioOutput?.setSampleBufferDelegate(nil, queue:nil)
}
}
Expand Down

0 comments on commit 86f23d4

Please sign in to comment.