-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
AWindow.SurfaceCallback
-
Constructor Summary
Constructors Constructor Description 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 Summary
Modifier and Type Method Description void
setVideoView(SurfaceView videoSurfaceView)
Set a surfaceView used for video out. void
setVideoView(TextureView videoTextureView)
Set a TextureView used for video out. void
setVideoSurface(Surface videoSurface, SurfaceHolder surfaceHolder)
Set a surface used for video out. void
setVideoSurface(SurfaceTexture videoSurfaceTexture)
Set a SurfaceTexture used for video out. void
setSubtitlesView(SurfaceView subtitlesSurfaceView)
Set a surfaceView used for subtitles out. void
setSubtitlesView(TextureView subtitlesTextureView)
Set a TextureView used for subtitles out. void
setSubtitlesSurface(Surface subtitlesSurface, SurfaceHolder surfaceHolder)
Set a surface used for subtitles out. void
setSubtitlesSurface(SurfaceTexture subtitlesSurfaceTexture)
Set a SurfaceTexture used for subtitles out. 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. void
attachViews()
Attach views without an OnNewVideoLayoutListener void
detachViews()
Detach views previously attached.This will be called automatically when surfaces are destroyed. boolean
areViewsAttached()
Return true if views are attached. void
sendMouseEvent(int action, int button, int x, int y)
Send a mouse event to the native vout. void
setWindowSize(int width, int height)
Send the the window size to the native vout. void
addCallback(IVLCVout.Callback callback)
Add a callback to receive onSurfacesCreated and onSurfacesDestroyed events. void
removeCallback(IVLCVout.Callback callback)
Remove a callback. -
-
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
-
setVideoView
@MainThread() void setVideoView(SurfaceView videoSurfaceView)
Set a surfaceView used for video out.
-
setVideoView
@MainThread() void setVideoView(TextureView videoTextureView)
Set a TextureView used for video out.
-
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.
-
setSubtitlesView
@MainThread() void setSubtitlesView(SurfaceView subtitlesSurfaceView)
Set a surfaceView used for subtitles out.
-
setSubtitlesView
@MainThread() void setSubtitlesView(TextureView subtitlesTextureView)
Set a TextureView used for subtitles out.
-
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).
-
attachViews
@MainThread() void attachViews()
Attach views without an 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.
-
sendMouseEvent
void sendMouseEvent(int action, int button, int x, int y)
Send a mouse event to the native vout.
- Parameters:
action
- see ACTION_* in android.view.MotionEvent.button
- see BUTTON_* in android.view.MotionEvent.x
- x coordinate.y
- y coordinate.
-
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.
-
addCallback
void addCallback(IVLCVout.Callback callback)
Add a callback to receive onSurfacesCreated and onSurfacesDestroyed events.
-
removeCallback
void removeCallback(IVLCVout.Callback callback)
Remove a callback.
-
-
-
-