Class ComponentVideoSurface
- java.lang.Object
-
- uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurface
-
- uk.co.caprica.vlcj.player.embedded.videosurface.ComponentVideoSurface
-
public class ComponentVideoSurface extends VideoSurface
Encapsulation of a video surface that uses an AWT Component (optimally a Canvas, or maybe a Window).
-
-
Constructor Summary
Constructors Constructor Description ComponentVideoSurface(Component component, VideoSurfaceAdapter videoSurfaceAdapter)
Create a new video surface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach(MediaPlayer mediaPlayer)
Attach the video surface to a media player.Component
component()
Get the canvas.
-
-
-
Constructor Detail
-
ComponentVideoSurface
public ComponentVideoSurface(Component component, VideoSurfaceAdapter videoSurfaceAdapter)
Create a new video surface.- Parameters:
component
- video surface componentvideoSurfaceAdapter
- adapter to attach a video surface to a native media player
-
-
Method Detail
-
component
public final Component component()
Get the canvas.- Returns:
- canvas
-
attach
public void attach(MediaPlayer mediaPlayer)
Description copied from class:VideoSurface
Attach the video surface to a media player.The video surface component must be visible at this point otherwise the native call will fail.
- Specified by:
attach
in classVideoSurface
- Parameters:
mediaPlayer
- media player instance
-
-