Interface IVLCVout.OnNewVideoLayoutListener

  • Enclosing interface:
    IVLCVout

    public static interface IVLCVout.OnNewVideoLayoutListener
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onNewVideoLayout​(IVLCVout vlcVout, int width, int height, int visibleWidth, int visibleHeight, int sarNum, int sarDen)
      This listener is called when the "android-display" "vout display" module request a new video layout.
    • Method Detail

      • onNewVideoLayout

        @MainThread
        void onNewVideoLayout​(IVLCVout vlcVout,
                              int width,
                              int height,
                              int visibleWidth,
                              int visibleHeight,
                              int sarNum,
                              int sarDen)
        This listener is called when the "android-display" "vout display" module request a new video layout. The implementation should take care of changing the surface LayoutsParams accordingly. If width and height are 0, LayoutParams should be reset to the initial state (MATCH_PARENT). By default, "android-display" is used when doing HW decoding and if Video and Subtitles surfaces are correctly attached. You could force "--vout=android-display" from LibVLC arguments if you want to use this module without subtitles. Otherwise, the "opengles2" module will be used (for SW and HW decoding) and this callback will always send a size of 0.
        Parameters:
        vlcVout - vlcVout
        width - Frame width
        height - Frame height
        visibleWidth - Visible frame width
        visibleHeight - Visible frame height
        sarNum - Surface aspect ratio numerator
        sarDen - Surface aspect ratio denominator