String message = new String(bytes);
if(message.length() > 0) {
// Get the information about the object that emitted the log statement
PointerByReference modulePointer = new PointerByReference();
PointerByReference filePointer = new PointerByReference();
IntByReference linePointer = new IntByReference();
libvlc.libvlc_log_get_context(ctx, modulePointer, filePointer, linePointer);
PointerByReference namePointer = new PointerByReference();
PointerByReference headerPointer = new PointerByReference();
IntByReference idPointer = new IntByReference();
libvlc.libvlc_log_get_object(ctx, namePointer, headerPointer, idPointer);
String module = getString(modulePointer);
String file = getString(filePointer);
Integer line = linePointer.getValue();
String name = getString(namePointer);
String header = getString(headerPointer);
Integer id = idPointer.getValue();
// ...send the event
raiseLogEvent(libvlc_log_level_e.level(level), module, file, line, name, header, id, message);
}
}
else {