* @param listener The listener to be called when an {@link Element} emits a an informational message.
*/
public void connect(final INFO listener) {
connect(INFO.class, listener, new BusCallback() {
public boolean callback(Bus bus, Message msg, Pointer user_data) {
PointerByReference err = new PointerByReference();
gst.gst_message_parse_info(msg, err, null);
GErrorStruct error = new GErrorStruct(err.getValue());
listener.infoMessage(msg.getSource(), error.getCode(), error.getMessage());
GLIB_API.g_error_free(err.getValue());
return true;
}
});
}