Class ComponentIdVideoSurface
- java.lang.Object
-
- uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurface
-
- uk.co.caprica.vlcj.player.embedded.videosurface.ComponentIdVideoSurface
-
public class ComponentIdVideoSurface extends VideoSurface
Encapsulation of a video surface that wraps the native component id of the video surface component.This is required for example when using remote out-of-process media players but with video rendering in a local application. In these scenarios, it is not possible to serialize the Canvas component to the remote process to get the proper component ID (the copied Canvas component would have a different native ID).
It is also not possible to get a native component ID if the component is not displayable.
-
-
Constructor Summary
Constructors Constructor Description ComponentIdVideoSurface(long componentId, 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.
-
-
-
Constructor Detail
-
ComponentIdVideoSurface
public ComponentIdVideoSurface(long componentId, VideoSurfaceAdapter videoSurfaceAdapter)
Create a new video surface.- Parameters:
componentId
- native component identifier for the video surfacevideoSurfaceAdapter
- adapter to attach a video surface to a native media player
-
-
Method Detail
-
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
-
-