Class CallbackMediaPlayerComponent

    • Constructor Detail

      • CallbackMediaPlayerComponent

        public CallbackMediaPlayerComponent​(MediaPlayerFactory mediaPlayerFactory,
                                            FullScreenStrategy fullScreenStrategy,
                                            InputEvents inputEvents,
                                            boolean lockBuffers,
                                            CallbackImagePainter imagePainter,
                                            RenderCallback renderCallback,
                                            BufferFormatCallback bufferFormatCallback,
                                            JComponent videoSurfaceComponent)
        Construct a callback media player component.

        This component will provide a reasonable default implementation, but a client application is free to override these defaults with their own implementation.

        To rely on the defaults and have this component render the video, do not supply a renderCallback.

        If a client application wishes to perform its own rendering, provide a renderCallback, a BufferFormatCallback, and optionally (but likely) a videoSurfaceComponent if the client application wants the video surface they are rendering in to be incorporated into this component's layout.

        Parameters:
        mediaPlayerFactory - media player factory
        fullScreenStrategy - full screen strategy
        inputEvents - keyboard/mouse input event configuration
        lockBuffers - true if the native video buffer should be locked; false if not
        imagePainter - image painter (video renderer)
        renderCallback - render callback
        bufferFormatCallback - buffer format callback
        videoSurfaceComponent - lightweight video surface component
      • CallbackMediaPlayerComponent

        public CallbackMediaPlayerComponent​(MediaPlayerFactory mediaPlayerFactory,
                                            FullScreenStrategy fullScreenStrategy,
                                            InputEvents inputEvents,
                                            boolean lockBuffers,
                                            CallbackImagePainter imagePainter)
        Construct a callback media list player component for intrinsic rendering (by this component).
        Parameters:
        mediaPlayerFactory - media player factory
        fullScreenStrategy - full screen strategy
        inputEvents - keyboard/mouse input event configuration
        lockBuffers - true if the native video buffer should be locked; false if not
        imagePainter - image painter (video renderer)
      • CallbackMediaPlayerComponent

        public CallbackMediaPlayerComponent​(MediaPlayerFactory mediaPlayerFactory,
                                            FullScreenStrategy fullScreenStrategy,
                                            InputEvents inputEvents,
                                            boolean lockBuffers,
                                            RenderCallback renderCallback,
                                            BufferFormatCallback bufferFormatCallback,
                                            JComponent videoSurfaceComponent)
        Construct a callback media list player component for external rendering (by the client application).
        Parameters:
        mediaPlayerFactory - media player factory
        fullScreenStrategy - full screen strategy
        inputEvents - keyboard/mouse input event configuration
        lockBuffers - true if the native video buffer should be locked; false if not
        renderCallback - render callback
        bufferFormatCallback - buffer format callback
        videoSurfaceComponent - lightweight video surface component
      • CallbackMediaPlayerComponent

        public CallbackMediaPlayerComponent​(MediaPlayerSpecs.CallbackMediaPlayerSpec spec)
        Create a callback media player component from a builder.
        Parameters:
        spec - builder
      • CallbackMediaPlayerComponent

        public CallbackMediaPlayerComponent​(String... libvlcArgs)
        Create a callback media player component with LibVLC initialisation arguments and reasonable defaults.
        Parameters:
        libvlcArgs - LibVLC initialisation arguments
      • CallbackMediaPlayerComponent

        public CallbackMediaPlayerComponent()
        Create a callback media player component with reasonable defaults.