Package org.videolan.libvlc
Class AWindow
- java.lang.Object
-
- org.videolan.libvlc.AWindow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAWindow.SurfaceCallback-
Nested classes/interfaces inherited from interface org.videolan.libvlc.interfaces.IVLCVout
IVLCVout.Callback, IVLCVout.OnNewVideoLayoutListener
-
-
Constructor Summary
Constructors Constructor Description AWindow(AWindow.SurfaceCallback surfaceCallback)Create an AWindow You call this directly only if you use the libvlc_media_player native API (and not the Java MediaPlayer class).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCallback(IVLCVout.Callback callback)Add a callback to receiveIVLCVout.Callback.onSurfacesCreated(org.videolan.libvlc.interfaces.IVLCVout)andIVLCVout.Callback.onSurfacesDestroyed(IVLCVout)events.booleanareViewsAttached()Return true if views are attached.voidattachViews()Attach views without an OnNewVideoLayoutListenervoidattachViews(IVLCVout.OnNewVideoLayoutListener onNewVideoLayoutListener)Attach views with an OnNewVideoLayoutListener This must be called afters views are set and before the MediaPlayer is first started.voiddetachViews()Detach views previously attached.voidremoveCallback(IVLCVout.Callback callback)Remove a callback.voidsendMouseEvent(int action, int button, int x, int y)Send a mouse event to the native vout.voidsetSubtitlesSurface(SurfaceTexture subtitlesSurfaceTexture)Set a SurfaceTexture used for subtitles out.voidsetSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder)Set a surface used for subtitles out.voidsetSubtitlesView(SurfaceView subtitlesSurfaceView)Set a surfaceView used for subtitles out.voidsetSubtitlesView(TextureView subtitlesTextureView)Set a TextureView used for subtitles out.voidsetVideoSurface(SurfaceTexture videoSurfaceTexture)Set a SurfaceTexture used for video out.voidsetVideoSurface(Surface videoSurface, SurfaceHolder surfaceHolder)Set a surface used for video out.voidsetVideoView(SurfaceView videoSurfaceView)Set a surfaceView used for video out.voidsetVideoView(TextureView videoTextureView)Set a TextureView used for video out.voidsetWindowSize(int width, int height)Send the the window size to the native vout.
-
-
-
Constructor Detail
-
AWindow
public AWindow(AWindow.SurfaceCallback surfaceCallback)
Create an AWindow You call this directly only if you use the libvlc_media_player native API (and not the Java MediaPlayer class).- Parameters:
surfaceCallback-
-
-
Method Detail
-
setVideoView
@MainThread public void setVideoView(SurfaceView videoSurfaceView)
Description copied from interface:IVLCVoutSet a surfaceView used for video out.- Specified by:
setVideoViewin interfaceIVLCVout- See Also:
IVLCVout.attachViews()
-
setVideoView
@MainThread public void setVideoView(TextureView videoTextureView)
Description copied from interface:IVLCVoutSet a TextureView used for video out.- Specified by:
setVideoViewin interfaceIVLCVout- See Also:
IVLCVout.attachViews()
-
setVideoSurface
public void setVideoSurface(Surface videoSurface, SurfaceHolder surfaceHolder)
Description copied from interface:IVLCVoutSet a surface used for video out.- Specified by:
setVideoSurfacein interfaceIVLCVout- Parameters:
videoSurface- if surfaceHolder is null, this surface must be valid and attached.surfaceHolder- optional, used to configure buffers geometry before Android ICS and to get notified when surface is destroyed.- See Also:
IVLCVout.attachViews()
-
setVideoSurface
public void setVideoSurface(SurfaceTexture videoSurfaceTexture)
Description copied from interface:IVLCVoutSet a SurfaceTexture used for video out.- Specified by:
setVideoSurfacein interfaceIVLCVout- Parameters:
videoSurfaceTexture- this surface must be valid and attached.- See Also:
IVLCVout.attachViews()
-
setSubtitlesView
@MainThread public void setSubtitlesView(SurfaceView subtitlesSurfaceView)
Description copied from interface:IVLCVoutSet a surfaceView used for subtitles out.- Specified by:
setSubtitlesViewin interfaceIVLCVout- See Also:
IVLCVout.attachViews()
-
setSubtitlesView
@MainThread public void setSubtitlesView(TextureView subtitlesTextureView)
Description copied from interface:IVLCVoutSet a TextureView used for subtitles out.- Specified by:
setSubtitlesViewin interfaceIVLCVout- See Also:
IVLCVout.attachViews()
-
setSubtitlesSurface
public void setSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder)
Description copied from interface:IVLCVoutSet a surface used for subtitles out.- Specified by:
setSubtitlesSurfacein interfaceIVLCVout- Parameters:
subtitlesSurface- if surfaceHolder is null, this surface must be valid and attached.surfaceHolder- optional, used to configure buffers geometry before Android ICS and to get notified when surface is destroyed.- See Also:
IVLCVout.attachViews()
-
setSubtitlesSurface
public void setSubtitlesSurface(SurfaceTexture subtitlesSurfaceTexture)
Description copied from interface:IVLCVoutSet a SurfaceTexture used for subtitles out.- Specified by:
setSubtitlesSurfacein interfaceIVLCVout- Parameters:
subtitlesSurfaceTexture- this surface must be valid and attached.- See Also:
IVLCVout.attachViews()
-
attachViews
@MainThread public void attachViews(IVLCVout.OnNewVideoLayoutListener onNewVideoLayoutListener)
Description copied from interface:IVLCVoutAttach views with an OnNewVideoLayoutListener This 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 is needed by the "android-display" "vout display" module. Even if that case, the OpenGL ES2 could still be used. If onNewVideoLayoutListener is null, the caller won't handle the video layout that is needed by the "android-display" "vout display" module. Therefore, only the OpenGL ES2 "vout display" module will be used (for hardware and software decoding).- Specified by:
attachViewsin interfaceIVLCVout- See Also:
IVLCVout.OnNewVideoLayoutListener,IVLCVout.setVideoView(SurfaceView),IVLCVout.setVideoView(TextureView),IVLCVout.setVideoSurface(Surface, SurfaceHolder),IVLCVout.setSubtitlesView(SurfaceView),IVLCVout.setSubtitlesView(TextureView),IVLCVout.setSubtitlesSurface(Surface, SurfaceHolder)
-
attachViews
@MainThread public void attachViews()
Description copied from interface:IVLCVoutAttach views without an OnNewVideoLayoutListener- Specified by:
attachViewsin interfaceIVLCVout- See Also:
IVLCVout.attachViews(OnNewVideoLayoutListener)
-
detachViews
@MainThread public void detachViews()
Description copied from interface:IVLCVoutDetach views previously attached. This will be called automatically when surfaces are destroyed.- Specified by:
detachViewsin interfaceIVLCVout
-
areViewsAttached
@MainThread public boolean areViewsAttached()
Description copied from interface:IVLCVoutReturn true if views are attached. If surfaces were destroyed, this will return false.- Specified by:
areViewsAttachedin interfaceIVLCVout
-
sendMouseEvent
public void sendMouseEvent(int action, int button, int x, int y)Description copied from interface:IVLCVoutSend a mouse event to the native vout.- Specified by:
sendMouseEventin interfaceIVLCVout- Parameters:
action- see ACTION_* inMotionEvent.button- see BUTTON_* inMotionEvent.x- x coordinate.y- y coordinate.
-
setWindowSize
public void setWindowSize(int width, int height)Description copied from interface:IVLCVoutSend the the window size to the native vout.- Specified by:
setWindowSizein interfaceIVLCVout- Parameters:
width- width of the window.height- height of the window.
-
addCallback
public void addCallback(IVLCVout.Callback callback)
Description copied from interface:IVLCVoutAdd a callback to receiveIVLCVout.Callback.onSurfacesCreated(org.videolan.libvlc.interfaces.IVLCVout)andIVLCVout.Callback.onSurfacesDestroyed(IVLCVout)events.- Specified by:
addCallbackin interfaceIVLCVout
-
removeCallback
public void removeCallback(IVLCVout.Callback callback)
Description copied from interface:IVLCVoutRemove a callback.- Specified by:
removeCallbackin interfaceIVLCVout
-
-