DJI Mobile SDK Documentation

      class VideoFeed

      interface VideoFeed
      Package:dji.sdk.camera
      Description:

      Video feed. Use it to receive video data from a physical source.

      Class Members:
      Set Priority
      method
      method setPriority
      void setPriority(@NonNull VideoFeedPriority priority, @Nullable final CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.camera
      Description:

      Set the channel priority of the video feed. Priority will affect the bandwidth allocation if it is not UNKNOWN, which is the default value. For example, if the data comes from the payload device mounted on left gimbal is prefer, please set the priority to HIGH, and physicalSource is LEFT_CAM. The others should be set to MEDIUM or LOW. Only supported by Matrice 300 RTK.

      Input Parameters:
      @NonNull VideoFeedPriority priorityPriority for the primary video feed.
      @Nullable final CommonCallbacks.CompletionCallback callbackcallback The execution callback with the value(s) returned.
      Get Priority
      method
      method getPriority
      void getPriority(@NonNull final CommonCallbacks.CompletionCallbackWith<VideoFeedPriority> callback)
      Package:dji.sdk.camera
      Description:

      Get the channel priority of the video feed. Only supported by Matrice 300 RTK.

      Input Parameters:
      @NonNull final CommonCallbacks.CompletionCallbackWith<VideoFeedPriority> callbackcallback The execution callback with the value(s) returned.
      enum PhysicalSource
      @EXClassNullAway
      enum PhysicalSource
      Package:dji.common.airlink
      Description:

      The physical source of a video feed.

      Enum Members:
      MAIN_CAMThe video feed is from the main camera. It is the physical source used by most of DJI products. LEFT_CAM and RIGHT_CAM are used instead in M210 series and M210 V2 series.
      FPV_CAMThe video feed is from the FPV camera on Inspire 2, M200 series and M200 series v2 and Matrice 300 RTK.
      EXTThe video feed is from EXT port while EXT port is enabled. It is only used for Lightbridge 2 or aircrafts with Lightbridge 2 (e.g. M600).
      LBThe video feed is from one of the LB ports (AV or HDMI) while EXT Port is enabled. It is only used for stand-alone Lightbridge 2 or aircraft with stand-alone Lightbridge 2 modules (e.g. M600).
      HDMIThe video feed is from the HDMI port while EXT port is disabled. It is only used for stand-alone Lightbridge 2 or aircraft with stand-alone Lightbridge 2 modules.
      AVThe video feed is from AV port while EXT port is disabled. It is only used for stand-alone Lightbridge 2 or aircraft with stand-alone Lightbridge 2 modules.
      LEFT_CAMThe video feed is from the port (left) main camera. It is only used for M210 series and M210 V2 series and Matrice 300 RTK.
      RIGHT_CAMThe video feed is from the starboard (right) main camera. It is only used for M210 series and M210 V2 series and Matrice 300 RTK.
      TOP_CAMThe video feed is from the camera above the aircraft. It is only used for Matrice 300 RTK.
      UNKNOWNUnknown video physical source.
      Class Members:
      enum VideoFeedPriority
      enum VideoFeedPriority
      Package:dji.common.airlink
      Description:

      The enum is used to represent priority of a stream channel. It is supported only by Matrice 300 RTK.

      Enum Members:
      HIGHThe stream channel's priority is high.
      MEDIUMThe stream channel's priority is medium.
      LOWThe stream channel's priority is low.
      UNKNOWNThe stream channel's priority is unknown.
      Class Members:
      State Updates
      class


      Callback Method

      State
      method
      method getVideoSource
      PhysicalSource getVideoSource()
      Package:dji.sdk.camera
      Description:

      Gets the physical sources of the video data.

      Return:
      PhysicalSourceAn enum value of PhysicalSource.
      method addVideoDataListener
      boolean addVideoDataListener(@NonNull final VideoDataListener listener)
      Package:dji.sdk.camera
      Description:

      Adds a listener to access the video data that is being shown by the VideoFeed.

      Input Parameters:
      @NonNull final VideoDataListener listenerThe listener to be added to the VideoFeed.
      Return:
      booleantrue if listener was added successfully.
      method removeVideoDataListener
      boolean removeVideoDataListener(VideoDataListener listener)
      Package:dji.sdk.camera
      Description:

      Removes the specified listener from the VideoFeed, if it is present (optional operation). If this VideoFeed does not contain the listener, it is unchanged.

      Input Parameters:
      VideoDataListener listenerThe listener to be removed from the VideoFeed.
      Return:
      booleantrue if the listener was removed successfully.
      method getListeners
      Set<VideoDataListener> getListeners()
      Package:dji.sdk.camera
      Description:

      Returns the list of the existing video data listeners.

      Return:
      Set<VideoDataListener>A list of existing VideoDataListener.
      method addVideoActiveStatusListener
      boolean addVideoActiveStatusListener(@NonNull final VideoActiveStatusListener listener)
      Package:dji.sdk.camera
      Description:

      Adds a listener to access the video active status that is being shown by the VideoFeed.

      Input Parameters:
      @NonNull final VideoActiveStatusListener listenerThe listener to be added to the VideoFeed.
      Return:
      booleantrue if the listener was added successfully.
      method removeVideoActiveStatusListener
      boolean removeVideoActiveStatusListener(VideoActiveStatusListener listener)
      Package:dji.sdk.camera
      Description:

      Removes the specified listener from the VideoFeed, if it is present (optional operation). If this VideoFeed does not contain the listener, it is unchanged.

      Input Parameters:
      VideoActiveStatusListener listenerThe listener to be removed from the VideoFeed.
      Return:
      booleantrue if the listener was removed successfully.
      method
      method destroy
      void destroy()
      Package:dji.sdk.camera
      Description:

      Destroy all the listeners associated with this VideoFeed.