DJICamera(CameraSettings)
@interface DJICamera (CameraSettings)
-
Sets the camera’s file index mode for the SD card. The default value of
DJICameraFileIndexMode
is set toDJICameraFileIndexModeReset
.Declaration
Objective-C
- (void)setFileIndexMode:(DJICameraFileIndexMode)fileIndex withCompletion:(DJICompletionBlock)block;
Parameters
fileIndex
File index mode to be set for the camera’s SD card.
block
Remote execution result error block.
-
Gets the camera’s file index mode.
Declaration
Objective-C
- (void)getFileIndexModeWithCompletion: (void (^_Nonnull)(DJICameraFileIndexMode, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s video resolution and frame rate. Frame rate options are dependent on what analog video standard (PAL of NTSC) is selected using
setVideoStandard
. All resolutions are available when using PAL or NTSC.Warning
The supported frame rates for PAL and NTSC are below:
NTSC:
FrameRate_23.976 FPS
FrameRate_24 FPS
FrameRate_29.970 FPS
FrameRate_47.950 FPS
FrameRate_59.940 FPS
FrameRate_96 FPS
FrameRate_120 FPS (Slow Motion)
PAL:
FrameRate_23.976 FPS
FrameRate_24 FPS
FrameRate_25 FPS
FrameRate_47.950 FPS
FrameRate_50 FPS
FrameRate_96 FPS
FrameRate_120fps (Slow Motion)
Not supported by the Z30 camera as Z30 can only operate at 29.970 FPS when using NTSC and 25 FPS when using PAL.
Declaration
Objective-C
- (void)setVideoResolution:(DJICameraVideoResolution)resolution andFrameRate:(DJICameraVideoFrameRate)rate withCompletion:(DJICompletionBlock)block;
Parameters
resolution
Resolution to be set for the video.
rate
Frame rate to be set for the video.
block
Remote execution result error block.
-
Gets the camera’s video resolution and frame rate values.
Declaration
Objective-C
- (void)getVideoResolutionAndFrameRateWithCompletion: (void (^_Nonnull)(DJICameraVideoResolution, DJICameraVideoFrameRate, NSError *_Nullable))block;
-
Sets the camera’s video file format. The default value is
DJICameraVideoFileFormatMOV
.Declaration
Objective-C
- (void)setVideoFileFormat:(DJICameraVideoFileFormat)format withCompletion:(DJICompletionBlock)block;
Parameters
format
Video file format to be set for videos.
block
Remote execution result error block.
-
Gets the camera’s video file format.
Declaration
Objective-C
- (void)getVideoFileFormatWithCompletion: (void (^_Nonnull)(DJICameraVideoFileFormat, NSError *_Nullable))block;
Parameters
block
Completion block to return the current video file format.
-
Sets the camera’s analog video standard. Setting the video standard to PAL or NTSC will limit the available resolutions and frame rates to those compatible with the chosen video standard. Also supported by thermal imaging camera.
Declaration
Objective-C
- (void)setVideoStandard:(DJICameraVideoStandard)videoStandard withCompletion:(DJICompletionBlock)block;
Parameters
videoStandard
Video standard value to be set for the camera.
result
Remote execution result error block.
-
Gets the camera’s video standard value. Also supported by thermal imaging camera.
Declaration
Objective-C
- (void)getVideoStandardWithCompletion: (void (^_Nonnull)(DJICameraVideoStandard, NSError *_Nullable))block;
-
Enables recording position, time and camera information into a video caption file (.srt) saved on the SD card. The information is updated at 1Hz. Currently the .srt file can only be downloaded directly from the SD card.
Declaration
Objective-C
- (void)setVideoCaptionEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable video caption.block
The execution callback with the returned value.
-
Gets whether the video caption is enabled.
Declaration
Objective-C
- (void)getVideoCaptionEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
The completion block with the returned value(s).
-
Sets the video file compression standard. The compression standard can only be changed when the camera is in Record Video mode. Only supported by X4S camera, X5S camera and Phantom 4 Pro camera. For all other products, H.264 is used.
Declaration
Objective-C
- (void)setVideoFileCompressionStandard: (DJIVideoFileCompressionStandard)standard withCompletion:(DJICompletionBlock)block;
Parameters
standard
The compression standard to use.
block
Completion block that receives the setter result.
-
Gets the video file compression standard. Only supported by X4S camera, X5S camera and Phantom 4 Pro.
@block Completion block that receives the getter result.
Declaration
Objective-C
- (void)getVideoFileCompressionStandardWithCompletion: (void (^_Nonnull)(DJIVideoFileCompressionStandard, NSError *_Nullable))block;
-
Sets the camera’s aspect ratio for photos. See DJICameraPhotoAspectRatio to view all possible ratios. Not supported by Z30 camera as the aspect ratio of Z30 is always
DJICameraPhotoAspectRatio16_9
.Declaration
Objective-C
- (void)setPhotoRatio:(DJICameraPhotoAspectRatio)ratio withCompletion:(DJICompletionBlock)block;
Parameters
ratio
Aspect ratio for photos to be taken by camera.
block
Remote execution result error block.
-
Gets the camera’s aspect ratio for photos.
Declaration
Objective-C
- (void)getPhotoRatioWithCompletion:(void (^_Nonnull)(DJICameraPhotoAspectRatio, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s photo quality for JPEG images. See DJICameraPhotoQuality to view all possible camera photo qualities.
Declaration
Objective-C
- (void)setPhotoQuality:(DJICameraPhotoQuality)quality withCompletion:(DJICompletionBlock)block;
Parameters
quality
Camera photo quality to set.
block
Remote execution result error block.
-
Gets the camera’s photo quality.
Declaration
Objective-C
- (void)getPhotoQualityWithCompletion: (void (^_Nonnull)(DJICameraPhotoQuality, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s photo file format. See DJICameraPhotoFileFormat to view all possible photo formats to which the camera can be set. Also supported by thermal imaging camera. Not supported by Z30 camera as the photo file format for Z30 is always
DJICameraPhotoFileFormatJPEG
.Declaration
Objective-C
- (void)setPhotoFileFormat:(DJICameraPhotoFileFormat)photoFormat withCompletion:(DJICompletionBlock)block;
Parameters
photoFormat
Photo file format used when the camera takes a photo.
block
Completion block.
-
Gets the camera’s photo file format. Also supported by thermal imaging camera.
Declaration
Objective-C
- (void)getPhotoFileFormatWithCompletion: (void (^_Nonnull)(DJICameraPhotoFileFormat, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the burst shoot count for the camera when the user wants to use that feature. See DJICameraPhotoBurstCount to view all possible burst count values to which the camera can be set.
Declaration
Objective-C
- (void)setPhotoBurstCount:(DJICameraPhotoBurstCount)count withCompletion:(DJICompletionBlock)block;
Parameters
count
The number of photos to take in one burst shoot
block
Completion block.
-
Gets the burst count type.
Declaration
Objective-C
- (void)getPhotoBurstCountWithCompletion: (void (^_Nonnull)(DJICameraPhotoBurstCount, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the RAW image burst shoot count for the camera when the user wants to use that feature. See DJICameraPhotoBurstCount to view all possible burst count values to which the camera can be set. Only supported by Inspire 2.
Declaration
Objective-C
- (void)setPhotoRAWBurstCount:(DJICameraPhotoBurstCount)count withCompletion:(DJICompletionBlock)block;
Parameters
count
The number of photos to take in one RAW burst shoot.
block
Completion block.
-
Gets the RAW image burst count. Only supported by Inspire 2.
Declaration
Objective-C
- (void)getPhotoRAWBurstCountWithCompletion: (void (^_Nonnull)(DJICameraPhotoBurstCount, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the camera’s auto exposure bracketing (AEB) capture parameters.
Declaration
Objective-C
- (void)setPhotoAEBParam:(DJICameraPhotoAEBParam)aebParam withCompletion:(DJICompletionBlock)block;
Parameters
aebParam
AEB capture parameters to be set for the camera.
block
Remote execution result error block.
-
Gets the camera’s AEB capture parameters.
Declaration
Objective-C
- (void)getPhotoAEBParamWithCompletion: (void (^_Nonnull)(DJICameraPhotoAEBParam, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the interval shoot parameters. The camera will capture a photo, wait a specified interval of time, take another photo, and continue in this manner until it has taken the required number of photos. Also supported by thermal imaging camera.
Declaration
Objective-C
- (void)setPhotoIntervalParam:(DJICameraPhotoIntervalParam)param withCompletion:(DJICompletionBlock)block;
Parameters
count
The number of photos to capture. The range is [2, 255]. If the value of
captureCount
is set to255
, the camera will continue to take photos at the specified interval untilstopShootPhotoWithCompletion
is called.interval
The time interval during which two photos are taken. The range for this parameter depends on the photo file format (
DJICameraPhotoFileFormat
). For X5 and X5R, the range is [5, 2^16 - 1] seconds for all formats. For XT, the range is [1, 60] seconds for all formats. For X4S, X5S and Phantom 4 Pro, when the file format is JPEG, the range is [2, 2^16 - 1] seconds; when the file format is RAW or RAW+JPEG, the range is [5, 2^16 - 1] seconds. For other products, when the file format is JPEG, the range is [2, 2^16 - 1] seconds; when the file format is RAW or RAW+JPEG, the range is [10, 2^16 - 1] seconds. -
Gets the camera’s interval shoot parameters. Also supported by thermal imaging camera.
Declaration
Objective-C
- (void)getPhotoIntervalParamWithCompletion: (void (^_Nonnull)(DJICameraPhotoIntervalParam, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the TimeLapse parameters, including interval, duration and file format when saving.
Precondition: Camera should be in
TimeLapse
mode ofCameraShootPhotoMode
. Supported only by Osmo.Declaration
Objective-C
- (void)setPhotoTimeLapseInterval:(NSUInteger)interval duration:(NSUInteger)duration fileFormat:(DJICameraPhotoTimeLapseFileFormat)format withCompletion:(DJICompletionBlock)block;
Parameters
interval
The time between image captures. An integer falls in the range, [10, 1000]. The unit is 100ms. Please note that when the format is JPEG+Video, the minimum interval is 20(2 seconds).
duration
The time for the whole action. An integer falls in the range, [0, 2^31-1] seconds. If the value is set to be 0, it means that it shoots forever until invoking stopShootPhoto method.
fileFormat
A enum type of the file format to be used. Please refer to DJICameraPhotoTimeLapseFileFormat in DJICameraSettingsDef.
block
The execution block with the returned execution result.
-
Supported only by Osmo camera. Gets the TimeLapse parameters including interval, duration and file format when saving.
Precondition: The camera must be in
TimeLapse
mode ofCameraPhotoShootMode
.Declaration
Objective-C
- (void)getPhotoTimeLapseIntervalDurationAndFileFormatWithCompletion: (void (^_Nonnull)(NSUInteger, NSUInteger, DJICameraPhotoTimeLapseFileFormat, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned value(s).
-
Sets the camera’s exposure mode. See DJICameraExposureMode to view all possible camera exposure modes.
Declaration
Objective-C
- (void)setExposureMode:(DJICameraExposureMode)mode withCompletion:(DJICompletionBlock)block;
Parameters
mode
Camera exposure mode to set.
block
Remote execution result error block.
-
Gets the camera’s exposure mode.
Declaration
Objective-C
- (void)getExposureModeWithCompletion: (void (^_Nonnull)(DJICameraExposureMode, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s ISO value. See DJICameraISO to view all possible ISO settings for the camera.
For the X5, X5R, Phantom 4 Pro camera, X4S and X5S, the ISO value can be set for all modes. For the other cameras, the ISO value can only be set when the camera exposure mode is in Manual mode. See the
setExposureMode:withCompletion:
method for how to set exposure mode.Declaration
Objective-C
- (void)setISO:(DJICameraISO)iso withCompletion:(DJICompletionBlock)block;
Parameters
iso
ISO value to be set.
block
Completion block.
-
Gets the camera’s ISO value.
Declaration
Objective-C
- (void)getISOWithCompletion:(void (^_Nonnull)(DJICameraISO, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the camera shutter speed. To see all available
shutterSpeed
value settings, seeDJICameraShutterSpeed
.The shutter speed should not be set slower than the video frame rate when the camera’s mode is
DJICameraModeRecordVideo
. For example, if the video frame rate is 30fps, theshutterSpeed
must be <= 1/30.Precondition: The shutter speed can be set only when the camera exposure mode is Shutter mode or Manual mode.
Declaration
Objective-C
- (void)setShutterSpeed:(DJICameraShutterSpeed)shutterSpeed withCompletion:(DJICompletionBlock)block;
Parameters
shutterSpeed
Shutter speed value to be set for the camera.
block
Remote execution result error block.
-
Gets the camera’s shutter speed.
Declaration
Objective-C
- (void)getShutterSpeedWithCompletion: (void (^_Nonnull)(DJICameraShutterSpeed, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s exposure metering. See DJICameraMeteringMode to view all possible exposure metering settings for the camera.
Declaration
Objective-C
- (void)setMeteringMode:(DJICameraMeteringMode)meteringType withCompletion:(DJICompletionBlock)block;
Parameters
meteringType
Exposure metering to be set.
block
Completion block.
-
Gets the camera’s exposure metering.
Declaration
Objective-C
- (void)getMeteringModeWithCompletion: (void (^_Nonnull)(DJICameraMeteringMode, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the spot metering area index. The camera image is divided into 96 spots defined by 12 columns and 8 rows. The row index range is [0,7], where the values increase top to bottom across the image. The column index range is [0, 11], where the values increase left to right. In order to make the method work, The camera exposure mode should be ‘Program’, ‘Shutter’ or 'Aperture’, the exposure metering mode must be
DJICameraMeteringModeSpot
, andAELock
must beNO
.Declaration
Objective-C
- (void)setSpotMeteringAreaRowIndex:(uint8_t)rowIndex andColIndex:(uint8_t)colIndex withCompletion:(DJICompletionBlock)block;
Parameters
rowIndex
Spot metering area row index to be set.
colIndex
Spot metering area column index to be set.
block
Remote execution result error block.
-
Gets the spot metering area row index and column index. In order to make the method work, The camera exposure mode should be ‘Program’, ‘Shutter’ or 'Aperture’, the exposure metering mode must be
DJICameraMeteringModeSpot
, andAELock
must beNO
.Declaration
Objective-C
- (void)getSpotMeteringAreaRowIndexAndColIndexWithCompletion: (void (^_Nonnull)(uint8_t, uint8_t, NSError *_Nullable))block;
-
Sets the camera’s exposure compensation. See DJICameraExposureCompensation to view all possible exposure compensations to which the camera can be set. In order to use this function, set the camera exposure mode to ‘shutter’, ‘program’ or 'aperture’.
Declaration
Objective-C
- (void)setExposureCompensation:(DJICameraExposureCompensation)compensationType withCompletion:(DJICompletionBlock)block;
Parameters
compensationType
Exposure compensation value to be set for the camera.
block
Completion block.
-
Gets the camera’s exposure compensation.
Declaration
Objective-C
- (void)getExposureCompensationWithCompletion: (void (^_Nonnull)(DJICameraExposureCompensation, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Locks or unlocks the camera’s AE (auto exposure).
Post condition: If the AE lock is enabled, the spot metering area cannot be set.
Declaration
Objective-C
- (void)setAELock:(BOOL)isLock withCompletion:(DJICompletionBlock)block;
Parameters
isLock
YES
if the camera AE is locked,NO
if it is unlocked.callback
The execution callback with the returned execution result.
-
Determines if the camera’s AE (auto exposure) is locked.
Declaration
Objective-C
- (void)getAELockWithCompletion:(void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Enables/disables auto-unlocking of AE lock after shooting a photo. If it is enabled, the value of
AELock
will be reset toNO
after each shot. If it is disabled, the value ofAELock
remainsNO
until it is changed explicitly by callingsetAELock:withCompletion:
.Only supported by X4S, X5S and Phantom 4 Pro cameras. For the other products, auto-unlocking is always enabled.
Declaration
Objective-C
- (void)setAutoAEUnlockEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable auto-unlocking.block
Completion block that receives the setter result.
-
Gets if auto-unlocking of AE lock is enabled. It is only supported by X4S, X5S and Phantom 4 Pro cameras.
Declaration
Objective-C
- (void)getAutoAEUnlockEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result.
-
Sets the camera’s white balance and color temperature.
When the white balance is a preset value (values except
CustomColorTemperature
), thecolorTemperature
argument does not take effect. When the white balance isCustomColorTemperature
, thecolorTemperature
value is used instead. See DJICameraWhiteBalance to view all possible white balance setting options for the camera.Declaration
Objective-C
- (void)setWhiteBalance:(DJICameraWhiteBalance)whiteBalance andColorTemperature:(uint8_t)colorTemperature withCompletion:(DJICompletionBlock)block;
Parameters
whiteBalance
White balance value to be set.
colorTemperature
Color temperature value to be set in the range of [20, 100]. Real color temperature value (K) = value * 100. For example, 50 -> 5000K.
block
Completion block.
-
Gets the camera’s white balance and color temperature.
Declaration
Objective-C
- (void)getWhiteBalanceAndColorTemperatureWithCompletion: (void (^_Nonnull)(DJICameraWhiteBalance, uint8_t, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the camera’s anti-flicker frequency for video recording.
Precondition: The exposure mode must be Program. Note: for the Z30 camera, changing anti-flicker will reboot the camera before the setting takes effect.
Declaration
Objective-C
- (void)setAntiFlicker:(DJICameraAntiFlicker)antiFlickerType withCompletion:(DJICompletionBlock)block;
Parameters
antiFlickerType
Anti-flicker frequency to set for the camera. See DJICameraAntiFlicker to view all the possible anti-flicker type settings for the camera.
callback
The execution callback with the returned execution result.
-
Gets the camera’s anti-flicker.
Declaration
Objective-C
- (void)getAntiFlickerWithCompletion: (void (^_Nonnull)(DJICameraAntiFlicker, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the camera’s sharpness. See DJICameraSharpness to view all possible sharpnesss settings for the camera.
Declaration
Objective-C
- (void)setSharpness:(DJICameraSharpness)sharpness withCompletion:(DJICompletionBlock)block;
Parameters
sharpness
Sharpness value to be set for the camera.
block
Completion block.
-
Gets the camera’s sharpness.
Declaration
Objective-C
- (void)getSharpnessWithCompletion:(void (^_Nonnull)(DJICameraSharpness, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the camera’s contrast. See DJICameraContrast to view all possible contrasts to which the camera can be set.
Declaration
Objective-C
- (void)setContrast:(DJICameraContrast)contrast withCompletion:(DJICompletionBlock)block;
Parameters
contrast
Contrast value to be set for the camera.
block
Completion block.
-
Gets the camera’s contrast.
Declaration
Objective-C
- (void)getContrastWithCompletion:(void (^_Nonnull)(DJICameraContrast, NSError *_Nullable))block;
Parameters
block
Completion block.
-
Sets the camera’s saturation. The default saturation value is 0.
Declaration
Objective-C
- (void)setSaturation:(int8_t)saturation withCompletion:(DJICompletionBlock)block;
Parameters
saturation
Saturation value to be set in the range of [-3, 3].
block
Remote execution result error block.
-
Gets the camera’s saturation.
Declaration
Objective-C
- (void)getSaturationWithCompletion:(void (^_Nonnull)(int8_t, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s hue. The default hue value is 0. It is not supported by Mavic Pro, X4S camera, X5S camera or Phantom 4 Pro.
Declaration
Objective-C
- (void)setHue:(int8_t)hue withCompletion:(DJICompletionBlock)block;
Parameters
hue
Hue value to be set in the range of [-3, 3].
block
Remote execution result error block.
-
Gets the camera’s hue.
Declaration
Objective-C
- (void)getHueWithCompletion:(void (^_Nonnull)(int8_t, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Sets the camera’s digital filter. The default value is
DJICameraDigitalFilterNone
. For a list of all possible camera digital filters, see DJICameraDigitalFilter.Declaration
Objective-C
- (void)setDigitalFilter:(DJICameraDigitalFilter)filter withCompletion:(DJICompletionBlock)block;
Parameters
filter
Digital filter to be set to the camera.
block
Remote execution result error block.
-
Gets the camera’s digital filter.
Declaration
Objective-C
- (void)getDigitalFilterWithCompletion: (void (^_Nonnull)(DJICameraDigitalFilter, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Determines whether the device supports the quick view. Quick view is the period of time a photo is shown as a preview after it is taken and before the camera returns to the live camera view.
Declaration
Objective-C
- (BOOL)isPhotoQuickViewSupported;
-
Sets the camera’s quick view duration. The valid range is [0, 10] seconds. When duration is 0, it means that the quick view is disabled. The default value is 0 second. It is not supported by Phantom 3 Standard. Call
isPhotoQuickViewSupported
before using this method.Declaration
Objective-C
- (void)setPhotoQuickViewDuration:(NSUInteger)duration withCompletion:(DJICompletionBlock)block;
Parameters
duration
Quick view duration to be set for the camera.
block
Remote execution result error block.
-
Gets the camera’s quick view duration.
Declaration
Objective-C
- (void)getPhotoQuickViewDurationWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))block;
Parameters
block
Remote execution result callback block.
-
Enable/disable defog feature. When defog feature is enabled, the contrast will be enhanced extraordinarily. Only supported by Z30.
Declaration
Objective-C
- (void)setDefogEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable defog feature.completion
Completion block that receives the setter result.
-
Gets if defog feature is enabled. It is only supported by Z30 camera.
Declaration
Objective-C
- (void)getDefogEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result.
-
Check if the current device supports digital zoom scale. It is supported by Osmo with X3 camera, Phantom 4 camera, Z3 camera, Mavic Pro camera and Z30 camera.
Declaration
Objective-C
- (BOOL)isDigitalZoomScaleSupported;
-
Adjusts the digital zoom. It is supported by Osmo with X3 camera, Phantom 4 camera, Z3 camera and Mavic Pro camera.
Declaration
Objective-C
- (void)setDigitalZoomScale:(float)scale withCompletion:(DJICompletionBlock)block;
Parameters
scale
The valid range is from 1.0 to 2.0.
block
The completion block with the returned execution result.
-
Gets current digital zoom. It is supported by Osmo with X3 camera, Phantom 4 camera, Z3 camera, Mavic Pro camera and Z30 camera. Note Z30 cannot set the digital zoom scale, but will use digital zoom when using
startContinuousOpticalZoom
and the optical zoom has reached its limit.See
[- (void)setDigitalZoomScale:(float)scale withCompletion:(DJICompletionBlock)block;].Declaration
Objective-C
- (void)getDigitalZoomScaleWithCompletion: (void (^_Nonnull)(float, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result. When an error occurs, the error is returned and the result is undefined.
-
Check if camera supports optical zoom. It is only supported by X5, X5R and X5S camera with the Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ lens, Z3 camera and Z30 camera.
Declaration
Objective-C
- (BOOL)isOpticalZoomSupported;
Return Value
YES
if camera supports optical zoom. -
Gets the specification of the zoom lens. It is only supported by X5, X5R and X5S camera with the Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ lens, Z3 camera and Z30 camera.
Declaration
Objective-C
- (void)getOpticalZoomSpecWithCompletion: (void (^_Nonnull)(DJICameraOpticalZoomSpec, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result. When an error occurs, the error is returned and the result is undefined.
-
Sets focal length of the zoom lens. It is only supported by X5, X5R and X5S camera with the Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ lens, Z3 camera and Z30 camera.
Declaration
Objective-C
- (void)setOpticalZoomFocalLength:(NSUInteger)focalLength withCompletion:(DJICompletionBlock)block;
Parameters
focalLength
Focal length of zoom lens. Valid range is [
DJICameraOpticalZoomspec.minFocalLength
,DJICameraOpticalZoomspec.maxFocalLength
] and must be a multiple ofDJICameraOpticalZoomspec.focalLengthStep
.block
The completion block with returned execution result.
-
Gets zoom lens focal length in units of 0.1mm. It is only supported by X5, X5R and X5S camera with the Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ lens, Z3 camera and Z30 camera.
Declaration
Objective-C
- (void)getOpticalZoomFocalLengthWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result. When an error occurs, the error is returned and the result is undefined.
-
Gets current optical zoom scale with range [1,30]. Only supported by Z30 camera. The Z30 zoom scale can be changed with
setOpticalZoomFocalLength
andstartContinuousOpticalZoomInDirection
. The zoom scale or factor is then calculated and given through this method.Declaration
Objective-C
- (void)getOpticalZoomScaleWithCompletion: (void (^_Nonnull)(float, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result. When an error occurs, the error is returned and the result is undefined.
-
Start changing the focal length of the lens in specified direction with specified speed. Focal length change (zooming) will halt when maximum or minimum focal lengths are reached, or
stopContinuousOpticalZoomWithCompletion
is called. It is only supported by X5, X5R and X5S camera with the Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ lens, Z3 camera and Z30 camera.Declaration
Objective-C
- (void)startContinuousOpticalZoomInDirection: (DJICameraOpticalZoomDirection)direction withSpeed:(DJICameraOpticalZoomSpeed)speed withCompletion:(DJICompletionBlock)block;
Parameters
direction
Direction to zoom.
speed
Zoom speed.
block
The execution callback with the returned execution result.
-
Called to stop focal length changing, when it currently is from calling
startContinuousOpticalZoomInDirection:withSpeed:withCompletion
. It is only supported by X5, X5R and X5S camera with the Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ lens, Z3 camera and Z30 camera.Declaration
Objective-C
- (void)stopContinuousOpticalZoomWithCompletion:(DJICompletionBlock)block;
Parameters
block
The execution callback with the returned execution result.
-
Determines whether the current camera supports TapZoom feature. TapZoom is only supported by Z30 camera.
Declaration
Objective-C
- (BOOL)isTapZoomSupported;
Return Value
YES
if the camera supports TapZoom. -
Enable/disable TapZoom.
tapZoomAtTarget:withCompletion:
can only be called when TapZoom is enabled. Only supported by Z30 camera.Declaration
Objective-C
- (void)setTapZoomEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable TapZoom feature.block
Completion block that receives the setter result.
-
Gets if TapZoom is enabled. It is only supported by Z30 camera.
Declaration
Objective-C
- (void)getTapZoomEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result.
-
TapZoom uses a multiplier to change the zoom scale when called. The final zoom scale for a TapZoom will be: Current Zoom Scale x Multiplier. The multiplier range is [1,5]. A multiplier of 1 will not change the zoom. When the multiplier is 1, the zoom scale will not change during TapZoom. It is only supported by Z30 camera.
Declaration
Objective-C
- (void)setTapZoomMultiplier:(uint8_t)multiplier withCompletion:(DJICompletionBlock)block;
Parameters
multiplier
Multiplier of TapZoom.
block
Completion block that receives the setter result.
-
Gets the multiplier for TapZoom. It is only supported by Z30 camera.
Declaration
Objective-C
- (void)getTapZoomMultiplierWithCompletion: (void (^_Nonnull)(uint8_t, NSError *_Nullable))block;
Parameters
block
Completion block that receives the getter result.
-
TapZoom at the target. It can be called only when TapZoom is enabled. When a new target is set, the gimbal will rotate and locate the target in the center of the screen. At the same time, the camera will zoom by multiplying the TapZoom multiplier. Only supported by Z30 camera.
Declaration
Objective-C
- (void)tapZoomAtTarget:(CGPoint)target withCompletion:(DJICompletionBlock)block;
Parameters
target
The target to zoom. The range for x and y is from 0.0 to 1.0. The point [0.0, 0.0] represents the top-left corner of the screen.
block
Completion block that receives the execution result.
-
Enables HD (high-definition) live view. When it is enabled, the live view resolution is 1080p with frame rate 30 fps. The settings will only take effect when the camera is in record-video mode and the video resolution is either 1080p or 2.7k without slow-motion enabled. If recording video in 4k, then the live stream will be limited to 720p. Supported only by Mavic Pro.
Declaration
Objective-C
- (void)setHighDefinitionLiveViewEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
Enable or disable HD live view.
block
The execution callback with the returned execution result.
-
YES if 1080p live view is enabled. This will return the value of the setter, and not necessarily the actual live view resolution. For example, if recording in 4K and HD live view has previously been set, then this will return YES but the actual live view resolution will be 720p. Supported only by Mavic Pro.
Declaration
Objective-C
- (void)getHighDefinitionLiveViewEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned execution result.
-
Enables the automatic control of the front-arm LEDs. The camera can turn off the front-arm LEDs automatically when it shoots photos or records videos. The LEDs will be turned on after the shooting or recording is finished. Supported only by Mavic Pro.
Declaration
Objective-C
- (void)setAutoTurnOffLEDEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
Enable the automatic control of the front-arm LEDs.
block
The execution callback with the returned execution result.
-
Determines whether the automatic control of the front-arm LEDs is Enabled. Supported only by Mavic Pro.
Declaration
Objective-C
- (void)getAutoTurnOffLEDEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned execution result.
-
Sets the camera’s orientation. The gimbal will rotate the roll axis based on the orientation. Supported only by Mavic Pro.
Declaration
Objective-C
- (void)setOrientation:(DJICameraOrientation)orientation withCompletion:(DJICompletionBlock)block;
Parameters
orientation
Camera’s orientation.
block
The execution callback with the returned execution result.
-
Gets the camera’s orientation. Supported only by Mavic Pro.
Declaration
Objective-C
- (void)getOrientationWithCompletion: (void (^_Nonnull)(DJICameraOrientation, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned execution result.
-
Determines whether the current device supports audio recording. Currently audio recording is supported only by the Osmo camera.
Declaration
Objective-C
- (BOOL)isAudioRecordSupported;
-
Enables audio recording when capturing video. Supported only by Osmo camera.
Declaration
Objective-C
- (void)setAudioRecordEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
Enable or disable audio recording.
block
The execution callback with the returned execution result.
-
Supported only by Osmo camera. Determines whether the audio record is enabled.
Declaration
Objective-C
- (void)getAudioRecordEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned value(s).
-
Sets the microphone recording gain. Only supported by Osmo. - parameter: value Recording gain with range [0,100]. - parameter: block The completion block with the returned value(s).
Declaration
Objective-C
- (void)setAudioGain:(uint8_t)value withCompletion:(DJICompletionBlock)block;
Parameters
value
Recording gain with range [0,100].
block
The completion block with the returned value(s).
-
Gets the microphone recording gain. Only supported by Osmo.
Declaration
Objective-C
- (void)getAudioGainWithCompletion:(void (^_Nonnull)(uint8_t, NSError *_Nullable))block;
Parameters
block
The completion block with the returned value(s).
-
This method will turn off the camera’s cooling fan whenever the camera is cool enough to do so. This allows better audio recording from the internal microphone in the camera. Supported Only by Osmo.
Declaration
Objective-C
- (void)setTurnOffFanWhenPossible:(BOOL)turnOffWhenPossible withCompletion:(DJICompletionBlock)block;
Parameters
turnOffWhenPossible
true
to turn fan off whenever possible.block
The execution block with the returned execution result.
-
Gets if the fan will turn off whenever it is cool enough to do so to enable better audio recordings from the camera’s internal microphone.
Declaration
Objective-C
- (void)getTurnOffFanWhenPossibleWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
Remote execution result completion block.
-
Determines whether the changeable lens is supported by the camera. Currently a changeable lens is supported only by the X5, X5R and X5S cameras.
Declaration
Objective-C
- (BOOL)isChangeableLensSupported;
-
Gets details of the installed lens. Supported only by the X5, X5R and X5S cameras. This is available only when
isChangeableLensSupported
returnsYES
.Declaration
Objective-C
- (void)getLensInformationWithCompletion: (void (^_Nonnull)(NSString *_Nullable, NSError *_Nullable))block;
Parameters
callback
The execution callback with the returned value(s).
-
Determines whether the camera supports an adjustable aperture. Currently adjustable aperture is supported only by the X5, X5R, X4S and X5S cameras.
Declaration
Objective-C
- (BOOL)isAdjustableApertureSupported;
-
Sets the aperture value. This feature is available only when
isAdjustableApertureSupported
returnsYES
. Supported only by the X5, X5R, X4S and X5S cameras.Precondition: The exposure mode must be in Manual or AperturePriority.
Declaration
Objective-C
- (void)setAperture:(DJICameraAperture)aperture withCompletion:(DJICompletionBlock)block;
Parameters
aperture
The aperture to set. See DJICameraLensFocusMode.
block
The execution callback with the returned execution result.
-
Gets the aperture value. This feature is available only when
isAdjustableApertureSupported returns
YES`. Supported only by the X5, X5R, X4S and X5S cameras.Declaration
Objective-C
- (void)getApertureWithCompletion:(void (^_Nonnull)(DJICameraAperture, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned value(s).
-
Determines whether the camera supports an adjustable focal point. Currently, the adjustable focal point is supported by the X5, X5R, Z3, Mavic Pro camera, Z30, Phantom 4 Pro camera, X4S and X5S.
Declaration
Objective-C
- (BOOL)isAdjustableFocalPointSupported;
-
Sets the lens focus mode. See DJICameraLensFocusMode. It is available only when
isAdjustableFocalPointSupported
returnsYES
. Supported by the X5, X5R, Z3 cameras (Z3 camera can only supportDJICameraLensFocusModeAuto
), the Mavic Pro camera, Z30, Phantom 4 Pro camera, X4S and X5S.Declaration
Objective-C
- (void)setLensFocusMode:(DJICameraLensFocusMode)focusMode withCompletion:(DJICompletionBlock)block;
Parameters
focusMode
Focus mode to set. See DJICameraLensFocusMode for more detail.
block
The execution callback with the returned execution result.
-
Gets the lens focus mode. See DJICameraLensFocusMode. It is available only when
isAdjustableFocalPointSupported
returnsYES
. Supported by the X5, X5R, Z3 cameras (Z3 camera can only supportDJICameraLensFocusModeAuto
), the Mavic Pro camera, Z30, Phantom 4 Pro camera, X4S and X5S.Declaration
Objective-C
- (void)getLensFocusModeWithCompletion: (void (^_Nonnull)(DJICameraLensFocusMode, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned value(s).
-
Sets the lens focus target point. When the focus mode is auto, the target point is the focal point. When the focus mode is manual, the target point is the zoom out area if the focus assistant is enabled for the manual mode. Supported by the X5, X5R, Z3 cameras, the Mavic Pro camera and Phantom 4 Pro camera, X4S and X5S.
Declaration
Objective-C
- (void)setLensFocusTarget:(CGPoint)focusTarget withCompletion:(DJICompletionBlock)block;
Parameters
focusTarget
The focus target to set. The range for x and y is from 0.0 to 1.0. The point [0.0, 0.0] represents the top-left angle of the screen.
block
The execution callback with the returned execution result.
-
Gets the lens focus target point. Supported by the X5, X5R, Z3 cameras, the Mavic Pro camera and Phantom 4 Pro camera, X4S and X5S.
Declaration
Objective-C
- (void)getLensFocusTargetWithCompletion: (void (^_Nonnull)(CGPoint, NSError *_Nullable))block;
Parameters
callback
The execution callback with the returned value(s).
-
Sets whether the lens focus assistant is enabled. If the focus assistant is enabled, a specific area of the screen will zoom out during focusing. It is available only when
isAdjustableFocalPointSupported
returnsYES
. Supported only by the X5, X5R, Z3, Phantom 4 Pro camera, X4S and X5S. Because Z3 only supports AF mode,enableMF
will be ignored.Declaration
Objective-C
- (void)setLensFocusAssistantEnabledForMF:(BOOL)MFenabled andAF:(BOOL)AFenabled withCompletion:(DJICompletionBlock)block;
Parameters
enabledMF
Sets whether the lens focus assistant under MF mode is enabled.
enabledAF
Sets whether the lens focus assistant under AF mode is enabled.
block
The execution callback with the returned execution result.
-
Determines whether the lens focus assistant is enabled. Supported only by the X5, X5R, Z3 cameras, Phantom 4 Pro. X4s and X5S.
Declaration
Objective-C
- (void)getLensFocusAssistantEnabledForMFAndAFWithCompletion: (void (^_Nonnull)(BOOL, BOOL, NSError *_Nullable))block;
Parameters
block
The execution callback with the returned value(s). The first result stands for MF, the second result stands for AF.
-
Gets the lens focusing ring value’s max value. Supported only by the X5, X5R, Z3 cameras, Phantom 4 Pro, X4S and X5S.
Declaration
Objective-C
- (void)getLensFocusRingValueUpperBoundWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))block;
Parameters
callback
The execution callback with the returned value(s).
-
Set the focal distance by simulating the focus ring adjustment. Value can have a range of [0,
getLensFocusRingValueUpperBoundWithCompletion
], which represents infinity and the closest possible focal distance. It is available only whenisAdjustableFocalPointSupported
returnsYES
. Supported only by the X5, X5R, Z3 cameras, Phantom 4 Pro, X4S and X5S.For some lenses, the minimum focus ring value is larger than 0. For example the minimum of DJI MFT 15mm f/1.7 ASPH is 270. To retrieve the minimum value, perform the following steps:
- Call
setLensFocusMode
withDJICameraLensFocusModeAuto
. - Call
setLensFocusTarget
with the furthest target (>30m). Call
getLensFocusRingValue
to get the current focus ring value. This is the minimum value. The maximum value can be retrieved usinggetLensFocusRingValueUpperBoundWithCompletion
.
Declaration
Objective-C
- (void)setLensFocusRingValue:(NSUInteger)value withCompletion:(DJICompletionBlock)block;
Parameters
value
Value to which to the adjust focus ring. The minimum value is 0, the maximum value depends on the installed lens. Call the
getLensFocusRingValueUpperBoundWithCompletion
method to ensure the input argument is valid.block
The execution callback with the returned execution result.
- Call
-
Gets the lens focus ring value. It is available only when
isAdjustableFocalPointSupported
returnsYES
. Supported only by the X5, X5R, Z3 cameras, Phantom 4 Pro, X4S and X5S.Declaration
Objective-C
- (void)getLensFocusRingValueWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))block;
Parameters
callback
The execution callback with the returned value(s).
-
Load the camera’s factory settings.
Also supported by thermal imaging camera.Post condition: The camera will reboot itself.
Declaration
Objective-C
- (void)loadFactorySettings:(DJICompletionBlock)block;
Parameters
callback
The execution callback with the returned execution result.
-
Saves the current camera settings permanently to the specified user. See DJICameraCustomSettings to view all possible camera users.
Declaration
Objective-C
- (void)saveSettingsTo:(DJICameraCustomSettings)settings withCompletion:(DJICompletionBlock)block;
Parameters
settings
Camera user for which to store camera settings.
result
Remote execution result error block.
-
Load camera settings from the specified user.
Declaration
Objective-C
- (void)loadSettingsFrom:(DJICameraCustomSettings)settings withCompletion:(DJICompletionBlock)block;
Parameters
settings
Camera user from which to load camera settings.
result
Remote execution result error block.