WOWZCamera

Superclass:
NSObject
Declared In:

Introduction

Use the WOWZCamera class to access and control camera devices. To view a list of all cameras, however, use the cameras property in the WOWZCameraPreview class.



Methods

-initWithCaptureDevice:
-isBack
-isFront
-setExposureMode:exposurePoint:
-setFocusMode:focusPoint:
-supportsExposureMode:
-supportsFocusMode:
-supportsWidth:

initWithCaptureDevice:


- (nonnull instancetype) initWithCaptureDevice:(nonnull AVCaptureDevice *)captureDevice; 
Parameters
captureDevice

The AVCaptureDevice.

Return Value

An instance of WOWZCamera.

Discussion

Initializes a WOWZCamera from a specified AVCaptureDevice.


isBack


- (BOOL) isBack; 
Return Value

Yes if this is the back-facing camera, no otherwise.

Discussion

Indicates whether the back-facing camera is being used.


isFront


- (BOOL) isFront; 
Return Value

Yes if this is the front-facing camera, no otherwise.

Discussion

Indicates whether the front-facing camera is being used.


setExposureMode:exposurePoint:


- (void) setExposureMode:(WOWZCameraExposureMode)exposureMode 
        exposurePoint:(CGPoint)point; 
Parameters
exposureMode

The exposure mode.

point

The point of interest, expressed as (x,y) coordinates where (0,0) defines the top-left corner of the camera frame as the reference point for the exposure and (1,1) defines the bottom-right corner of the frame as the reference point.

Discussion

Sets the camera's exposure mode based on a specified point of interest.


setFocusMode:focusPoint:


- (void) setFocusMode:(WOWZCameraFocusMode)focusMode 
        focusPoint:(CGPoint)point; 
Parameters
focusMode

The focus mode.

point

The point of interest, expressed as (x,y) coordinates where (0,0) indicates the camera should focus at the top-left corner of the frame and (1,1) indicates that the camera should focus at the bottom-right corner.

Discussion

Sets the camera's focus mode based on a specified point of interest.


supportsExposureMode:


Parameters
mode

The exposure mode.

Return Value

Yes if the camera supports the exposure mode, no otherwise.

Discussion

Indicates whether the camera supports the specified exposure mode.


supportsFocusMode:


Parameters
mode

The focus mode.

Return Value

Yes if the camera supports the focus mode, no otherwise.

Discussion

Indicates whether the camera supports the specified focus mode.


supportsWidth:


- (BOOL) supportsWidth:(NSUInteger)width; 
Parameters
width

The width of the frame.

Return Value

Yes if the camera supports the width, no otherwise.

Discussion

Indicates whether the camera supports the specified frame width.


Typedefs

NS_ENUM
NS_ENUM
NS_ENUM
WOWZCameraDirection
WOWZCameraExposureMode
WOWZCameraFocusMode

NS_ENUM


typedef NS_ENUM(NSUInteger, WOWZCameraDirection) { 
    WOWZCameraDirectionBack = 0, WOWZCameraDirectionFront 
}; 
Constants
WOWZCameraDirectionBack

The back-facing camera.

WOWZCameraDirectionFront

The front-facing camera.

Discussion

A camera direction, either front or back.

See Also


NS_ENUM


typedef NS_ENUM(NSUInteger, WOWZCameraFocusMode) { 
    WOWZCameraFocusModeLocked = 0, WOWZCameraFocusModeAuto, WOWZCameraFocusModeContinuous 
}; 
Constants
WOWZCameraFocusModeLocked

The camera focus is locked at the lens's current position.

WOWZCameraFocusModeAuto

The camera will autofocus, then switch to WOWZCameraFocusModeLocked.

WOWZCameraFocusModeContinuous

The camera will continually adjust focus as needed.

Discussion

A camera focus mode.

See Also


NS_ENUM


typedef NS_ENUM(NSUInteger, WOWZCameraExposureMode) { 
    WOWZCameraExposureModeLocked = 0, WOWZCameraExposureModeAuto, WOWZCameraExposureModeContinuous 
}; 
Constants
WOWZCameraExposureModeLocked

The camera exposure is locked at its current value.

WOWZCameraExposureModeAuto

The camera will automatically adjust exposure once, and then switch to WOWZCameraExposureModeLocked.

WOWZCameraExposureModeContinuous

The camera will continually adjust exposure as needed.

Discussion

A camera exposure mode.

See Also


WOWZCameraDirection


typedef NS_ENUM(NSUInteger, WOWZCameraDirection) { 
    WOWZCameraDirectionBack = 0, WOWZCameraDirectionFront 
}; 
Constants
WOWZCameraDirectionBack

The back-facing camera.

WOWZCameraDirectionFront

The front-facing camera.

Discussion

A camera direction, either front or back.

See Also


WOWZCameraExposureMode


typedef NS_ENUM(NSUInteger, WOWZCameraExposureMode) { 
    WOWZCameraExposureModeLocked = 0, WOWZCameraExposureModeAuto, WOWZCameraExposureModeContinuous 
}; 
Constants
WOWZCameraExposureModeLocked

The camera exposure is locked at its current value.

WOWZCameraExposureModeAuto

The camera will automatically adjust exposure once, and then switch to WOWZCameraExposureModeLocked.

WOWZCameraExposureModeContinuous

The camera will continually adjust exposure as needed.

Discussion

A camera exposure mode.

See Also


WOWZCameraFocusMode


typedef NS_ENUM(NSUInteger, WOWZCameraFocusMode) { 
    WOWZCameraFocusModeLocked = 0, WOWZCameraFocusModeAuto, WOWZCameraFocusModeContinuous 
}; 
Constants
WOWZCameraFocusModeLocked

The camera focus is locked at the lens's current position.

WOWZCameraFocusModeAuto

The camera will autofocus, then switch to WOWZCameraFocusModeLocked.

WOWZCameraFocusModeContinuous

The camera will continually adjust focus as needed.

Discussion

A camera focus mode.

See Also


Properties

cameraId
direction
exposureMode
focusMode
frameSizes
hasTorch
iOSCaptureDevice
supportedPresetConfigs
torchOn

cameraId


@property (readonly) NSUInteger cameraId; 
Discussion

A unique identifier for the camera.


direction


@property (readonly) WOWZCameraDirection direction; 
Discussion

The facing direction of the camera.


exposureMode


@property (nonatomic) WOWZCameraExposureMode exposureMode; 
Discussion

The camera's exposure mode.


focusMode


@property (nonatomic) WOWZCameraFocusMode focusMode; 
Discussion

The camera's focus mode.


frameSizes


@property (nonatomic,
    nonnull,
    readonly) NSArray<NSValue *> *frameSizes; 
Discussion

The supported frame sizes for the camera, expressed as an array of CGSize values.


hasTorch


@property (nonatomic,
    readonly) BOOL hasTorch; 
Discussion

Indicates whether the camera has a flash.


iOSCaptureDevice


@property (nonatomic,
    readonly,
    nonnull) AVCaptureDevice *iOSCaptureDevice; 
Discussion

The AVCaptureDevice represented by this camera.


supportedPresetConfigs


@property (nonatomic,
    nonnull,
    readonly) NSArray<WOWZMediaConfig *> *supportedPresetConfigs; 
Discussion

The supported WOWZMediaConfigs for the camera.


torchOn


@property (nonatomic,
    getter=isTorchOn) BOOL torchOn; 
Discussion

Turns the camera's flash on or off.