Package 

Class AWindow

  • All Implemented Interfaces:
    org.videolan.libvlc.interfaces.IVLCVout

    
    public class AWindow
     implements IVLCVout
                        
    • Constructor Detail

      • AWindow

        AWindow(AWindow.SurfaceCallback surfaceCallback)
        Create an AWindowYou call this directly only if you use the libvlc_media_player native API (and not the JavaMediaPlayer class).
    • Method Detail

      • setVideoSurface

         void setVideoSurface(Surface videoSurface, SurfaceHolder surfaceHolder)

        Set a surface used for video out.

        Parameters:
        videoSurface - if surfaceHolder is null, this surface must be valid and attached.
        surfaceHolder - optional, used to configure buffers geometry before Android ICSand to get notified when surface is destroyed.
      • setVideoSurface

         void setVideoSurface(SurfaceTexture videoSurfaceTexture)

        Set a SurfaceTexture used for video out.

        Parameters:
        videoSurfaceTexture - this surface must be valid and attached.
      • setSubtitlesSurface

         void setSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder)

        Set a surface used for subtitles out.

        Parameters:
        subtitlesSurface - if surfaceHolder is null, this surface must be valid and attached.
        surfaceHolder - optional, used to configure buffers geometry before Android ICSand to get notified when surface is destroyed.
      • setSubtitlesSurface

         void setSubtitlesSurface(SurfaceTexture subtitlesSurfaceTexture)

        Set a SurfaceTexture used for subtitles out.

        Parameters:
        subtitlesSurfaceTexture - this surface must be valid and attached.
      • attachViews

        @MainThread() void attachViews(IVLCVout.OnNewVideoLayoutListener onNewVideoLayoutListener)

        Attach views with an OnNewVideoLayoutListenerThis must be called afters views are set and before the MediaPlayer is first started.If onNewVideoLayoutListener is not null, the caller will handle the video layout that isneeded by the "android-display" "vout display" module. Even if that case, the OpenGL ES2could still be used.If onNewVideoLayoutListener is null, the caller won't handle the video layout that isneeded by the "android-display" "vout display" module. Therefore, only the OpenGL ES2"vout display" module will be used (for hardware and software decoding).

      • detachViews

        @MainThread() void detachViews()

        Detach views previously attached.This will be called automatically when surfaces are destroyed.

      • areViewsAttached

        @MainThread() boolean areViewsAttached()

        Return true if views are attached. If surfaces were destroyed, this will return false.

      • setWindowSize

         void setWindowSize(int width, int height)

        Send the the window size to the native vout.

        Parameters:
        width - width of the window.
        height - height of the window.