event.h File Reference

Implementation of a event callback system. More...

Go to the source code of this file.

## Data Structures

struct | opj_event_mgr
| Message handler object used for. More...

## Macros

#define | EVT_ERROR 1
| Error event type.
#define | EVT_WARNING 2
| Warning event type.
#define | EVT_INFO 4
| Debug event type.

## Typedefs

typedef struct opj_event_mgr | opj_event_mgr_t
| Message handler object used for.

## Functions

Exported functions (see also openjpeg.h)
OPJ_BOOL | opj_event_msg (opj_event_mgr_t *event_mgr, OPJ_INT32 event_type, const char *fmt,...)
| Write formatted data to a string and send the string to a user callback.
void | opj_set_default_event_handler (opj_event_mgr_t *p_manager)
| Set the event manager with the default callback function for the 3 levels.

## Detailed Description

Implementation of a event callback system.

The functions in EVENT.C have for goal to send output messages (errors, warnings, debug) to the user.

## Macro Definition Documentation

## EVT_ERROR

#define EVT_ERROR 1

Error event type.

## EVT_INFO

#define EVT_INFO 4

Debug event type.

## EVT_WARNING

#define EVT_WARNING 2

Warning event type.

## Typedef Documentation

## opj_event_mgr_t

typedef struct opj_event_mgr opj_event_mgr_t

Message handler object used for.

- Error messages
- Warning messages
- Debugging messages

## Function Documentation

## opj_event_msg()

OPJ_BOOL opj_event_msg | ( | opj_event_mgr_t * | event_mgr,
|  | OPJ_INT32 | event_type,
|  | const char * | fmt,
|  |  | ...
| ) |  |

Write formatted data to a string and send the string to a user callback.

Parameters

  event_mgr | Event handler
  event_type | Event type or callback to use to send the message
  fmt | Format-control string (plus optional arguments)

Returns
  Returns true if successful, returns false otherwise

References opj_event_mgr::error_handler, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_event_mgr::info_handler, opj_event_mgr::m_error_data, opj_event_mgr::m_info_data, opj_event_mgr::m_warning_data, OPJ_FALSE, OPJ_MSG_SIZE, OPJ_TRUE, and opj_event_mgr::warning_handler.

Referenced by opj_decoder_set_strict_mode(), opj_j2k_are_all_used_components_decoded(), opj_j2k_build_tp_index_from_tlm(), opj_j2k_check_poc_val(), opj_j2k_copy_default_tcp_and_create_tcd(), opj_j2k_create_tcd(), opj_j2k_decode_one_tile(), opj_j2k_decode_tile(), opj_j2k_decode_tiles(), opj_j2k_encode(), opj_j2k_encoder_set_extra_options(), opj_j2k_encoding_validation(), opj_j2k_get_sot_values(), opj_j2k_get_tile(), opj_j2k_is_cinema_compliant(), opj_j2k_is_imf_compliant(), opj_j2k_merge_ppm(), opj_j2k_merge_ppt(), opj_j2k_need_nb_tile_parts_correction(), opj_j2k_pre_write_tile(), opj_j2k_read_cbd(), opj_j2k_read_coc(), opj_j2k_read_cod(), opj_j2k_read_crg(), opj_j2k_read_header_procedure(), opj_j2k_read_mcc(), opj_j2k_read_mco(), opj_j2k_read_mct(), opj_j2k_read_plm(), opj_j2k_read_plt(), opj_j2k_read_poc(), opj_j2k_read_ppm(), opj_j2k_read_ppt(), opj_j2k_read_qcc(), opj_j2k_read_qcd(), opj_j2k_read_rgn(), opj_j2k_read_siz(), opj_j2k_read_soc(), opj_j2k_read_sod(), opj_j2k_read_sot(), opj_j2k_read_SPCod_SPCoc(), opj_j2k_read_SQcd_SQcc(), opj_j2k_read_tile_header(), opj_j2k_read_tlm(), opj_j2k_read_unk(), opj_j2k_set_cinema_parameters(), opj_j2k_set_decode_area(), opj_j2k_set_decoded_components(), opj_j2k_set_decoded_resolution_factor(), opj_j2k_setup_encoder(), opj_j2k_start_compress(), opj_j2k_update_image_dimensions(), opj_j2k_update_rates(), opj_j2k_write_cbd(), opj_j2k_write_coc(), opj_j2k_write_cod(), opj_j2k_write_com(), opj_j2k_write_mcc_record(), opj_j2k_write_mco(), opj_j2k_write_mct_record(), opj_j2k_write_plt_in_memory(), opj_j2k_write_poc(), opj_j2k_write_qcc(), opj_j2k_write_qcd(), opj_j2k_write_siz(), opj_j2k_write_sod(), opj_j2k_write_sot(), opj_j2k_write_SPCod_SPCoc(), opj_j2k_write_SQcd_SQcc(), opj_j2k_write_tile(), opj_j2k_write_tlm(), opj_jp2_apply_cdef(), opj_jp2_apply_pclr(), opj_jp2_check_color(), opj_jp2_decode(), opj_jp2_get_tile(), opj_jp2_read_boxhdr(), opj_jp2_read_boxhdr_char(), opj_jp2_read_bpcc(), opj_jp2_read_cdef(), opj_jp2_read_cmap(), opj_jp2_read_colr(), opj_jp2_read_ftyp(), opj_jp2_read_header(), opj_jp2_read_header_procedure(), opj_jp2_read_ihdr(), opj_jp2_read_jp(), opj_jp2_read_jp2h(), opj_jp2_read_pclr(), opj_jp2_setup_encoder(), opj_jp2_write_ftyp(), opj_jp2_write_jp2c(), opj_jp2_write_jp2h(), opj_pi_next_cprl(), opj_pi_next_lrcp(), opj_pi_next_pcrl(), opj_pi_next_rlcp(), opj_pi_next_rpcl(), opj_procedure_list_add_procedure(), opj_read_header(), opj_set_decoded_components(), opj_setup_decoder(), opj_stream_flush(), opj_stream_read_data(), opj_stream_read_skip(), opj_stream_write_skip(), opj_t1_clbl_decode_processor(), opj_t1_decode_cblk(), opj_t1_ht_decode_cblk(), opj_t2_encode_packet(), opj_t2_read_packet_data(), opj_t2_read_packet_header(), opj_t2_skip_packet_data(), opj_tcd_decode_tile(), opj_tcd_init_tile(), opj_tcd_mct_decode(), opj_tcd_rateallocate(), opj_tgt_create(), and opj_tgt_init().

## opj_set_default_event_handler()

void opj_set_default_event_handler | ( | opj_event_mgr_t * | p_manager | ) |

Set the event manager with the default callback function for the 3 levels.

References opj_event_mgr::error_handler, opj_event_mgr::info_handler, opj_event_mgr::m_error_data, opj_event_mgr::m_info_data, opj_event_mgr::m_warning_data, opj_default_callback(), and opj_event_mgr::warning_handler.

Referenced by opj_create_compress(), and opj_create_decompress().