SCCameraKitInput
Objective-C
@protocol SCCameraKitInput
Swift
protocol Input
Describes a source of frames for CameraKit. Can be a camera, file, etc.
-
The intermediate destination for frame data. See the protocol definition for more details. This property should NOT be set directly. CameraKit will assign this as appropriate.
Declaration
Objective-C
@property (nonatomic, weak) id<SCCameraKitInputDestination> _Nullable destination;
Swift
weak var destination: InputDestination? { get set }
-
The horizontal field of view for the input.
Declaration
Objective-C
@property (nonatomic, readonly) CGFloat horizontalFieldOfView;
Swift
var horizontalFieldOfView: CGFloat { get }
-
The size for input frame
Declaration
Objective-C
@property (nonatomic, readonly) CGSize frameSize;
Swift
var frameSize: CGSize { get }
-
The orientation of frame data for the input.
Declaration
Objective-C
@property (nonatomic, readonly) AVCaptureVideoOrientation frameOrientation;
Swift
var frameOrientation: AVCaptureVideoOrientation { get }
-
The camera position that the frames are sourced from.
Declaration
Objective-C
@property (nonatomic) AVCaptureDevicePosition position;
Swift
var position: AVCaptureDevice.Position { get set }
-
Whether or not the session is currently running.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isRunning;
Swift
var isRunning: Bool { get }
-
Indiciates that the input should begin running if it is not currently. If the input is aleady running, this should be a noop. @warning: This method is SYNCHRONOUS and should not be called on the main thread.
Declaration
Objective-C
- (void)startRunning;
Swift
func startRunning()
-
Indiciates that the input should MUST stop running if it currently is running. If the input is not already running, this should be a noop. @warning: This method is SYNCHRONOUS and should not be called on the main thread.
Declaration
Objective-C
- (void)stopRunning;
Swift
func stopRunning()
-
Set the orientation for the outputted video buffers
Note
this may be different than the actual frame data orientation since inputs may map frame data orientation to video orientation differentlyDeclaration
Objective-C
- (void)setVideoOrientation:(AVCaptureVideoOrientation)videoOrientation;
Swift
func setVideoOrientation(_ videoOrientation: AVCaptureVideoOrientation)
Parameters
videoOrientation
orientation for the outputted video buffers