[trunk] Since r2060 (and r2059) openjpip is now a first class shared library, instead of a local static lib which expose all the symbols.
As such re-apply changes from r2077 which were removed in r2122 Also remove old code for now removed opj_jpip_compress
This commit is contained in:
parent
f3d7d2f7b1
commit
23a624f73a
|
@ -48,22 +48,7 @@ set(EXES
|
|||
opj_jpip_test
|
||||
)
|
||||
foreach(exe ${EXES})
|
||||
if(${exe} STREQUAL "opj_jpip_compress")
|
||||
include_directories(
|
||||
${Z_INCLUDE_DIRNAME}
|
||||
${PNG_INCLUDE_DIRNAME}
|
||||
${TIFF_INCLUDE_DIRNAME}
|
||||
)
|
||||
add_executable(${exe} ${exe}.c
|
||||
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c
|
||||
${OPENJPEG_SOURCE_DIR}/src/bin/jp2/convert.c
|
||||
)
|
||||
target_link_libraries(${exe}
|
||||
${PNG_LIBNAME} ${TIFF_LIBNAME} ${LCMS_LIBNAME} ${Z_LIBNAME}
|
||||
)
|
||||
else()
|
||||
add_executable(${exe} ${exe}.c)
|
||||
endif()
|
||||
target_link_libraries(${exe} openjpip)
|
||||
install(TARGETS ${exe}
|
||||
EXPORT OpenJPEGTargets
|
||||
|
|
|
@ -209,7 +209,7 @@ void local_log( bool query, bool messages, bool sessions, bool targets, QR_t *qr
|
|||
|
||||
#ifndef SERVER
|
||||
|
||||
dec_server_record_t * init_dec_server( int port)
|
||||
dec_server_record_t * OPJ_CALLCONV init_dec_server( int port)
|
||||
{
|
||||
dec_server_record_t *record = (dec_server_record_t *)opj_malloc( sizeof(dec_server_record_t));
|
||||
|
||||
|
@ -222,7 +222,7 @@ dec_server_record_t * init_dec_server( int port)
|
|||
return record;
|
||||
}
|
||||
|
||||
void terminate_dec_server( dec_server_record_t **rec)
|
||||
void OPJ_CALLCONV terminate_dec_server( dec_server_record_t **rec)
|
||||
{
|
||||
delete_cachelist( &(*rec)->cachelist);
|
||||
opj_free( (*rec)->jpipstream);
|
||||
|
@ -236,7 +236,7 @@ void terminate_dec_server( dec_server_record_t **rec)
|
|||
opj_free( *rec);
|
||||
}
|
||||
|
||||
client_t accept_connection( dec_server_record_t *rec)
|
||||
client_t OPJ_CALLCONV accept_connection( dec_server_record_t *rec)
|
||||
{
|
||||
client_t client;
|
||||
|
||||
|
@ -247,7 +247,7 @@ client_t accept_connection( dec_server_record_t *rec)
|
|||
return client;
|
||||
}
|
||||
|
||||
bool handle_clientreq( client_t client, dec_server_record_t *rec)
|
||||
bool OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec)
|
||||
{
|
||||
bool quit = false;
|
||||
msgtype_t msgtype = identify_clientmsg( client);
|
||||
|
@ -306,7 +306,7 @@ bool handle_clientreq( client_t client, dec_server_record_t *rec)
|
|||
}
|
||||
|
||||
|
||||
jpip_dec_param_t * init_jpipdecoder( bool jp2)
|
||||
jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( bool jp2)
|
||||
{
|
||||
jpip_dec_param_t *dec;
|
||||
|
||||
|
@ -321,7 +321,7 @@ jpip_dec_param_t * init_jpipdecoder( bool jp2)
|
|||
}
|
||||
|
||||
|
||||
bool fread_jpip( const char fname[], jpip_dec_param_t *dec)
|
||||
bool OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec)
|
||||
{
|
||||
int infd;
|
||||
|
||||
|
@ -346,7 +346,7 @@ bool fread_jpip( const char fname[], jpip_dec_param_t *dec)
|
|||
return true;
|
||||
}
|
||||
|
||||
void decode_jpip( jpip_dec_param_t *dec)
|
||||
void OPJ_CALLCONV decode_jpip( jpip_dec_param_t *dec)
|
||||
{
|
||||
parse_JPIPstream( dec->jpipstream, dec->jpiplen, 0, dec->msgqueue);
|
||||
|
||||
|
@ -361,7 +361,7 @@ void decode_jpip( jpip_dec_param_t *dec)
|
|||
dec->jp2kstream = recons_j2k( dec->msgqueue, dec->jpipstream, dec->msgqueue->first->csn, 0, 0, &dec->jp2klen);
|
||||
}
|
||||
|
||||
bool fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
|
||||
bool OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
|
||||
{
|
||||
int outfd;
|
||||
|
||||
|
@ -382,7 +382,7 @@ bool fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
|
|||
return true;
|
||||
}
|
||||
|
||||
void output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec)
|
||||
void OPJ_CALLCONV output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec)
|
||||
{
|
||||
if( messages)
|
||||
print_msgqueue( dec->msgqueue);
|
||||
|
@ -396,7 +396,7 @@ void output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *d
|
|||
}
|
||||
}
|
||||
|
||||
void destroy_jpipdecoder( jpip_dec_param_t **dec)
|
||||
void OPJ_CALLCONV destroy_jpipdecoder( jpip_dec_param_t **dec)
|
||||
{
|
||||
opj_free( (*dec)->jpipstream);
|
||||
delete_msgqueue( &(*dec)->msgqueue);
|
||||
|
@ -409,7 +409,7 @@ void destroy_jpipdecoder( jpip_dec_param_t **dec)
|
|||
opj_free( *dec);
|
||||
}
|
||||
|
||||
index_t * get_index_from_JP2file( int fd)
|
||||
index_t * OPJ_CALLCONV get_index_from_JP2file( int fd)
|
||||
{
|
||||
char *data;
|
||||
|
||||
|
@ -437,12 +437,12 @@ index_t * get_index_from_JP2file( int fd)
|
|||
return parse_jp2file( fd);
|
||||
}
|
||||
|
||||
void destroy_index( index_t **idx)
|
||||
void OPJ_CALLCONV destroy_index( index_t **idx)
|
||||
{
|
||||
delete_index( idx);
|
||||
}
|
||||
|
||||
void output_index( index_t *index)
|
||||
void OPJ_CALLCONV output_index( index_t *index)
|
||||
{
|
||||
print_index( *index);
|
||||
}
|
||||
|
|
|
@ -172,14 +172,14 @@ typedef SOCKET client_t;
|
|||
* @param[in] port opening tcp port (valid No. 49152-65535)
|
||||
* @return intialized decoding server record pointer
|
||||
*/
|
||||
dec_server_record_t * init_dec_server( int port);
|
||||
OPJ_API dec_server_record_t * OPJ_CALLCONV init_dec_server( int port);
|
||||
|
||||
/**
|
||||
* Terminate the image decoding server
|
||||
*
|
||||
* @param[in] rec address of deleting decoding server static record pointer
|
||||
*/
|
||||
void terminate_dec_server( dec_server_record_t **rec);
|
||||
OPJ_API void OPJ_CALLCONV terminate_dec_server( dec_server_record_t **rec);
|
||||
|
||||
/**
|
||||
* Accept client connection
|
||||
|
@ -187,7 +187,7 @@ void terminate_dec_server( dec_server_record_t **rec);
|
|||
* @param[in] rec decoding server static record pointer
|
||||
* @return client socket ID, -1 if failed
|
||||
*/
|
||||
client_t accept_connection( dec_server_record_t *rec);
|
||||
OPJ_API client_t OPJ_CALLCONV accept_connection( dec_server_record_t *rec);
|
||||
|
||||
/**
|
||||
* Handle client request
|
||||
|
@ -196,7 +196,7 @@ client_t accept_connection( dec_server_record_t *rec);
|
|||
* @param[in] rec decoding server static record pointer
|
||||
* @return true if succeed
|
||||
*/
|
||||
bool handle_clientreq( client_t client, dec_server_record_t *rec);
|
||||
OPJ_API bool OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec);
|
||||
|
||||
#endif /*SERVER*/
|
||||
|
||||
|
@ -229,14 +229,14 @@ typedef struct jpip_dec_param{
|
|||
* @param[in] jp2 true in case of jp2 file encoding, else j2k file encoding
|
||||
* @return JPIP decoding parameters pointer
|
||||
*/
|
||||
jpip_dec_param_t * init_jpipdecoder( bool jp2);
|
||||
OPJ_API jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( bool jp2);
|
||||
|
||||
/**
|
||||
* Destroy jpip decoding parameters
|
||||
*
|
||||
* @param[in] dec address of JPIP decoding parameters pointer
|
||||
*/
|
||||
void destroy_jpipdecoder( jpip_dec_param_t **dec);
|
||||
OPJ_API void OPJ_CALLCONV destroy_jpipdecoder( jpip_dec_param_t **dec);
|
||||
|
||||
/**
|
||||
* Read jpip codestream from a file
|
||||
|
@ -245,14 +245,14 @@ void destroy_jpipdecoder( jpip_dec_param_t **dec);
|
|||
* @param[in] dec JPIP decoding parameters pointer
|
||||
* @return true if succeed
|
||||
*/
|
||||
bool fread_jpip( const char fname[], jpip_dec_param_t *dec);
|
||||
OPJ_API bool OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec);
|
||||
|
||||
/**
|
||||
* Decode jpip codestream
|
||||
*
|
||||
* @param[in] dec JPIP decoding parameters pointer
|
||||
*/
|
||||
void decode_jpip( jpip_dec_param_t *dec);
|
||||
OPJ_API void OPJ_CALLCONV decode_jpip( jpip_dec_param_t *dec);
|
||||
|
||||
/**
|
||||
* Write J2K/JP2 codestream to a file
|
||||
|
@ -261,7 +261,7 @@ void decode_jpip( jpip_dec_param_t *dec);
|
|||
* @param[in] dec JPIP decoding parameters pointer
|
||||
* @return true if succeed
|
||||
*/
|
||||
bool fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
|
||||
OPJ_API bool OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
|
||||
|
||||
/**
|
||||
* Option; print out parameter values to stderr
|
||||
|
@ -271,7 +271,7 @@ bool fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
|
|||
* @param[in] ihdrbox true if image header data is to be printed out
|
||||
* @param[in] dec JPIP decoding parameters pointer
|
||||
*/
|
||||
void output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec);
|
||||
OPJ_API void OPJ_CALLCONV output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec);
|
||||
|
||||
/*
|
||||
* test the format of index (cidx) box in JP2 file
|
||||
|
@ -286,14 +286,14 @@ typedef index_param_t index_t;
|
|||
* @param[in] fd file descriptor of the JP2 file
|
||||
* @return pointer to the generated structure of index parameters
|
||||
*/
|
||||
index_t * get_index_from_JP2file( int fd);
|
||||
OPJ_API index_t * OPJ_CALLCONV get_index_from_JP2file( int fd);
|
||||
|
||||
/**
|
||||
* Destroy index parameters
|
||||
*
|
||||
* @param[in,out] idx addressof the index pointer
|
||||
*/
|
||||
void destroy_index( index_t **idx);
|
||||
OPJ_API void OPJ_CALLCONV destroy_index( index_t **idx);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -301,7 +301,7 @@ void destroy_index( index_t **idx);
|
|||
*
|
||||
* @param[in] index index parameters
|
||||
*/
|
||||
void output_index( index_t *index);
|
||||
OPJ_API void OPJ_CALLCONV output_index( index_t *index);
|
||||
|
||||
#endif /*SERVER*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue