From 3d9198592bb24b4e109c086dbd079b9575396f58 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Fri, 2 Mar 2012 11:09:16 +0000 Subject: [PATCH] [trunk] Import remaning bits from JPIP/1.5 over to trunk --- applications/jpip/CHANGES | 31 +++-- applications/jpip/README | 10 +- applications/jpip/doc/Doxyfile | 2 +- applications/jpip/libopenjpip/Makefile.am | 4 +- .../jpip/libopenjpip/auxtrans_manager.c | 49 ++++---- .../jpip/libopenjpip/auxtrans_manager.h | 10 +- applications/jpip/libopenjpip/box_manager.c | 57 ++++------ applications/jpip/libopenjpip/box_manager.h | 28 ++--- .../jpip/libopenjpip/boxheader_manager.c | 4 +- .../jpip/libopenjpip/boxheader_manager.h | 10 +- applications/jpip/libopenjpip/byte_manager.c | 19 +++- applications/jpip/libopenjpip/byte_manager.h | 18 ++- applications/jpip/libopenjpip/cache_manager.c | 4 +- applications/jpip/libopenjpip/cache_manager.h | 24 ++-- .../jpip/libopenjpip/cachemodel_manager.c | 28 ++--- .../jpip/libopenjpip/cachemodel_manager.h | 24 ++-- .../jpip/libopenjpip/channel_manager.h | 22 ++-- .../jpip/libopenjpip/codestream_manager.h | 8 +- .../jpip/libopenjpip/dec_clientmsg_handler.c | 49 ++++++-- .../jpip/libopenjpip/dec_clientmsg_handler.h | 8 ++ .../jpip/libopenjpip/faixbox_manager.c | 11 +- .../jpip/libopenjpip/faixbox_manager.h | 50 ++++---- .../jpip/libopenjpip/ihdrbox_manager.h | 6 +- .../jpip/libopenjpip/imgreg_manager.c | 8 +- .../jpip/libopenjpip/imgreg_manager.h | 14 +-- .../jpip/libopenjpip/imgsock_manager.c | 32 +++++- .../jpip/libopenjpip/imgsock_manager.h | 27 ++++- applications/jpip/libopenjpip/index_manager.c | 87 ++++++++------ applications/jpip/libopenjpip/index_manager.h | 86 +++++++------- applications/jpip/libopenjpip/jp2k_encoder.c | 22 +++- applications/jpip/libopenjpip/jp2k_encoder.h | 10 ++ applications/jpip/libopenjpip/jpip_parser.c | 107 ++++++++++-------- .../jpip/libopenjpip/jpipstream_manager.c | 34 +++++- .../jpip/libopenjpip/jpipstream_manager.h | 4 +- .../jpip/libopenjpip/manfbox_manager.c | 2 +- .../jpip/libopenjpip/manfbox_manager.h | 8 +- .../jpip/libopenjpip/marker_manager.h | 10 +- .../jpip/libopenjpip/metadata_manager.c | 30 ++--- .../jpip/libopenjpip/metadata_manager.h | 26 ++--- .../jpip/libopenjpip/mhixbox_manager.h | 26 ++--- .../jpip/libopenjpip/msgqueue_manager.c | 68 ++++++----- .../jpip/libopenjpip/msgqueue_manager.h | 32 +++--- applications/jpip/libopenjpip/openjpip.c | 77 ++++++++----- applications/jpip/libopenjpip/openjpip.h | 58 +++++----- .../jpip/libopenjpip/placeholder_manager.c | 6 +- .../jpip/libopenjpip/placeholder_manager.h | 24 ++-- applications/jpip/libopenjpip/query_parser.c | 20 ++-- applications/jpip/libopenjpip/query_parser.h | 48 ++++---- .../jpip/libopenjpip/session_manager.h | 14 +-- applications/jpip/libopenjpip/sock_manager.c | 8 +- applications/jpip/libopenjpip/sock_manager.h | 4 +- .../jpip/libopenjpip/target_manager.c | 29 +++-- .../jpip/libopenjpip/target_manager.h | 32 +++--- applications/jpip/util/opj_dec_server.c | 18 ++- applications/jpip/util/opj_server.c | 22 ++-- .../util/opj_viewer/src/ImageManager.java | 42 +++++-- .../jpip/util/opj_viewer/src/ImageWindow.java | 39 ++++--- .../util/opj_viewer/src/ImgdecClient.java | 47 ++++---- .../opj_viewer_xerces/src/ImageWindow.java | 39 ++++--- 59 files changed, 964 insertions(+), 672 deletions(-) diff --git a/applications/jpip/CHANGES b/applications/jpip/CHANGES index b5c2c791..0a88697e 100644 --- a/applications/jpip/CHANGES +++ b/applications/jpip/CHANGES @@ -5,16 +5,33 @@ What's New for OpenJPIP ! : changed + : added +Feburary 28, 2012 ++ [kaori] enabled the opj_server to reply the first query consisting with len request from kakadu client + +February 9, 2012 +* [kaori] fixed Doxygen configuration file to document the utilities ++ [kaori] added execution argument to set port number for opj_dec_server, opj_viewer* + +January 26, 2012 +! [kaori] unapplied auxtrans_manager to the local mode + +December 24, 2011 +* [kaori] additional modification for the warning + +December 22, 2011 +* [kaori] fixed auxtrans_manager to enable MAC +* [kaori] warnings due to disregarding return value are removed + November 30, 2011 + [kaori] TCP return (http-tcp) implemented November 16, 2011 -* [kaori] fixed opj_server execusion error (instant terminating) with autotool, cmake still need to be fixed +* [kaori] fixed Region of Interest option, and memory leak of opj_dec_server + [kaori] new feature to target JP2 files from www (libcurl required) +* [kaori] fixed opj_server execusion error (instant terminating) with autotool, cmake still need to be fixed November 8, 2011 ! [kaori] updated main page of doxygen -! [kaori] enabled OpenJPEG V2 API November 3, 2011 * [kaori] solved memory leak of opj_server @@ -43,12 +60,12 @@ October 14, 2011 October 12, 2011 + [kaori] enable layers requests; restricting the number of codesream quality layers -October 10, 2011 -- [antonin] removed obsolete indexer utility -+ [kaori] enable JPT-stream request from client viewer option +October 11, 2011 ++ [antonin] enable JPT-stream request from client viewer option (credit to kaori) -September 30, 2011 -+ [kaori] enabled JPP-stream +October 10, 2011 +- [antonin] removed obsolete indexer utility (credit to kaori) ++ [antonin] enabled JPP-stream (credit to kaori) September 16, 2011 + [kaori] enabled stateless requests from the opj_viewers diff --git a/applications/jpip/README b/applications/jpip/README index dde8ddc7..5bcb01fa 100644 --- a/applications/jpip/README +++ b/applications/jpip/README @@ -92,11 +92,11 @@ Server: For shutting down JPIP server: %GET http://hostname/myFCGI?quitJPIP Notice, http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting) - Request message "quitJPIP" can be changed in Makefile, modify -DQUIT_SIGNAL=\"quitJPIP\" + Requst message "quitJPIP" can be changed in Makfile, modify -DQUIT_SIGNAL=\"quitJPIP\" Client: 1. Launch image decoding server, and keep it alive as long as image viewers are open - % ./opj_dec_server + % ./opj_dec_server [portnumber (50000 by default)] You might prefer to implement this program from another directory since cache files are saved in the working directory. % mkdir cache @@ -104,10 +104,12 @@ Client: % ../opj_dec_server 2. Open image viewers (as many as needed) - % java -jar opj_viewer.jar http://hostname/myFCGI path/filename.jp2 [stateless/session] [jptstream/jppstream] [tcp/udp] + % java -jar opj_viewer.jar http://hostname/myFCGI path/filename.jp2 [hostname] [portnumber] [stateless/session] [jptstream/jppstream] [tcp/udp] ( The arguments - http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting) - path/filename.jp2 is the server local path or URL of a JP2 file + - host name of opj_dec_server, localhost by default + - portnumber of opj_dec_server, 50000 by default - request type stateless for no caching, session (default) for caching - return media type, JPT-stream tile based stream, or JPP-stream (default) precinct based stream - auxiliary return protocol, tcp or udp (udp is not implemented yet), if not given, return data is filled in http chunk @@ -131,7 +133,7 @@ An example to encode a TIF image "copenhague1.tif" at resolution 4780x4050, 8bit % ./image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip -TP R options - -jpip : embed index table box into the output JP2 file (obligation for JPIP) + -jpip : embed index table 'cidx' box into the output JP2 file (obligation for JPIP) -TP R : partition a tile into tile parts of different resolution levels (obligation for JPT-stream)