BambuserBroadcaster, BambuserPlayer  1.0.5
Instance Methods | Properties | List of all members
BambuserCameraController Class Reference

#import <libbambuser.h>

Instance Methods

(instancetype) - init
 
(instancetype) - new
 
(BOOL) - isExposureModeSupported:
 
(void) - setExposureAt:exposureMode:
 
(BOOL) - isFocusModeSupported:
 
(void) - setFocusAt:focusMode:
 
(void) - setPointOfInterestAt:exposureMode:focusMode:
 
(void) - lockWhiteBalanceGains:
 
(void) - lockWhiteBalanceGainsWithTemperatureAndTintValues:
 
(void) - lockCurrentWhiteBalanceGains
 
(void) - unlockWhiteBalanceGains
 
(void) - lockCurrentLensPosition
 

Properties

AVCaptureFocusMode focusMode
 
CGPoint focusPointOfInterestInView
 
AVCaptureExposureMode exposureMode
 
CGPoint exposurePointOfInterestInView
 
float exposureTargetBias
 
float minExposureTargetBias
 
float maxExposureTargetBias
 
BOOL isLockingWhiteBalanceWithCustomGainsSupported
 
AVCaptureWhiteBalanceGains deviceWhiteBalanceGains
 
AVCaptureWhiteBalanceGains grayWorldDeviceWhiteBalanceGains
 
AVCaptureWhiteBalanceTemperatureAndTintValues whiteBalanceTemperatureAndTintValues
 
float maxWhiteBalanceGain
 
BOOL isWhiteBalanceLocked
 
AVCaptureVideoStabilizationMode preferredStabilizationMode
 
AVCaptureVideoStabilizationMode activeStabilizationMode
 

Detailed Description

Class for exposure, focus and white balance settings

Method Documentation

- (instancetype) init

Can't be instantiated. Get a BambuserCameraController reference using BambuserView::cameraController

- (BOOL) isExposureModeSupported: (AVCaptureExposureMode)  mode

Returns a Boolean value that indicates whether the given exposure mode is supported. Note! BambuserBroadcaster doesn't provide any interface for custom exposure settings (ISO, exposure duration), therefore AVCaptureExposureModeCustom is not supported and hence always returns false.

Parameters
modea AVCaptureExposureMode constant
Returns
YES if mode is supported, otherwise NO.
- (BOOL) isFocusModeSupported: (AVCaptureFocusMode)  mode

Returns a Boolean value that indicates whether the given focus mode is supported.

Parameters
modea AVCaptureFocusMode constant
Returns
YES if mode is supported, otherwise NO.
- (void) lockCurrentLensPosition

Lock focus to current lens position. To unlock call setFocusAt:focusMode: with constant AVCaptureFocusModeContinuousAutoFocus

- (void) lockCurrentWhiteBalanceGains

Lock white balance to the cameras current red, green and blue gain values. At camera swap white balance is set back to unlocked.

- (void) lockWhiteBalanceGains: (AVCaptureWhiteBalanceGains)  gains

Lock white balance to given gain. If gain values are outside the allowed range (1.0 - maxWhiteBalanceGain) the gain will be capped at the outer boundaries. At camera swap white balance is set back to unlocked. Not supported if isLockingWhiteBalanceWithCustomGainsSupported returns NO. Locking to custom white balance gains is currently not supported for virtual camera. Virtual camera is enabled if BambuserView::hasVirtualCamera returns YES. To enable custom white balance gains disable virtual camera support by setting BambuserView::virtualCameraEnabled to NO.

Parameters
gainsa AVCaptureWhiteBalanceGains struct containing red, green and blue gain values in the range 1.0 - maxWhiteBalanceGain
- (void) lockWhiteBalanceGainsWithTemperatureAndTintValues: (AVCaptureWhiteBalanceTemperatureAndTintValues)  tempAndTintValues

Lock white balance to given temperature and tint values. BambuserView internally converts to AVCaptureWhiteBalanceGains. Supported tint values are with the range -150.0 - 150.0. Takes any temperature values, but will internally cap it to corresponding AVCaptureWhiteBalanceGains range 1.0 - maxWhiteBalanceGain. Typical temperature range is 2000 - 10000 K. At camera swap white balance is set back to unlocked. Not supported if isLockingWhiteBalanceWithCustomGainsSupported returns NO. Locking to custom white balance gains is currently not supported for virtual camera. Virtual camera is enabled if BambuserView::hasVirtualCamera returns YES. To enable custom white balance gains disable virtual camera support by setting BambuserView::virtualCameraEnabled to NO.

Parameters
tempAndTintValuesa AVCaptureWhiteBalanceTemperatureAndTintValues struct with temperature and tint values
- (instancetype) new

Can't be instantiated. Get a BambuserCameraController reference using BambuserView::cameraController

- (void) setExposureAt: (CGPoint)  point
exposureMode: (AVCaptureExposureMode)  mode 

Set exposure point of interest and exposure mode. Note! AVCaptureExposureModeCustom is not supported.

Parameters
pointa CGPoint in the BambuserView coordinate space. BambuserView will handle convertion to device coordinates
modea AVCaptureExposureMode constant
- (void) setFocusAt: (CGPoint)  point
focusMode: (AVCaptureFocusMode)  mode 

