Module uk.co.caprica.vlcj
Interface RenderCallback
- All Known Implementing Classes:
RenderCallbackAdapter
public interface RenderCallback
Specification for a component that wishes to be called back to process video frames.
The render call-back provides access to the native memory buffer, if instead the full RGB integer data is required
for the full video frame then consider using RenderCallbackAdapter
.
The render call-back is invoked by a native thread.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
display
(MediaPlayer mediaPlayer, ByteBuffer[] nativeBuffers, BufferFormat bufferFormat, int displayWidth, int displayHeight) Call-back when ready to display a video frame.void
lock
(MediaPlayer mediaPlayer) Lock the video buffer prior to receiving a new frame.void
unlock
(MediaPlayer mediaPlayer) Unlock the video buffer after receiving a frame.
-
Method Details
-
lock
Lock the video buffer prior to receiving a new frame.Implementations of this method must execute as quickly as possible.
- Parameters:
mediaPlayer
- media player to which the event relates
-
display
void display(MediaPlayer mediaPlayer, ByteBuffer[] nativeBuffers, BufferFormat bufferFormat, int displayWidth, int displayHeight) Call-back when ready to display a video frame.Implementations of this method must execute as quickly as possible.
- Parameters:
mediaPlayer
- media player to which the event relatesnativeBuffers
- video data for one framebufferFormat
- information about the format of the buffer useddisplayWidth
- pixel width of the video, may be different from buffer widthdisplayHeight
- pixel height of the video, may be different from buffer height
-
unlock
Unlock the video buffer after receiving a frame.Implementations of this method must execute as quickly as possible.
- Parameters:
mediaPlayer
- media player to which the event relates
-