DJI Mobile SDK Documentation

      class VideoSizeCalculatorUtil

      class VideoSizeCalculatorUtil
      Package:dji.sdk.util
      Description:

      Utility class for calculating the appropriate size of the video based on screen type and video type defined by aircraft's mode and resolution settings

      Class Members:
      Set Listener
      method
      method setListener
      void setListener(VideoSizeListener listener)
      Package:dji.sdk.util
      Description:

      Set a listener of the VideoSizeListener interface.

      Input Parameters:
      VideoSizeListener listenerA listener for the VideoSizeListener interface.
      Set Video Type By Size
      method
      method setVideoTypeBySize
      void setVideoTypeBySize(int videoWidth, int videoHeight, int cameraIndex)
      Package:dji.sdk.util
      Description:

      Set Video type by video size and camera index.

      Input Parameters:
      int videoWidthWidth of the video as received from the DJICodecManager.
      int videoHeightHeight of the video as received from the DJICodecManager.
      int cameraIndexIndex of the camera which is the source of the video.
      Set Video Is Rotated
      method
      method setVideoIsRotated
      void setVideoIsRotated(boolean isRotated)
      Package:dji.sdk.util
      Description:

      Set video orientation.

      Input Parameters:
      boolean isRotatedtrue for portrait orientation and False for landscape.
      Set Screen Type By Size
      method
      method setScreenTypeBySize
      void setScreenTypeBySize(int viewWidth, int viewHeight)
      Package:dji.sdk.util
      Description:

      Set screen type by screen size using the view width and height.

      Input Parameters:
      int viewWidthWidth of the view in which the video is being displayed.
      int viewHeightHeight of the view in which the video is being displayed.
      Calculate Video Size
      method
      method calculateVideoSize
      void calculateVideoSize()
      Package:dji.sdk.util
      Description:

      Calculate the video size with the set options.