Class ComponentVideoSurface


  • public class ComponentVideoSurface
    extends VideoSurface
    Encapsulation of a video surface that uses an AWT Component (optimally a Canvas, or maybe a Window).
    • Constructor Detail

      • ComponentVideoSurface

        public ComponentVideoSurface​(Component component,
                                     VideoSurfaceAdapter videoSurfaceAdapter)
        Create a new video surface.
        Parameters:
        component - video surface component
        videoSurfaceAdapter - 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 class VideoSurface
        Parameters:
        mediaPlayer - media player instance