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_cbgetClose()Get the native close media callback.final com.sun.jna.PointerGet the native opaque handle.final uk.co.caprica.vlcj.binding.internal.libvlc_media_open_cbgetOpen()Get the native open media callback.final uk.co.caprica.vlcj.binding.internal.libvlc_media_read_cbgetRead()Get the native read media callback.final uk.co.caprica.vlcj.binding.internal.libvlc_media_seek_cbgetSeek()Get the native seek media callback.final booleanIs the media seekable?
-
Constructor Details
-
AbstractCallbackMedia
public AbstractCallbackMedia(boolean seekable) Create a new media instance.- Parameters:
seekable-trueif the media is seekable;falseif it is not
-
-
Method Details
-
isSeekable
public final boolean isSeekable()Is the media seekable?- Returns:
trueif the media is seekable;falseif it is not
-
getOpen
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_open_cb getOpen()Description copied from interface:CallbackMediaGet the native open media callback.- Specified by:
getOpenin interfaceCallbackMedia- Returns:
- open callback
-
getRead
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_read_cb getRead()Description copied from interface:CallbackMediaGet the native read media callback.- Specified by:
getReadin interfaceCallbackMedia- Returns:
- read callback
-
getSeek
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_seek_cb getSeek()Description copied from interface:CallbackMediaGet the native seek media callback.- Specified by:
getSeekin interfaceCallbackMedia- Returns:
- seek callback
-
getClose
public final uk.co.caprica.vlcj.binding.internal.libvlc_media_close_cb getClose()Description copied from interface:CallbackMediaGet the native close media callback.- Specified by:
getClosein interfaceCallbackMedia- Returns:
- close callback
-
getOpaque
public final com.sun.jna.Pointer getOpaque()Description copied from interface:CallbackMediaGet the native opaque handle.- Specified by:
getOpaquein interfaceCallbackMedia- Returns:
- opaque handle
-