summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2014-04-23 07:46:11 +0000
committerAntonin Descampe <antonin@gmail.com>2014-04-23 07:46:11 +0000
commit7aece5e8e7d4214d140a45aca50a824ff8092924 (patch)
tree85599bd1108ecab5b12fad8dcea894f250b97145 /src/bin
parent8d93eae64acd18fac3c856e0a311905359233b96 (diff)
[trunk]Replaced deprecated opj_stream_set_user_data function from API
with its 'v3' version, and removed all other 'v3' suffixes from API.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jp2/opj_compress.c10
-rw-r--r--src/bin/jp2/opj_decompress.c18
-rw-r--r--src/bin/jp2/opj_dump.c10
3 files changed, 19 insertions, 19 deletions
diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c
index 96401941..4da8eaee 100644
--- a/src/bin/jp2/opj_compress.c
+++ b/src/bin/jp2/opj_compress.c
@@ -1747,7 +1747,7 @@ int main(int argc, char **argv) {
}
default:
fprintf(stderr, "skipping file..\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
continue;
}
@@ -1766,7 +1766,7 @@ int main(int argc, char **argv) {
opj_setup_encoder(l_codec, &parameters, image);
/* open a byte stream for writing and allocate memory for all tiles */
- l_stream = opj_stream_create_default_file_stream_v3(parameters.outfile,OPJ_FALSE);
+ l_stream = opj_stream_create_default_file_stream(parameters.outfile,OPJ_FALSE);
if (! l_stream){
return 1;
}
@@ -1785,7 +1785,7 @@ int main(int argc, char **argv) {
for (i=0;i<l_nb_tiles;++i) {
if (! opj_write_tile(l_codec,i,l_data,l_data_size,l_stream)) {
fprintf(stderr, "ERROR -> test_tile_encoder: failed to write the tile %d!\n",i);
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
return 1;
@@ -1805,7 +1805,7 @@ int main(int argc, char **argv) {
}
if (!bSuccess) {
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
fprintf(stderr, "failed to encode image\n");
@@ -1814,7 +1814,7 @@ int main(int argc, char **argv) {
fprintf(stdout,"[INFO] Generated outfile %s\n",parameters.outfile);
/* close and free the byte stream */
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
/* free remaining compression structures */
opj_destroy_codec(l_codec);
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
index 1164f061..78957e85 100644
--- a/src/bin/jp2/opj_decompress.c
+++ b/src/bin/jp2/opj_decompress.c
@@ -762,7 +762,7 @@ int main(int argc, char **argv)
/* read the input file and put it in memory */
/* ---------------------------------------- */
- l_stream = opj_stream_create_default_file_stream_v3(parameters.infile,1);
+ l_stream = opj_stream_create_default_file_stream(parameters.infile,1);
if (!l_stream){
fprintf(stderr, "ERROR -> failed to create the stream from the file %s\n", parameters.infile);
return EXIT_FAILURE;
@@ -792,7 +792,7 @@ int main(int argc, char **argv)
}
default:
fprintf(stderr, "skipping file..\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
continue;
}
@@ -804,7 +804,7 @@ int main(int argc, char **argv)
/* Setup the decoder decoding parameters using user parameters */
if ( !opj_setup_decoder(l_codec, &parameters) ){
fprintf(stderr, "ERROR -> opj_compress: failed to setup the decoder\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
return EXIT_FAILURE;
}
@@ -813,7 +813,7 @@ int main(int argc, char **argv)
/* Read the main header of the codestream and if necessary the JP2 boxes*/
if(! opj_read_header(l_stream, l_codec, &image)){
fprintf(stderr, "ERROR -> opj_decompress: failed to read the header\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
return EXIT_FAILURE;
@@ -824,7 +824,7 @@ int main(int argc, char **argv)
if (!opj_set_decode_area(l_codec, image, (OPJ_INT32)parameters.DA_x0,
(OPJ_INT32)parameters.DA_y0, (OPJ_INT32)parameters.DA_x1, (OPJ_INT32)parameters.DA_y1)){
fprintf(stderr, "ERROR -> opj_decompress: failed to set the decoded area\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
return EXIT_FAILURE;
@@ -834,7 +834,7 @@ int main(int argc, char **argv)
if (!(opj_decode(l_codec, l_stream, image) && opj_end_decompress(l_codec, l_stream))) {
fprintf(stderr,"ERROR -> opj_decompress: failed to decode image!\n");
opj_destroy_codec(l_codec);
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_image_destroy(image);
return EXIT_FAILURE;
}
@@ -845,7 +845,7 @@ int main(int argc, char **argv)
/*if (!opj_set_decoded_resolution_factor(l_codec, 5)) {
fprintf(stderr, "ERROR -> opj_decompress: failed to set the resolution factor tile!\n");
opj_destroy_codec(l_codec);
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_image_destroy(image);
return EXIT_FAILURE;
}*/
@@ -853,7 +853,7 @@ int main(int argc, char **argv)
if (!opj_get_decoded_tile(l_codec, l_stream, image, parameters.tile_index)) {
fprintf(stderr, "ERROR -> opj_decompress: failed to decode tile!\n");
opj_destroy_codec(l_codec);
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_image_destroy(image);
return EXIT_FAILURE;
}
@@ -861,7 +861,7 @@ int main(int argc, char **argv)
}
/* Close the byte stream */
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
if(image->color_space == OPJ_CLRSPC_SYCC){
color_sycc_to_rgb(image); /* FIXME */
diff --git a/src/bin/jp2/opj_dump.c b/src/bin/jp2/opj_dump.c
index 3121aa4f..7a841d53 100644
--- a/src/bin/jp2/opj_dump.c
+++ b/src/bin/jp2/opj_dump.c
@@ -498,7 +498,7 @@ int main(int argc, char *argv[])
/* Read the input file and put it in memory */
/* ---------------------------------------- */
- l_stream = opj_stream_create_default_file_stream_v3(parameters.infile,1);
+ l_stream = opj_stream_create_default_file_stream(parameters.infile,1);
if (!l_stream){
fprintf(stderr, "ERROR -> failed to create the stream from the file %s\n",parameters.infile);
return EXIT_FAILURE;
@@ -528,7 +528,7 @@ int main(int argc, char *argv[])
}
default:
fprintf(stderr, "skipping file..\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
continue;
}
@@ -540,7 +540,7 @@ int main(int argc, char *argv[])
/* Setup the decoder decoding parameters using user parameters */
if ( !opj_setup_decoder(l_codec, &parameters) ){
fprintf(stderr, "ERROR -> opj_dump: failed to setup the decoder\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
fclose(fout);
return EXIT_FAILURE;
@@ -549,7 +549,7 @@ int main(int argc, char *argv[])
/* Read the main header of the codestream and if necessary the JP2 boxes*/
if(! opj_read_header(l_stream, l_codec, &image)){
fprintf(stderr, "ERROR -> opj_dump: failed to read the header\n");
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
fclose(fout);
@@ -563,7 +563,7 @@ int main(int argc, char *argv[])
cstr_index = opj_get_cstr_index(l_codec);
/* close the byte stream */
- opj_stream_destroy_v3(l_stream);
+ opj_stream_destroy(l_stream);
/* free remaining structures */
if (l_codec) {