[trunk] WIP: update jp2 dump functions with the new V2 framework

This commit is contained in:
Mickael Savinaud
2011-10-07 17:31:35 +00:00
parent cc0ff6b0bf
commit efd780f82a
5 changed files with 61 additions and 4 deletions

View File

@@ -109,7 +109,7 @@ typedef struct opj_codec_private
opj_event_mgr_t* m_event_mgr;
/** Flag to indicate if the codec is used to decode or encode*/
opj_bool is_decompressor;
opj_bool (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream);
void (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream);
opj_codestream_info_v2_t* (*opj_get_codec_info)(void* p_codec);
opj_codestream_index_t* (*opj_get_codec_index)(void* p_codec);
}
@@ -229,7 +229,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress_v2(OPJ_CODEC_FORMAT p_format)
switch (p_format) {
case CODEC_J2K:
l_info->opj_dump_codec = (opj_bool (*) (void*, OPJ_INT32, FILE*)) j2k_dump;
l_info->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) j2k_dump;
l_info->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) j2k_get_cstr_info;
@@ -285,6 +285,12 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress_v2(OPJ_CODEC_FORMAT p_format)
case CODEC_JP2:
/* get a JP2 decoder handle */
l_info->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) jp2_dump;
l_info->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) jp2_get_cstr_info;
l_info->opj_get_codec_index = (opj_codestream_index_t* (*) (void*) ) jp2_get_cstr_index;
l_info->m_codec_data.m_decompression.opj_decode =
(opj_bool (*) ( void *,
struct opj_stream_private *,