java.lang.Object
uk.co.caprica.vlcj.media.callback.AbstractCallbackMedia
- All Implemented Interfaces:
CallbackMedia
- Direct Known Subclasses:
DefaultCallbackMedia
Base implementation of media that uses the native media callbacks.
This implementation mostly encapsulates the native callbacks using template methods, with the exception of the
onRead(Pointer, int)
method. This particular method is used to read data and populate the native buffer. The
reason this method exposes a native Pointer
is so sub-classes can access the native buffer as efficiently as
possible.
In most cases it is likely preferable to deal instead with a Java byte array buffer, for this purpose the
DefaultCallbackMedia
sub-class should be used instead of this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal uk.co.caprica.vlcj.binding.internal.libvlc_media_close_cb
getClose()
Get the native close media callback.final com.sun.jna.Pointer
Get the native opaque handle.final uk.co.caprica.vlcj.binding.internal.libvlc_media_open_cb
getOpen()
Get the native open media callback.final uk.co.caprica.vlcj.binding.internal.libvlc_media_read_cb
getRead()
Get the native read media callback.final uk.co.caprica.vlcj.binding.internal.libvlc_media_seek_cb
getSeek()
Get the native seek media callback.final boolean
Is the media seekable?
-
Constructor Details
-
AbstractCallbackMedia
public AbstractCallbackMedia(boolean seekable) Create a new media instance.- Parameters:
seekable
-true
if the media is seekable;false
if it is not
-
-
Method Details
-
isSeekable
public final boolean isSeekable()Is the media seekable?- Returns:
true
if the media is seekable;false
if it is not
-
getOpen
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_open_cb getOpen()Description copied from interface:CallbackMedia
Get the native open media callback.- Specified by:
getOpen
in interfaceCallbackMedia
- Returns:
- open callback
-
getRead
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_read_cb getRead()Description copied from interface:CallbackMedia
Get the native read media callback.- Specified by:
getRead
in interfaceCallbackMedia
- Returns:
- read callback
-
getSeek
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_seek_cb getSeek()Description copied from interface:CallbackMedia
Get the native seek media callback.- Specified by:
getSeek
in interfaceCallbackMedia
- Returns:
- seek callback
-
getClose
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_close_cb getClose()Description copied from interface:CallbackMedia
Get the native close media callback.- Specified by:
getClose
in interfaceCallbackMedia
- Returns:
- close callback
-
getOpaque
public final com.sun.jna.Pointer getOpaque()Description copied from interface:CallbackMedia
Get the native opaque handle.- Specified by:
getOpaque
in interfaceCallbackMedia
- Returns:
- opaque handle
-