Set focus point and mode

Parameters
pointa CGPoint in the BambuserView coordinate space. BambuserView will handle convertion to device coordinates
modea AVCaptureFocusMode constant
- (void) setPointOfInterestAt: (CGPoint)  point
exposureMode: (AVCaptureExposureMode)  exposureMode
focusMode: (AVCaptureFocusMode)  focusMode 

Combines setExposureAt:exposureMode: and setFocusAt:focusMode: in one atomic call.

Parameters
pointa CGPoint in the BambuserView coordinate space. BambuserView will handle convertion to device coordinates
exposureModea AVCaptureExposureMode constant
focusModea AVCaptureFocusMode constant
- (void) unlockWhiteBalanceGains

Unlocks white balance gains and let the device continuously adjust white balance. This is the default behaviour.

Property Documentation

- (AVCaptureVideoStabilizationMode) activeStabilizationMode
readnonatomicassign

Returns currently active stabilization mode.

See also
preferredStabilizationMode For setting preferred stabilization mode.
- (AVCaptureWhiteBalanceGains) deviceWhiteBalanceGains
readnonatomicassign

Returns a AVCaptureWhiteBalanceGains struct with current red, green, and blue gain values used for white balance. For each channel, only values between 1.0 and maxWhiteBalanceGain are supported. Set with lockWhiteBalanceGains:.

- (AVCaptureExposureMode) exposureMode
readnonatomicassign

Returns exposure mode for the current camera. Exposure mode is set with setExposureAt:exposureMode: Default exposure mode is AVCaptureExposureModeContinuousAutoExposure if supported by camera. At camera swap exposure mode is set to default. Note! AVCaptureExposureModeCustom is not supported.

Returns
a AVCaptureExposureMode constant
See also
- setExposureAt:exposureMode:
- (CGPoint) exposurePointOfInterestInView
readnonatomicassign

Returns current exposure point of interest for the current camera. Exposure point of interest is set with setExposureAt:exposureMode: Default exposure point of interest is in the center of the view. At camera swap exposure point of interest is set to default.

Returns
A CGPoint in BambuserView coordinate space
See also
- setExposureAt:exposureMode:
- (float) exposureTargetBias
readwritenonatomicassign

Bias applied to the target exposure value, in EV units, for the current camera. Default value is 0. At camera swap exposureTargetBias is set to default value.

- (AVCaptureFocusMode) focusMode
readnonatomicassign

Returns focus mode for the current camera. Focus mode is set with setFocusAt:focusMode: Default focus mode is AVCaptureFocusModeContinuousAutoFocus if supported by camera, if not AVCaptureFocusModeLocked is default. At camera swap focus mode is set to default.

Returns
a AVCaptureFocusMode constant
See also
- setFocusAt:focusMode:
- (CGPoint) focusPointOfInterestInView
readnonatomicassign

Returns current focus point of interest for the current camera. Focus point of interest is set with setFocusAt:focusMode: Default focus point of interest is in the center of the view. At camera swap focus point of interest is set to default.

Returns
A CGPoint in BambuserView coordinate space
See also
- setFocusAt:focusMode:
- (AVCaptureWhiteBalanceGains) grayWorldDeviceWhiteBalanceGains
readnonatomicassign

Returns a AVCaptureWhiteBalanceGains struct with current red, green, and blue gain values derived from the current scene to deliver a neutral (or gray world) white point for white balance. Gray world values assume a neutral subject (for example, a gray card) has been placed in the middle of the subject area and fills the center 50% of the frame. Clients can read these values and apply them to the device using lockWhiteBalanceGains:. For each channel, only values between 1.0 and maxWhiteBalanceGain are supported.

- (BOOL) isLockingWhiteBalanceWithCustomGainsSupported
readnonatomicassign

Returns YES if current BambuserView::cameraPosition supports locking with custom white balance gains. Custom whitebalance gains can be set with lockWhiteBalanceGains: or lockWhiteBalanceGainsWithTemperatureAndTintValues:

- (BOOL) isWhiteBalanceLocked
readnonatomicassign

Returns YES if white balance is locked and not auto adjusting. Default behaviour is auto adjusted white balance.

- (float) maxExposureTargetBias
readnonatomicassign

The maximum supported exposure bias, in EV units, by the current camera.

- (float) maxWhiteBalanceGain
readnonatomicassign

The maximum supported gain value for red, green and blue components, by the current camera. Minimum value is always 1.0.

- (float) minExposureTargetBias
readnonatomicassign

The minimum supported exposure bias, in EV units, by the current camera.

- (AVCaptureVideoStabilizationMode) preferredStabilizationMode
readwritenonatomicassign

The preferred stabilization mode. Default mode is AVCaptureVideoStabilizationModeOff. If the stabilization mode is not supported it will not be set as the active mode.

See also
activeStabilizationMode For current active mode.
- (AVCaptureWhiteBalanceTemperatureAndTintValues) whiteBalanceTemperatureAndTintValues
readnonatomicassign

Returns a AVCaptureWhiteBalanceTemperatureAndTintValues struct with the current temperature and tint values used for white balance. Set with lockWhiteBalanceGainsWithTemperatureAndTintValues: