Class MediaPlayerSpecs.CallbackMediaPlayerSpec

java.lang.Object
uk.co.caprica.vlcj.player.component.MediaPlayerSpecs.CallbackMediaPlayerSpec
Enclosing class:
MediaPlayerSpecs

public static final class MediaPlayerSpecs.CallbackMediaPlayerSpec extends Object
Builder for a callback media or callback media list player.
  • Method Details

    • withFactory

      Specify the media player factory to use.
      Parameters:
      factory - media player factory
      Returns:
      this builder
    • withFullScreenStrategy

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withFullScreenStrategy(FullScreenStrategy fullScreenStrategy)
      Specify the full-screen strategy to use.

      By default if no strategy is set there will be no support for full-screen mode.

      Parameters:
      fullScreenStrategy - full-screen strategy
      Returns:
      this builder
    • withDefaultFullScreenStrategy

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withDefaultFullScreenStrategy(Window fullScreenWindow)
      Specify to use the default full-screen strategy.

      The default strategy will use the "best" available native strategy depending on the run-time operating system.

      Parameters:
      fullScreenWindow - window that will be made full-screen (the window containing the video surface)
      Returns:
      this builder
    • withUnsupportedFullScreenStrategy

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withUnsupportedFullScreenStrategy()
      Specify to use the do-nothing unsupported full-screen strategy.

      This is not really necessary as the default situation is to have no full-screen strategy.

      Returns:
      this builder
    • withInputEvents

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withInputEvents(InputEvents inputEvents)
      Specify keyboard/mouse input-event configuration.
      Parameters:
      inputEvents - keyboard/mouse configuration
      Returns:
      this builder
    • withLockedBuffers

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withLockedBuffers(boolean lockedBuffers)
      Specify whether or not the native video frame buffer should use operating system primitives to "lock" the native memory (the aim is to prevent the native memory from being swapped to disk).

      Buffers are locked by default.

      Parameters:
      lockedBuffers - true if the buffers should be locked; false if they should not
      Returns:
      this builder
    • withLockedBuffers

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withLockedBuffers()
      Specify whether or not the native video frame buffer should use operating system primitives to "lock" the native memory (the aim is to prevent the native memory from being swapped to disk).

      Buffers are locked by default.

      This method is unnecessary at the moment but is supplied in case the default changes to false in the future.

      Returns:
      this builder
    • withImagePainter

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withImagePainter(CallbackImagePainter imagePainter)
      Specify the image painter (video renderer) to use.
      Parameters:
      imagePainter - image painter
      Returns:
      this builder
    • withRenderCallback

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withRenderCallback(RenderCallback renderCallback)
      Specify the render callback to use.

      A render callback is used where the application intends to take care of rendering the video itself.

      Parameters:
      renderCallback - render callback
      Returns:
      this builder
    • withBufferFormatCallback

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withBufferFormatCallback(BufferFormatCallback bufferFormatCallback)
      Specify the buffer format callback to use.

      A buffer format callback is used where the application intends to take care of rendering the video itself.

      Parameters:
      bufferFormatCallback - buffer format callback
      Returns:
      this builder
    • withVideoSurfaceComponent

      public MediaPlayerSpecs.CallbackMediaPlayerSpec withVideoSurfaceComponent(JComponent videoSurfaceComponent)
      Specify the lightweight video surface component to use.
      Parameters:
      videoSurfaceComponent - video surface component
      Returns:
      this builder
    • callbackMediaPlayer

      public CallbackMediaPlayerComponent callbackMediaPlayer()
      Create a callback media player component from this builder.
      Returns:
      callback media player component
    • callbackMediaListPlayer

      public CallbackMediaListPlayerComponent callbackMediaListPlayer()
      Create a callback media list player component from this builder.
      Returns:
      callback media list player component