aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llimagej2coj
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/llimagej2coj
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz
Second Life viewer sources 1.15.0.2
Diffstat (limited to 'linden/indra/llimagej2coj')
-rw-r--r--linden/indra/llimagej2coj/llimagej2coj.cpp23
-rw-r--r--linden/indra/llimagej2coj/llimagej2coj.h1
2 files changed, 14 insertions, 10 deletions
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp
index 307f952..9366a62 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.cpp
+++ b/linden/indra/llimagej2coj/llimagej2coj.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2006-2007, Linden Research, Inc. 5 * Copyright (c) 2006-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -49,22 +50,23 @@ void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl)
49/** 50/**
50sample error callback expecting a FILE* client object 51sample error callback expecting a FILE* client object
51*/ 52*/
52void error_callback(const char *msg, void *client_data) { 53void error_callback(const char* msg, void*)
53 FILE *stream = (FILE*)client_data; 54{
54 fprintf(stream, "[ERROR] %s", msg); 55 lldebugs << "LLImageJ2CImpl error_callback: " << msg << llendl;
55} 56}
56/** 57/**
57sample warning callback expecting a FILE* client object 58sample warning callback expecting a FILE* client object
58*/ 59*/
59void warning_callback(const char *msg, void *client_data) { 60void warning_callback(const char* msg, void*)
60 FILE *stream = (FILE*)client_data; 61{
61 fprintf(stream, "[WARNING] %s", msg); 62 lldebugs << "LLImageJ2CImpl warning_callback: " << msg << llendl;
62} 63}
63/** 64/**
64sample debug callback expecting no client object 65sample debug callback expecting no client object
65*/ 66*/
66void info_callback(const char *msg, void *client_data) { 67void info_callback(const char* msg, void*)
67 fprintf(stdout, "[INFO] %s", msg); 68{
69 lldebugs << "LLImageJ2CImpl info_callback: " << msg << llendl;
68} 70}
69 71
70 72
@@ -289,9 +291,10 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
289 291
290 /* encode the image */ 292 /* encode the image */
291 bool bSuccess = opj_encode(cinfo, cio, image, parameters.index); 293 bool bSuccess = opj_encode(cinfo, cio, image, parameters.index);
292 if (!bSuccess) { 294 if (!bSuccess)
295 {
293 opj_cio_close(cio); 296 opj_cio_close(cio);
294 fprintf(stderr, "failed to encode image\n"); 297 llinfos << "Failed to encode image." << llendl;
295 return FALSE; 298 return FALSE;
296 } 299 }
297 codestream_length = cio_tell(cio); 300 codestream_length = cio_tell(cio);
diff --git a/linden/indra/llimagej2coj/llimagej2coj.h b/linden/indra/llimagej2coj/llimagej2coj.h
index c3e3d52..822ebc2 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.h
+++ b/linden/indra/llimagej2coj/llimagej2coj.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2006-2007, Linden Research, Inc. 5 * Copyright (c) 2006-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement