Package org.videolan.libvlc.interfaces
Interface IVLCVout
-
- All Known Implementing Classes:
AWindow
public interface IVLCVout
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IVLCVout.Callback
static interface
IVLCVout.OnNewVideoLayoutListener
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCallback(IVLCVout.Callback callback)
Add a callback to receiveIVLCVout.Callback.onSurfacesCreated(org.videolan.libvlc.interfaces.IVLCVout)
andIVLCVout.Callback.onSurfacesDestroyed(IVLCVout)
events.boolean
areViewsAttached()
Return true if views are attached.void
attachViews()
Attach views without an OnNewVideoLayoutListenervoid
attachViews(IVLCVout.OnNewVideoLayoutListener onNewVideoLayoutListener)
Attach views with an OnNewVideoLayoutListener This must be called afters views are set and before the MediaPlayer is first started.void
detachViews()
Detach views previously attached.void
removeCallback(IVLCVout.Callback callback)
Remove a callback.void
sendMouseEvent(int action, int button, int x, int y)
Send a mouse event to the native vout.void
setSubtitlesSurface(SurfaceTexture subtitlesSurfaceTexture)
Set a SurfaceTexture used for subtitles out.void
setSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder)
Set a surface used for subtitles out.void
setSubtitlesView(SurfaceView subtitlesSurfaceView)
Set a surfaceView used for subtitles out.void
setSubtitlesView(TextureView subtitlesTextureView)
Set a TextureView used for subtitles out.void
setVideoSurface(SurfaceTexture videoSurfaceTexture)
Set a SurfaceTexture used for video out.void
setVideoSurface(Surface videoSurface, SurfaceHolder surfaceHolder)
Set a surface used for video out.void
setVideoView(SurfaceView videoSurfaceView)
Set a surfaceView used for video out.void
setVideoView(TextureView videoTextureView)
Set a TextureView used for video out.void
setWindowSize(int width, int height)
Send the the window size to the native vout.
-
-
-
Method Detail
-
setVideoView
@MainThread void setVideoView(SurfaceView videoSurfaceView)
Set a surfaceView used for video out.- See Also:
attachViews()
-
setVideoView
@MainThread void setVideoView(TextureView videoTextureView)
Set a TextureView used for video out.- See Also:
attachViews()
-
setVideoSurface
@MainThread 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 ICS and to get notified when surface is destroyed.- See Also:
attachViews()
-
setVideoSurface
@MainThread void setVideoSurface(SurfaceTexture videoSurfaceTexture)
Set a SurfaceTexture used for video out.- Parameters:
videoSurfaceTexture
- this surface must be valid and attached.- See Also:
attachViews()
-
setSubtitlesView
@MainThread void setSubtitlesView(SurfaceView subtitlesSurfaceView)
Set a surfaceView used for subtitles out.- See Also:
attachViews()
-
setSubtitlesView
@MainThread void setSubtitlesView(TextureView subtitlesTextureView)
Set a TextureView used for subtitles out.- See Also:
attachViews()
-
setSubtitlesSurface
@MainThread 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 ICS and to get notified when surface is destroyed.- See Also:
attachViews()
-
setSubtitlesSurface
@MainThread void setSubtitlesSurface(SurfaceTexture subtitlesSurfaceTexture)
Set a SurfaceTexture used for subtitles out.- Parameters:
subtitlesSurfaceTexture
- this surface must be valid and attached.- See Also:
attachViews()
-
attachViews
@MainThread void attachViews(IVLCVout.OnNewVideoLayoutListener onNewVideoLayoutListener)
Attach 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).
-
attachViews
@MainThread void attachViews()
Attach views without an OnNewVideoLayoutListener- See Also:
attachViews(OnNewVideoLayoutListener)
-
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.
-
addCallback
@MainThread void addCallback(IVLCVout.Callback callback)
Add a callback to receiveIVLCVout.Callback.onSurfacesCreated(org.videolan.libvlc.interfaces.IVLCVout)
andIVLCVout.Callback.onSurfacesDestroyed(IVLCVout)
events.
-
removeCallback
@MainThread void removeCallback(IVLCVout.Callback callback)
Remove a callback.
-
sendMouseEvent
@MainThread void sendMouseEvent(int action, int button, int x, int y)
Send a mouse event to the native vout.- Parameters:
action
- see ACTION_* inMotionEvent
.button
- see BUTTON_* inMotionEvent
.x
- x coordinate.y
- y coordinate.
-
setWindowSize
@MainThread 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.
-
-