DJI Mobile SDK Documentation

      class DJIVideoFeeder

      @interface DJIVideoFeeder : NSObject
      Header:DJIVideoFeeder.h
      Inherits From:NSObject
      Description:

      Class that manages live video feed from DJI products to the mobile device.

      Class Members:
      Primary Video Feed
      property
      property primaryVideoFeed
      @property (nonatomic, strong, nonnull) DJIVideoFeed *primaryVideoFeed
      Header:DJIVideoFeeder.h
      Description:

      The primary video feed.
      The possible physical sources for the primary video feed include:
      - DJIVideoFeedPhysicalSourceMainCamera
      - DJIVideoFeedPhysicalSourceLB
      - DJIVideoFeedPhysicalSourceHDMI
      - DJIVideoFeedPhysicalSourceLeftCamera
      - DJIVideoFeedPhysicalSourceRightCamera
      For M210 and M210 RTK, the physical sources are controlled by the bandwidth allocation between the port (left) and starboard (right) main cameras (setBandwidthAllocationForLeftCamera:withCompletion):
      - When bandwidth is 100% on the left camera, the primary source is DJIVideoFeedPhysicalSourceLeftCamera and the secondary source is DJIVideoFeedPhysicalSourceFPVCamera.
      - When bandwidth is 0% on the left camera, the primary source is DJIVideoFeedPhysicalSourceRightCamera and the secondary source is DJIVideoFeedPhysicalSourceFPVCamera.
      - When bandwidth is neither 0% nor 100% on the left camera, the primary source is DJIVideoFeedPhysicalSourceLeftCamera and the secondary source is DJIVideoFeedPhysicalSourceRightCamera.

      See Also:

      DJIVideoFeed

      Secondary Video Feed
      property
      property secondaryVideoFeed
      @property (nonatomic, strong, nonnull) DJIVideoFeed *secondaryVideoFeed
      Header:DJIVideoFeeder.h
      Description:

      The secondary video feed.
      The possible physical sources for the secondary video feed include:
      - DJIVideoFeedPhysicalSourceFPVCamera
      - DJIVideoFeedPhysicalSourceEXT
      - DJIVideoFeedPhysicalSourceAV
      - DJIVideoFeedPhysicalSourceRightCamera. For M210 and M210 RTK, the physical sources are controlled by the bandwidth allocation between the port (left) and starboard (right) main cameras (setBandwidthAllocationForLeftCamera:withCompletion):
      - When bandwidth is 100% on the left camera, the primary source is DJIVideoFeedPhysicalSourceLeftCamera and the secondary source is DJIVideoFeedPhysicalSourceFPVCamera.
      - When bandwidth is 0% on the left camera, the primary source is DJIVideoFeedPhysicalSourceRightCamera and the secondary source is DJIVideoFeedPhysicalSourceFPVCamera.
      - When bandwidth is neither 0% nor 100% on the left camera, the primary source is DJIVideoFeedPhysicalSourceLeftCamera and the secondary source is DJIVideoFeedPhysicalSourceRightCamera.

      See Also:

      DJIVideoFeed

      Add Listener
      method
      method addVideoFeedSourceListener
      - (void)addVideoFeedSourceListener:(id <DJIVideoFeedSourceListener>)sourceListener
      Header:DJIVideoFeeder.h
      Description:

      Add listener to receive the physical source changes.

      Input Parameters:
      id <DJIVideoFeedSourceListener> sourceListenerListener to add.
      Remove Listener
      method
      method removeVideoFeedSourceListener
      - (void)removeVideoFeedSourceListener:(id <DJIVideoFeedSourceListener>)sourceListener
      Header:DJIVideoFeeder.h
      Description:

      Remove listener to stop receiving the physical source changes.

      Input Parameters:
      id <DJIVideoFeedSourceListener> sourceListenerListener to remove.
      Remove All Listener
      method
      method removeAllListeners
      - (void)removeAllListeners
      Header:DJIVideoFeeder.h
      Description:

      Remove all listeners.

      method parseDecodingAssistInfoWithBuffer:length:assistInfo
      - (BOOL)parseDecodingAssistInfoWithBuffer:(uint8_t *)buffer length:(int)length assistInfo:(void *)assistInfo
      Header:DJIVideoFeeder.h
      Description:

      Parses decoding assistant information for H.264 stream data. The information will be useful for the H.264 decoder.

      Input Parameters:
      uint8_t * bufferH.264 stream data to parse.
      int lengthThe data's length.
      void * assistInfoAn allocated memory with at least 8 bytes to receive the assistant information.
      Return:
      BOOLYES if information is parsed successfully from the stream.
      Sync Decoder Status
      method
      method syncDecoderStatus
      - (void)syncDecoderStatus:(BOOL)isNormal
      Header:DJIVideoFeeder.h
      Description:

      Synchronizes the decoder status (if it is in normal status) to the video feeder. The decoder status is useful for the assistant information parser.

      Input Parameters:
      BOOL isNormalYES if the decoder is in normal status.
      Decoding Succeeded
      method
      method decodingDidSucceedWithTimestamp
      - (void)decodingDidSucceedWithTimestamp:(NSUInteger)timestamp
      Header:DJIVideoFeeder.h
      Description:

      Tells the parser that the decoder has decoded a frame successfully.

      Input Parameters:
      NSUInteger timestampThe timestamp of the decoded frame.
      Decoding Failed
      method
      method decodingDidFail
      - (void)decodingDidFail
      Header:DJIVideoFeeder.h
      Description:

      Tells the parser that the decoder has failed to decode frames from the video feed.