Class AbstractCallbackMedia

java.lang.Object
uk.co.caprica.vlcj.media.callback.AbstractCallbackMedia
All Implemented Interfaces:
CallbackMedia
Direct Known Subclasses:
DefaultCallbackMedia

public abstract class AbstractCallbackMedia extends Object implements CallbackMedia
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.