public abstract class AbstractCallbackMedia extends AbstractMedia implements CallbackMedia
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 and Description |
|---|
AbstractCallbackMedia(boolean seekable,
String... mediaOptions)
Create a new media instance.
|
| Modifier and Type | Method and Description |
|---|---|
libvlc_media_close_cb |
getClose()
Get the native close media callback.
|
com.sun.jna.Pointer |
getOpaque()
Get the native opaque handle.
|
libvlc_media_open_cb |
getOpen()
Get the native open media callback.
|
libvlc_media_read_cb |
getRead()
Get the native read media callback.
|
libvlc_media_seek_cb |
getSeek()
Get the native seek media callback.
|
boolean |
isSeekable()
Is the media seekable?
|
mediaOptionspublic AbstractCallbackMedia(boolean seekable,
String... mediaOptions)
seekable - true if the media is seekable; false if it is notmediaOptions - zero or media optionspublic final boolean isSeekable()
true if the media is seekable; false if it is notpublic final libvlc_media_open_cb getOpen()
CallbackMediagetOpen in interface CallbackMediapublic final libvlc_media_read_cb getRead()
CallbackMediagetRead in interface CallbackMediapublic final libvlc_media_seek_cb getSeek()
CallbackMediagetSeek in interface CallbackMediapublic final libvlc_media_close_cb getClose()
CallbackMediagetClose in interface CallbackMediapublic final com.sun.jna.Pointer getOpaque()
CallbackMediagetOpaque in interface CallbackMediaCopyright © 2009–2015 Caprica Software Limited. All rights reserved.