Module uk.co.caprica.vlcj
Class MediaPlayerSpecs.CallbackMediaPlayerSpec
java.lang.Object
uk.co.caprica.vlcj.player.component.MediaPlayerSpecs.CallbackMediaPlayerSpec
-
Method Summary
Modifier and TypeMethodDescriptionCreate a callback media list player component from this builder.Create a callback media player component from this builder.withBufferFormatCallback
(BufferFormatCallback bufferFormatCallback) Specify the buffer format callback to use.withDefaultFullScreenStrategy
(Window fullScreenWindow) Specify to use the default full-screen strategy.withFactory
(MediaPlayerFactory factory) Specify the media player factory to use.withFullScreenStrategy
(FullScreenStrategy fullScreenStrategy) Specify the full-screen strategy to use.withImagePainter
(CallbackImagePainter imagePainter) Specify the image painter (video renderer) to use.withInputEvents
(InputEvents inputEvents) Specify keyboard/mouse input-event configuration.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).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).withRenderCallback
(RenderCallback renderCallback) Specify the render callback to use.Specify to use the do-nothing unsupported full-screen strategy.withVideoSurfaceComponent
(JComponent videoSurfaceComponent) Specify the lightweight video surface component to use.
-
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
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
Specify keyboard/mouse input-event configuration.- Parameters:
inputEvents
- keyboard/mouse configuration- Returns:
- this builder
-
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.
- Parameters:
lockedBuffers
-true
if the buffers should be locked;false
if they should not- Returns:
- this builder
-
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
Specify the image painter (video renderer) to use.- Parameters:
imagePainter
- image painter- Returns:
- this builder
-
withRenderCallback
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
Create a callback media player component from this builder.- Returns:
- callback media player component
-
callbackMediaListPlayer
Create a callback media list player component from this builder.- Returns:
- callback media list player component
-