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 *)data in DJILBAirLinkDelegate and DJICameraDelegate.

    Declaration

    Objective-C

    - (void)setVideoDataChannel:(DJIVideoDataChannel)videoDataChannel
                 withCompletion:(DJICompletionBlock)completion;

    Parameters

    videoDataChannel

    The video source that streams data to the delegate method.

    completion

    Completion 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 *)data in DJILBAirLinkDelegate and DJICameraDelegate.

    Declaration

    Objective-C

    - (void)getVideoDataChannelWithCompletion:
        (void (^_Nonnull)(DJIVideoDataChannel, NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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

    mode

    Channel selection mode for LBAirLink.

    completion

    Completion block.

  • Gets downlink channel selection mode.

    Declaration

    Objective-C

    - (void)getChannelSelectionModeWithCompletion:
        (void (^_Nonnull)(DJILBAirLinkChannelSelectionMode,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Gets the channels available for the current frequency band.

    Declaration

    Objective-C

    - (void)getChannelRangeWithCompletion:
        (void (^_Nonnull)(NSRange, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets fixed downlink channel. Channel selection mode should be set to DJILBAirLinkChannelSelectionModeManual. The valid range of channel can be obtained from getChannelRangeWithCompletion:.

    Declaration

    Objective-C

    - (void)setChannel:(int)channel withCompletion:(DJICompletionBlock)completion;

    Parameters

    channel

    Specific channel for the air link.

    completion

    Completion block.

  • Gets current downlink channel of air link.

    Declaration

    Objective-C

    - (void)getChannelWithCompletion:
        (void (^_Nonnull)(int, NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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

    rate

    Fixed rate (throughput).

    completion

    Completion block.

  • Gets the current downlink data rate (throughput).

    Declaration

    Objective-C

    - (void)getDataRateWithCompletion:
        (void (^_Nonnull)(DJILBAirLinkDataRate, NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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

    qualityLatency

    Quality vs Latency tradeoff for the FPV video

    completion

    Completion 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

    completion

    Completion 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

    percent

    Percentage downlink bandwidth for FPV camera.

    completion

    Completion 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

    enabled

    Enables secondary video output.

    completion

    Completion 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 setSecondaryVideoOuputEnable to enable or disable, and setSecondaryVideoOutputPort to choose the port.

    Declaration

    Objective-C

    - (void)getSecondaryVideoOutputEnabledWithCompletion:
        (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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

    port

    Secondary video output port.

    completion

    Completion 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

    completion

    Completion 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

    pipDisplay

    Picture in Picture (PIP) display mode.

    completion

    Completion 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

    completion

    Completion 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

    enabled

    Determines whether to display OSD on screen.

    completion

    Completion 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

    completion

    Completion block.

  • Sets the OSD top margin in video pixels.

    Declaration

    Objective-C

    - (void)setOSDTopMargin:(NSUInteger)margin
             withCompletion:(DJICompletionBlock)completion;

    Parameters

    margin

    Top margin of OSD. The range is [0, 50].

    completion

    Completion block.

  • Gets the OSD top margin in video pixels.

    Declaration

    Objective-C

    - (void)getOSDTopMarginWithCompletion:
        (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets the OSD left margin in video pixels.

    Declaration

    Objective-C

    - (void)setOSDLeftMargin:(NSUInteger)margin
              withCompletion:(DJICompletionBlock)completion;

    Parameters

    margin

    Left margin of OSD. The range is [0, 50].

    completion

    Completion block.

  • Gets the OSD left margin in video pixels.

    Declaration

    Objective-C

    - (void)getOSDLeftMarginWithCompletion:
        (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets the OSD bottom margin in video pixels.

    Declaration

    Objective-C

    - (void)setOSDBottomMargin:(NSUInteger)margin
                withCompletion:(DJICompletionBlock)completion;

    Parameters

    margin

    Bottom margin of OSD. The range is [0, 50].

    completion

    Completion block.

  • Gets the OSD bottom margin in video pixels.

    Declaration

    Objective-C

    - (void)getOSDBottomMarginWithCompletion:
        (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets the OSD right margin in video pixels.

    Declaration

    Objective-C

    - (void)setOSDRightMargin:(NSUInteger)margin
               withCompletion:(DJICompletionBlock)completion;

    Parameters

    margin

    Right margin of OSD. The range is [0, 50].

    completion

    Completion block.

  • Gets the OSD right margin in video pixels.

    Declaration

    Objective-C

    - (void)getOSDRightMarginWithCompletion:
        (void (^_Nonnull)(NSUInteger, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets the OSD units to either metric or imperial.

    Declaration

    Objective-C

    - (void)setOSDUnits:(DJILBAirLinkOSDUnits)units
         withCompletion:(DJICompletionBlock)completion;

    Parameters

    units

    OSD units.

    completion

    Completion block.

  • Gets the OSD units (metric or imperial).

    Declaration

    Objective-C

    - (void)getOSDUnitsWithCompletion:
        (void (^_Nonnull)(DJILBAirLinkOSDUnits, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets the Remote Controller HDMI video port output video format.

    Declaration

    Objective-C

    - (void)setHDMIOutputFormat:(DJILBAirLinkSecondaryVideoFormat)format
                 withCompletion:(DJICompletionBlock)completion;

    Parameters

    outputFormat

    Video output format for the HDMI port.

    completion

    Completion block.

  • Gets the Remote Controller HDMI video port output video format.

    Declaration

    Objective-C

    - (void)getHDMIOutputFormatWithCompletion:
        (void (^_Nonnull)(DJILBAirLinkSecondaryVideoFormat,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets the Remote Controller SDI video port output video format.

    Declaration

    Objective-C

    - (void)setSDIOutputFormat:(DJILBAirLinkSecondaryVideoFormat)format
                withCompletion:(DJICompletionBlock)completion;

    Parameters

    outputFormat

    Video output format for SDI port.

    completion

    Completion block.

  • Gets the Remote Controller SDI video port output video format.

    Declaration

    Objective-C

    - (void)getSDIOutputFormatWithCompletion:
        (void (^_Nonnull)(DJILBAirLinkSecondaryVideoFormat,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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

    position

    Position of the PIP on the screen.

    completion

    Completion 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

    completion

    Completion block.

  • YES if 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 isDualEncodeModeSupported returns YES. For Lightbridge 2 modules that don’t support dual encode mode, the encode mode is always single.

    See

    DJILBAirLinkEncodeMode

    Declaration

    Objective-C

    - (void)setEncodeMode:(DJILBAirLinkEncodeMode)mode
           withCompletion:(DJICompletionBlock)completion;

    Parameters

    mode

    The encode mode to set.

    completion

    Completion block.

  • Gets Lightbridge 2 encode mode. It is only available when isDualEncodeModeSupported returns YES. For Lightbridge 2 modules that don’t support dual encode mode, the encode mode is always single.

    See

    DJILBAirLinkEncodeMode

    Declaration

    Objective-C

    - (void)getEncodeModeWithCompletion:
        (void (^_Nonnull)(DJILBAirLinkEncodeMode, NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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 isDualEncodeModeSupported returns YES. When percent is 0.0, all resources are allocated for video data from AV port. When percent is 1.0, all resources are allocated for video data from HDMI port.

    Declaration

    Objective-C

    - (void)setDualEncodeModePercent:(float)percent
                      withCompletion:(DJICompletionBlock)completion;

    Parameters

    percent

    Percentage resources dedicated to HDMI encoding and transmission.

    completion

    Completion 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 isDualEncodeModeSupported returns YES. When percent is 0.0, all resources are allocated for video data from AV port. When percent is 1.0, all resources are allocated for video data from HDMI port.

    Declaration

    Objective-C

    - (void)getDualEncodeModePercentWithCompletion:
        (void (^_Nonnull)(float, NSError *_Nullable))completion;

    Parameters

    completion

    Completion 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

    completion

    Completion block that receives the getter result. Each element in frequencyBands is a value of DJILBAirLinkFrequencyBand.

  • 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

    frequencyBand

    LBAirLink frequency band to change to.

    completion

    Remote 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

    completion

    Remote execution result error block.