DJILBAirLink
@interface DJILBAirLink : NSObject
This class contains methods to change settings of the Lightbridge Air Link.
-
Returns the DJILBAirLink delegate.
Declaration
Objective-C
@property (readwrite, nonatomic) id<DJILBAirLinkDelegate> _Nullable delegate; -
Selects the video data which will be received by the video data
- (void)lbAirLink:(DJILBAirLink *_Nonnull)lbAirLink didReceiveVideoData:(NSData *)datainDJILBAirLinkDelegateandDJICameraDelegate.Declaration
Objective-C
- (void)setVideoDataChannel:(DJIVideoDataChannel)videoDataChannel withCompletion:(DJICompletionBlock)completion;Parameters
videoDataChannelThe video source that streams data to the delegate method.
completionCompletion block that receives the execution result.
-
Gets the selected video data which will be received by the video data
- (void)lbAirLink:(DJILBAirLink *_Nonnull)lbAirLink didReceiveVideoData:(NSData *)datainDJILBAirLinkDelegateandDJICameraDelegate.Declaration
Objective-C
- (void)getVideoDataChannelWithCompletion: (void (^_Nonnull)(DJIVideoDataChannel, NSError *_Nullable))completion;Parameters
completionCompletion block that receives the execution result.
-
Sets the downlink channel selection mode (automatic or manual).
Declaration
Objective-C
- (void)setChannelSelectionMode:(DJILBAirLinkChannelSelectionMode)mode withCompletion:(DJICompletionBlock)completion;Parameters
modeChannel selection mode for
LBAirLink.completionCompletion block.
-
Gets downlink channel selection mode.
Declaration
Objective-C
- (void)getChannelSelectionModeWithCompletion: (void (^_Nonnull)(DJILBAirLinkChannelSelectionMode, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Gets the channels available for the current frequency band.
Declaration
Objective-C
- (void)getChannelRangeWithCompletion: (void (^_Nonnull)(NSRange, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets fixed downlink channel. Channel selection mode should be set to
DJILBAirLinkChannelSelectionModeManual. The valid range of channel can be obtained fromgetChannelRangeWithCompletion:.Declaration
Objective-C
- (void)setChannel:(int)channel withCompletion:(DJICompletionBlock)completion;Parameters
channelSpecific channel for the air link.
completionCompletion block.
-
Gets current downlink channel of air link.
Declaration
Objective-C
- (void)getChannelWithCompletion: (void (^_Nonnull)(int, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the downlink data rate (throughput). Higher data rates increase the quality of video transmission, but can only be used at shorter ranges.
Declaration
Objective-C
- (void)setDataRate:(DJILBAirLinkDataRate)rate withCompletion:(DJICompletionBlock)completion;Parameters
rateFixed rate (throughput).
completionCompletion block.
-
Gets the current downlink data rate (throughput).
Declaration
Objective-C
- (void)getDataRateWithCompletion: (void (^_Nonnull)(DJILBAirLinkDataRate, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets FPV video quality vs latency preference. This mode only effects the FPV camera and not the camera on the HD Gimbal.
Declaration
Objective-C
- (void)setFPVQualityLatency:(DJILBAirLinkFPVVideoQualityLatency)qualityLatency withCompletion:(DJICompletionBlock)completion;Parameters
qualityLatencyQuality vs Latency tradeoff for the FPV video
completionCompletion block.
-
Gets FPV video quality vs latency preference. This mode only effects the FPV camera and not the camera on the HD Gimbal.
Declaration
Objective-C
- (void)getFPVQualityLatencyWithCompletion: (void (^_Nonnull)(DJILBAirLinkFPVVideoQualityLatency, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the percentage downlink video bandwidth dedicated to the FPV camera. The remaining percentage is dedicated to the camera on the HD Gimbal. Setting 100% dedicates all the video bandwidth to FPV.
Declaration
Objective-C
- (void)setFPVVideoBandwidthPercent:(float)percent withCompletion:(DJICompletionBlock)completion;Parameters
percentPercentage downlink bandwidth for FPV camera.
completionCompletion block.
-
Gets the percentage downlink video bandwidth dedicated to the FPV camera. The remaining percentage is dedicated to the camera on the HD Gimbal. Setting 100% dedicates all the video bandwidth to FPV.
Declaration
Objective-C
- (void)getFPVVideoBandwidthPercentWithCompletion: (void (^_Nonnull)(float, NSError *_Nullable))completion;
-
Return whether secondary video output supported.
Declaration
Objective-C
- (BOOL)isSecondaryVideoOutputSupported;Return Value
Secondary video output support result
-
Enable secondary video output on Remote Controller. The remote controller outputs video to the Mobile Device by default. This will enable a secondary video stream to one of the Remote Controller’s physical HDMI and SDI ports (set by setSecondaryVideoPort).
Declaration
Objective-C
- (void)setSecondaryVideoOutputEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;Parameters
enabledEnables secondary video output.
completionCompletion block.
-
Gets whether secondary video output on Remote Controller is enabled. The Remote Controller outputs video to the Mobile Device by default, but a secondary video can be routed to its HDMI or SDI port. Use
setSecondaryVideoOuputEnableto enable or disable, andsetSecondaryVideoOutputPortto choose the port.Declaration
Objective-C
- (void)getSecondaryVideoOutputEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets secondary video output port on Remote Controller. HDMI or SDI are possible. Only one port can be active at once.
Declaration
Objective-C
- (void)setSecondaryVideoOutputPort:(DJILBAirLinkSecondaryVideoOutputPort)port withCompletion:(DJICompletionBlock)completion;Parameters
portSecondary video output port.
completionCompletion block.
-
Gets secondary video output port on Remote Controller. HDMI or SDI are possible. Only one port can be active at once.
Declaration
Objective-C
- (void)getSecondaryVideoOutputPortWithCompletion: (void (^_Nonnull)(DJILBAirLinkSecondaryVideoOutputPort, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the secondary video output Picture in Picture (PIP) display mode. The air link module can connect to both an FPV camera (through the HDMI and AV ports) and a camera mounted on the HD Gimbal (through the Gimbal port). The output video can then be a combination of the two video sources. Either a single video source can be displayed, or one can be displayed within the other (as a Picture in Picture, or PIP). If the mode is set incorrectly, then no output video will be displayed. For example, if only a FPV camera is connected, or the bandwidth for the ‘LB’ data (FPV) is set to 100 percent, the only mode that will display data is the
DJILBAirLinkPIPModeLB.Declaration
Objective-C
- (void)setPIPDisplay:(DJILBAirLinkPIPDisplayMode)pipDisplay withCompletion:(DJICompletionBlock)completion;Parameters
pipDisplayPicture in Picture (PIP) display mode.
completionCompletion block.
-
Gets the secondary video output Picture in Picture (PIP) display mode. The air link module can connect to both an FPV camera (through the HDMI and AV ports) and a camera mounted on the HD Gimbal (through the Gimbal port). The output video can then be a combination of the two video sources. Either a single video source can be displayed, or one can be displayed within the other (as a Picture in Picture, or PIP).
Declaration
Objective-C
- (void)getPIPDisplayWithCompletion: (void (^_Nonnull)(DJILBAirLinkPIPDisplayMode, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Enables and disables On Screen Display (OSD) overlay on the secondary video. OSD is flight data like altitude, attitude etc. and can be overlayed on the PIP video.
Declaration
Objective-C
- (void)setDisplayOSDEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;Parameters
enabledDetermines whether to display OSD on screen.
completionCompletion block.
-
Determines whether On Screen Display (OSD) is overlayed on the video feed.
Declaration
Objective-C
- (void)getDisplayOSDEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the OSD top margin in video pixels.
Declaration
Objective-C
- (void)setOSDTopMargin:(NSUInteger)margin withCompletion:(DJICompletionBlock)completion;Parameters
marginTop margin of OSD. The range is [0, 50].
completionCompletion block.
-
Gets the OSD top margin in video pixels.
Declaration
Objective-C
- (void)getOSDTopMarginWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the OSD left margin in video pixels.
Declaration
Objective-C
- (void)setOSDLeftMargin:(NSUInteger)margin withCompletion:(DJICompletionBlock)completion;Parameters
marginLeft margin of OSD. The range is [0, 50].
completionCompletion block.
-
Gets the OSD left margin in video pixels.
Declaration
Objective-C
- (void)getOSDLeftMarginWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the OSD bottom margin in video pixels.
Declaration
Objective-C
- (void)setOSDBottomMargin:(NSUInteger)margin withCompletion:(DJICompletionBlock)completion;Parameters
marginBottom margin of OSD. The range is [0, 50].
completionCompletion block.
-
Gets the OSD bottom margin in video pixels.
Declaration
Objective-C
- (void)getOSDBottomMarginWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the OSD right margin in video pixels.
Declaration
Objective-C
- (void)setOSDRightMargin:(NSUInteger)margin withCompletion:(DJICompletionBlock)completion;Parameters
marginRight margin of OSD. The range is [0, 50].
completionCompletion block.
-
Gets the OSD right margin in video pixels.
Declaration
Objective-C
- (void)getOSDRightMarginWithCompletion: (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the OSD units to either metric or imperial.
Declaration
Objective-C
- (void)setOSDUnits:(DJILBAirLinkOSDUnits)units withCompletion:(DJICompletionBlock)completion;Parameters
unitsOSD units.
completionCompletion block.
-
Gets the OSD units (metric or imperial).
Declaration
Objective-C
- (void)getOSDUnitsWithCompletion: (void (^_Nonnull)(DJILBAirLinkOSDUnits, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the Remote Controller HDMI video port output video format.
Declaration
Objective-C
- (void)setHDMIOutputFormat:(DJILBAirLinkSecondaryVideoFormat)format withCompletion:(DJICompletionBlock)completion;Parameters
outputFormatVideo output format for the HDMI port.
completionCompletion block.
-
Gets the Remote Controller HDMI video port output video format.
Declaration
Objective-C
- (void)getHDMIOutputFormatWithCompletion: (void (^_Nonnull)(DJILBAirLinkSecondaryVideoFormat, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the Remote Controller SDI video port output video format.
Declaration
Objective-C
- (void)setSDIOutputFormat:(DJILBAirLinkSecondaryVideoFormat)format withCompletion:(DJICompletionBlock)completion;Parameters
outputFormatVideo output format for SDI port.
completionCompletion block.
-
Gets the Remote Controller SDI video port output video format.
Declaration
Objective-C
- (void)getSDIOutputFormatWithCompletion: (void (^_Nonnull)(DJILBAirLinkSecondaryVideoFormat, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the PIP (Picture In Picture) position relative to the top left corner of the main subject video feed.
Declaration
Objective-C
- (void)setPIPPosition:(DJILBAirLinkPIPPosition)position withCompletion:(DJICompletionBlock)completion;Parameters
positionPosition of the PIP on the screen.
completionCompletion block.
-
Gets the PIP (Picture In Picture) position relative to the top left corner of the main subject video feed.
Declaration
Objective-C
- (void)getPIPPositionWithCompletion: (void (^_Nonnull)(DJILBAirLinkPIPPosition, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
YESif Lightbridge 2 device supports dual encode mode. Dual encode mode allows the Lightbridge module to encode and transmit both it’s AV and HDMI inputs simultaneously.Declaration
Objective-C
- (BOOL)isDualEncodeModeSupported; -
Sets Lightbridge 2 encode mode. It is only available when
isDualEncodeModeSupportedreturnsYES. For Lightbridge 2 modules that don’t support dual encode mode, the encode mode is always single.See
DJILBAirLinkEncodeModeDeclaration
Objective-C
- (void)setEncodeMode:(DJILBAirLinkEncodeMode)mode withCompletion:(DJICompletionBlock)completion;Parameters
modeThe encode mode to set.
completionCompletion block.
-
Gets Lightbridge 2 encode mode. It is only available when
isDualEncodeModeSupportedreturnsYES. For Lightbridge 2 modules that don’t support dual encode mode, the encode mode is always single.See
DJILBAirLinkEncodeModeDeclaration
Objective-C
- (void)getEncodeModeWithCompletion: (void (^_Nonnull)(DJILBAirLinkEncodeMode, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Sets the computational power and bandwidth balance between AV and HMDI inputs on the Lightbridge 2 module when dual encode mode is enabled. Balance is in percent [0.0, 1.0]. It is only available when
isDualEncodeModeSupportedreturnsYES. Whenpercentis 0.0, all resources are allocated for video data from AV port. Whenpercentis 1.0, all resources are allocated for video data from HDMI port.Declaration
Objective-C
- (void)setDualEncodeModePercent:(float)percent withCompletion:(DJICompletionBlock)completion;Parameters
percentPercentage resources dedicated to HDMI encoding and transmission.
completionCompletion block.
-
Gets the computational power and bandwidth balance between AV and HMDI inputs on the Lightbridge 2 module when dual encode mode is enabled. It is only available when
isDualEncodeModeSupportedreturnsYES. Whenpercentis 0.0, all resources are allocated for video data from AV port. Whenpercentis 1.0, all resources are allocated for video data from HDMI port.Declaration
Objective-C
- (void)getDualEncodeModePercentWithCompletion: (void (^_Nonnull)(float, NSError *_Nullable))completion;Parameters
completionCompletion block.
-
Gets the frequency bands supported by the product in the current area. It is only supported by Inspire 2 and Phantom 4 Pro. For the other products with LB air link, the frequency band is always 2.4 GHz.
Declaration
Objective-C
- (void)getSupportedFrequencyBandWithCompletion: (void (^_Nonnull)(NSArray<NSNumber *> *_Nullable, NSError *_Nullable))completion;Parameters
completionCompletion block that receives the getter result. Each element in
frequencyBandsis a value ofDJILBAirLinkFrequencyBand. -
Sets the LB air link frequency band. It is only supported by Inspire 2 and Phantom 4 Pro. For the other products with LB air link, the frequency band is always 2.4 GHz.
Declaration
Objective-C
- (void)setFrequencyBand:(DJILBAirLinkFrequencyBand)frequencyBand withCompletion:(DJICompletionBlock)completion;Parameters
frequencyBandLBAirLink frequency band to change to.
completionRemote execution result error block.
-
Gets the LB air link frequency band. It is only supported by Inspire 2 and Phantom 4 Pro. For the other products with LB air link, the frequency band is always 2.4 GHz.
Declaration
Objective-C
- (void)getFrequencyBandWithCompletion: (void (^_Nonnull)(DJILBAirLinkFrequencyBand, NSError *_Nullable))completion;Parameters
completionRemote execution result error block.
View on GitHub
DJILBAirLink Class Reference