DJI Mobile SDK Documentation

      class IVideoChannel

      @Deprecated
      interface IVideoChannel
      Package:dji.v5.common.video.interfaces
      Description:

      This class represents the video channels, it is used to manage video source. Every video channel can set a video source.

      Supported since MSDK 5.0.0

      Class Members:
      method getVideoChannelType
      @NonNull
      VideoChannelType getVideoChannelType()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the type of video channel.

      Supported since MSDK 5.0.0

      Return:
      VideoChannelTypeReturn the type of video channel
      method startChannel
      void startChannel(@NonNull StreamSource source, @Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.common.video.interfaces
      Description:

      Set the video source and enable it. The channel will start receiving video data after you call this method. You can calladdStreamDataListener to recive the video data. After receiving the video data, you can decode it and render it. You can use DJI decoderIVideoDecoderto decode the video stream, it supports YUV output mode and SURFACE output mode.

    • You can calladdVideoChannelStateChangeListener to recive the video data. After enabling it, the channel state will change toON.


    • Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull StreamSource sourceAn instance of video source.
      @Nullable CommonCallbacks.CompletionCallback callbackA callback that returns the execution result.
      method closeChannel
      void closeChannel(@Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.common.video.interfaces
      Description:

      Disable the video channel. After disabling the video channel, theandroidx.annotation.NonNullwill stop receiving video data. After disabling the channel successfully, The channel state will change toCLOSE.

      Supported since MSDK 5.0.0

      Input Parameters:
      @Nullable CommonCallbacks.CompletionCallback callbackA callback which returns the execution result.
      method addStreamDataListener
      void addStreamDataListener(@Nullable StreamDataListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Add the video data listener. You can use this listener to receive the video data on video channel.

      Supported since MSDK 5.0.0

      Input Parameters:
      @Nullable StreamDataListener listenerVideo data listener
      method removeStreamDataListener
      void removeStreamDataListener(@Nullable StreamDataListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Remove the video data listener. After removing this listener, it will not receive any video data on video stream channel.

      Supported since MSDK 5.0.0

      Input Parameters:
      @Nullable StreamDataListener listenerVideo data listener
      method clearAllStreamDataListener
      void clearAllStreamDataListener()
      Package:dji.v5.common.video.interfaces
      Description:

      Clear all video data listeners on this channel.

      Supported since MSDK 5.0.0

      method addVideoChannelStateChangeListener
      void addVideoChannelStateChangeListener(@Nullable VideoChannelStateChangeListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Add a video state listener.

      Supported since MSDK 5.0.0

      Input Parameters:
      @Nullable VideoChannelStateChangeListener listenerVideo state listener
      method removeVideoChannelStateChangeListener
      void removeVideoChannelStateChangeListener(@Nullable VideoChannelStateChangeListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Remove a video state listener.

      Supported since MSDK 5.0.0

      Input Parameters:
      @Nullable VideoChannelStateChangeListener listenerVideo state listener
      method clearAllVideoChannelStateChangeListeners
      void clearAllVideoChannelStateChangeListeners()
      Package:dji.v5.common.video.interfaces
      Description:

      Clear all video state listeners on this channel.

      Supported since MSDK 5.0.0

      method getVideoChannelStatus
      @NonNull
      VideoChannelState getVideoChannelStatus()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the status of video channel.

      Supported since MSDK 5.0.0

      Return:
      VideoChannelStateReturn the status of video channel.
      method getStreamSource
      StreamSource getStreamSource()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the video source on this video channel.

      Supported since MSDK 5.0.0

      Return:
      StreamSourceReturn the video source on this video channel.
      method getVideoStreamFormat
      @NonNull
      VideoStreamFormat getVideoStreamFormat()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the video stream format on this video channel.

      Supported since MSDK 5.1.0

      Return:
      VideoStreamFormatReturn the video stream format on this video channel.
      enum VideoChannelType
      @Deprecated
      enum VideoChannelType
      Package:dji.v5.common.video.channel
      Description:

      The type of video channel. Every video channel has an unique video channel type. The main video channel has the highest priority. When the transmitting bandwidth is narrow, we will ensure the main video channel is working properly first.

      Supported since MSDK 5.0.0

      Enum Members:
      PRIMARY_STREAM_CHANNELPrimary video channel, highest priority, we will make sure this channel is working properly when the transmitting bandwidth is narrow.
      SECONDARY_STREAM_CHANNELDeputy video channel, lower priority than the primary video channel.
      EXTENDED_STREAM_CHANNELExtended video channel, lowest priority. It will lose data packet when the transmitting bandwidth is narrow.
      Class Members:
      enum VideoChannelState
      @Deprecated
      enum VideoChannelState
      Package:dji.v5.common.video.channel
      Description:

      The state of video channel.

      Supported since MSDK 5.0.0

      Enum Members:
      CLOSECurrent video channel is disabled.
      ONCurrent video channel is enabled.
      Class Members:
      enum VideoStreamFormat
      enum VideoStreamFormat
      Package:dji.v5.common.video.stream
      Description:

      Video Stream format.

      Supported since MSDK 5.1.0

      Enum Members:
      H264H264.
      H265H265.
      Class Members:
      property androidx.annotation.NonNull
      import androidx.annotation.NonNull
      Package:dji.v5.common.video.interfaces
      Description:

      Video data listener.

      Supported since MSDK 5.0.0