Class CallbackVideoSurface


  • public class CallbackVideoSurface
    extends VideoSurface
    Implementation of a video surface that uses native callbacks to receive video frame data for rendering.
    • Constructor Detail

      • CallbackVideoSurface

        public CallbackVideoSurface​(BufferFormatCallback bufferFormatCallback,
                                    RenderCallback renderCallback,
                                    boolean lockBuffers,
                                    VideoSurfaceAdapter videoSurfaceAdapter)
        Create a video surface.
        Parameters:
        bufferFormatCallback - callback providing the video buffer format
        renderCallback - callback used to render the video frame buffer
        lockBuffers - true if the video buffer should be locked; false if not
        videoSurfaceAdapter - 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 class VideoSurface
        Parameters:
        mediaPlayer - media player instance