[trunk] remove V1 style function opj_create_decompress

This commit is contained in:
Mickael Savinaud 2012-08-09 11:46:19 +00:00
parent 3de7e8358f
commit ef00fdf472
2 changed files with 5 additions and 42 deletions

View File

@ -131,7 +131,8 @@ typedef struct opj_compression
typedef struct opj_codec_private
{
/** FIXME DOC */
union {
union
{
opj_decompression_t m_decompression;
opj_compression_t m_compression;
} m_codec_data;
@ -286,39 +287,7 @@ const char* OPJ_CALLCONV opj_version(void) {
}
/* DEPRECATED */
opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format) {
opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_calloc(1, sizeof(opj_dinfo_t));
if(!dinfo) return NULL;
dinfo->is_decompressor = OPJ_TRUE;
switch(format) {
case CODEC_J2K:
case CODEC_JPT:
/* get a J2K decoder handle */
dinfo->j2k_handle = (void*)j2k_create_decompress((opj_common_ptr)dinfo);
if(!dinfo->j2k_handle) {
opj_free(dinfo);
return NULL;
}
break;
case CODEC_JP2:
/* get a JP2 decoder handle */
dinfo->jp2_handle = (void*)jp2_create_decompress((opj_common_ptr)dinfo);
if(!dinfo->jp2_handle) {
opj_free(dinfo);
return NULL;
}
break;
case CODEC_UNKNOWN:
default:
opj_free(dinfo);
return NULL;
}
dinfo->codec_format = format;
return dinfo;
}
opj_codec_t* OPJ_CALLCONV opj_create_decompress_v2(OPJ_CODEC_FORMAT p_format)
{

View File

@ -1191,12 +1191,6 @@ DEPRECATED( OPJ_API opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_p
==========================================================
*/
/**
Creates a J2K/JPT/JP2 decompression structure
@param format Decoder to select
@return Returns a handle to a decompressor if successful, returns NULL otherwise
*/
DEPRECATED( OPJ_API opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format) );
/**
* Creates a J2K/JP2 decompression structure
@ -1204,7 +1198,7 @@ DEPRECATED( OPJ_API opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FO
*
* @return Returns a handle to a decompressor if successful, returns NULL otherwise
* */
OPJ_API opj_codec_t* OPJ_CALLCONV opj_create_decompress_v2(OPJ_CODEC_FORMAT format);
OPJ_API opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format);
/**
Destroy a decompressor handle