*/
private void registerMediaEventListener() {
Logger.debug("registerMediaEventListener()");
// If there is a media, register a new listener...
if(mediaInstance != null) {
libvlc_event_manager_t mediaEventManager = libvlc.libvlc_media_event_manager(mediaInstance);
for(libvlc_event_e event : libvlc_event_e.values()) {
if(event.intValue() >= libvlc_event_e.libvlc_MediaMetaChanged.intValue() && event.intValue() <= libvlc_event_e.libvlc_MediaStateChanged.intValue()) {
Logger.debug("event={}", event);
int result = libvlc.libvlc_event_attach(mediaEventManager, event.intValue(), callback, null);
Logger.debug("result={}", result);