DJI Mobile SDK Documentation

      class IVideoDecoder

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

      DJI decoder class. It supports YUV output mode and SURFACE output mode. You can set the output modeDecoderOutputModethrough its constructor. You can setVideoChannelTypeto bind the decoder with channelIVideoChannel.
      Note: If you want to set the width and height of decoder through constructor, you have to make sure the width and height are multple of 16.

      Supported since MSDK 5.0.0

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

      Get the output mode of decoder.

      Supported since MSDK 5.0.0

      Return:
      DecoderOutputModeReturn the output mode of decoder.
      method getVideoChannelType
      VideoChannelType getVideoChannelType()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the video channel type of decoder.

      Supported since MSDK 5.0.0

      Return:
      VideoChannelTypeReturn the video channel type of decoder.
      method setMediaFile
      void setMediaFile(MediaFile mediaFile)
      Package:dji.v5.common.video.interfaces
      Description:

      Sets the media file that need to be decoded. Before playVideo, you need to call this interface to set the media file to be decoded into the decoder.

      Supported since MSDK 5.1.0

      Input Parameters:
      MediaFile mediaFileMedia file that needs to be decoded.
      method getMediaFile
      MediaFile getMediaFile()
      Package:dji.v5.common.video.interfaces
      Description:

      Gets the media file that needs to be decoded.

      Supported since MSDK 5.1.0

      Return:
      MediaFileReturns the media file that needs to be decoded.
      method queueInFrame
      void queueInFrame(@NonNull IVideoFrame videoFrame)
      Package:dji.v5.common.video.interfaces
      Description:

      Send the video frame data to the queue for decoding. There is no need to call this interface for the use of IVideoStreamManager, because MSDK will automatically send the data to the corresponding decoder for decoding and display. This interface can be used to decode the video frame data from playVideo.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull IVideoFrame videoFrameVideo frame data
      method getVideoWidth
      int getVideoWidth()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the video width after decoding.

      Supported since MSDK 5.0.0

      Return:
      intReturn the video width after decoding.
      method getVideoHeight
      int getVideoHeight()
      Package:dji.v5.common.video.interfaces
      Description:

      Get the video height after decoding.

      Supported since MSDK 5.0.0

      Return:
      intReturn the video height after decoding.
      method addYuvDataListener
      void addYuvDataListener(@NonNull YuvDataListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Add the YUV data listener. After settingDecoderOutputModeasYUV_MODE, you can get YUV data through this listener.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull YuvDataListener listenerYUV data listener
      method removeYuvDataListener
      void removeYuvDataListener(@NonNull YuvDataListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Remove YUV data listener.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull YuvDataListener listenerYUV data listener
      method clearAllYuvDataListeners
      void clearAllYuvDataListeners()
      Package:dji.v5.common.video.interfaces
      Description:

      Clear all YUV data listeners.

      Supported since MSDK 5.0.0

      method addDecoderStateChangeListener
      void addDecoderStateChangeListener(@NonNull DecoderStateChangeListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Add decoder state listener.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull DecoderStateChangeListener listenerDecoder state listener
      method removeDecoderStateChangeListener
      void removeDecoderStateChangeListener(@NonNull DecoderStateChangeListener listener)
      Package:dji.v5.common.video.interfaces
      Description:

      Remove decoder state listener.

      Supported since MSDK 5.0.0

      Input Parameters:
      @NonNull DecoderStateChangeListener listenerDecoder state listener
      method clearAllDecoderStateChangeListeners
      void clearAllDecoderStateChangeListeners()
      Package:dji.v5.common.video.interfaces
      Description:

      Clear all decoder state listeners.

      Supported since MSDK 5.0.0

      method getDecoderStatus
      @NonNull
      DecoderState getDecoderStatus()
      Package:dji.v5.common.video.interfaces
      Description:

      Get decoder status.

      Supported since MSDK 5.0.0

      Return:
      DecoderStateReturn decoder status.
      method
      method onPause
      void onPause()
      Package:dji.v5.common.video.interfaces
      Description:

      Pause the decoder.

      Supported since MSDK 5.0.0

      method
      method onResume
      void onResume()
      Package:dji.v5.common.video.interfaces
      Description:

      Resume the decoder.

      Supported since MSDK 5.0.0

      enum DecoderOutputMode
      @Deprecated
      enum DecoderOutputMode
      Package:dji.v5.common.video.decoder
      Description:

      Decoder output mode. Support YUV output mode and SURFACE output mode.

      Supported since MSDK 5.0.0

      Enum Members:
      YUV_MODEYUV output mode.
      SURFACE_MODESURFACE output mode.
      Class Members:
      enum DecoderState
      @Deprecated
      enum DecoderState
      Package:dji.v5.common.video.decoder
      Description:

      Decoder State.

      Supported since MSDK 5.0.0

      Enum Members:
      INITIALIZEDInitialization of decoder is completed.
      VIDEO_FRAME_INPUTDecoder is in a state of waiting for video frame input.
      DECODINGDecoder is in decoding state.
      PAUSEDDecoder is in pause state.
      Class Members: