X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=doxygen%2Fopenjpip_8h_source.html;h=c90bc04897586479743991145089ea634f312b4c;hb=refs%2Fheads%2Fgh-pages;hp=32f5709f39dfd85dd9dbbf52945b5990ca1d7284;hpb=46a238beb0b1c835489bdf0ffeb69f1234c2dcfb;p=openjpeg.git diff --git a/doxygen/openjpip_8h_source.html b/doxygen/openjpip_8h_source.html index 32f5709f..c90bc048 100644 --- a/doxygen/openjpip_8h_source.html +++ b/doxygen/openjpip_8h_source.html @@ -1,9 +1,10 @@ - + - + + OpenJPEG: openjpip.h Source File @@ -18,7 +19,7 @@
OpenJPEG -  2.4.0 +  2.5.0
@@ -26,22 +27,16 @@ - - - + + + + +
-Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
5  * Copyright (c) 2002-2014, Professor Benoit Macq
6  * Copyright (c) 2010-2011, Kaori Hagihara
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef OPENJPIP_H_
32 # define OPENJPIP_H_
33 
34 #include "session_manager.h"
35 #include "target_manager.h"
36 #include "query_parser.h"
37 #include "msgqueue_manager.h"
38 #include "sock_manager.h"
39 #include "auxtrans_manager.h"
40 
41 #ifdef SERVER
42 
43 #include "fcgi_stdio.h"
44 #define logstream FCGI_stdout
45 
46 #else
47 
48 #define FCGI_stdout stdout
49 #define FCGI_stderr stderr
50 #define logstream stderr
51 
52 #include "cache_manager.h"
53 #include "byte_manager.h"
54 #include "imgsock_manager.h"
55 
56 #include "metadata_manager.h"
57 #include "ihdrbox_manager.h"
58 #include "index_manager.h"
59 
60 #endif /*SERVER*/
61 
62 /*
63  *==========================================================
64  * JPIP server API
65  *==========================================================
66  */
67 
68 #ifdef SERVER
69 
71 typedef struct server_record {
72  sessionlist_param_t *sessionlist;
73  targetlist_param_t *targetlist;
74  auxtrans_param_t auxtrans;
75 } server_record_t;
76 
78 typedef struct QR {
79  query_param_t *query;
80  msgqueue_param_t *msgqueue;
81  channel_param_t *channel;
82 } QR_t;
83 
91 server_record_t * init_JPIPserver(int tcp_auxport, int udp_auxport);
92 
98 void terminate_JPIPserver(server_record_t **rec);
99 
106 QR_t * parse_querystring(const char *query_string);
107 
115 OPJ_BOOL process_JPIPrequest(server_record_t *rec, QR_t *qr);
116 
123 void send_responsedata(server_record_t *rec, QR_t *qr);
124 
131 void end_QRprocess(server_record_t *rec, QR_t **qr);
132 
143 void local_log(OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions,
144  OPJ_BOOL targets, QR_t *qr, server_record_t *rec);
145 
146 #endif /*SERVER*/
147 
148 /*
149  *==========================================================
150  * JPIP decoding server API
151  *==========================================================
152  */
153 
154 #ifndef SERVER
155 
157 typedef struct dec_server_record {
164 
165 
167 typedef SOCKET client_t;
168 
176 
183 
191 
200  dec_server_record_t *rec);
201 
202 #endif /*SERVER*/
203 
204 /*
205  *==========================================================
206  * JPIP tool API
207  *==========================================================
208  */
209 
210 #ifndef SERVER
211 
212 /*
213  * jpip to JP2 or J2K
214  */
215 
217 typedef struct jpip_dec_param {
226 
234 
241 
249 OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip(const char fname[],
250  jpip_dec_param_t *dec);
251 
258 
266 OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k(const char fname[],
267  jpip_dec_param_t *dec);
268 
277 OPJ_API void OPJ_CALLCONV output_log(OPJ_BOOL messages, OPJ_BOOL metadata,
278  OPJ_BOOL ihdrbox, jpip_dec_param_t *dec);
279 
280 /*
281  * test the format of index (cidx) box in JP2 file
282  */
283 
286 
294 
301 
302 
309 
310 #endif /*SERVER*/
311 
312 #endif /* !OPENJPIP_H_ */
-
metadatalist_param_t * metadatalist
metadata list going into JP2 file
Definition: openjpip.h:221
-
index_param_t index_t
Redefinition of index parameters.
Definition: openjpip.h:285
-
uint8_t Byte_t
Definition: byte_manager.h:37
-
message queue parameters
Definition: msgqueue_manager.h:63
-
Byte8_t jpiplen
length of jpipstream
Definition: openjpip.h:219
-
OPJ_SIZE_T jpipstreamlen
length of jpipstream
Definition: openjpip.h:160
- -
Decoding server static records.
Definition: openjpip.h:157
-
OPJ_API client_t OPJ_CALLCONV accept_connection(dec_server_record_t *rec)
Accept client connection.
Definition: openjpip.c:260
-
int OPJ_BOOL
Definition: openjpeg.h:110
-
OPJ_API OPJ_BOOL OPJ_CALLCONV handle_clientreq(client_t client, dec_server_record_t *rec)
Handle client request.
Definition: openjpip.c:272
-
OPJ_API void OPJ_CALLCONV destroy_jpipdecoder(jpip_dec_param_t **dec)
Destroy jpip decoding parameters.
Definition: openjpip.c:435
-
OPJ_API void OPJ_CALLCONV output_log(OPJ_BOOL messages, OPJ_BOOL metadata, OPJ_BOOL ihdrbox, jpip_dec_param_t *dec)
Option; print out parameter values to stderr.
Definition: openjpip.c:418
-
Byte8_t jp2klen
length of j2kstream or JP2 file
Definition: openjpip.h:224
- -
OPJ_API void OPJ_CALLCONV output_index(index_t *index)
print index parameters
Definition: openjpip.c:481
-
ihdrbox_param_t * ihdrbox
ihdr box going into JP2 file
Definition: openjpip.h:222
-
Definition: cache_manager.h:50
- -
cachelist_param_t * cachelist
cache list
Definition: openjpip.h:158
-
OPJ_API index_t *OPJ_CALLCONV get_index_from_JP2file(int fd)
Parse JP2 file and get index information from cidx box inside.
Definition: openjpip.c:448
-
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
-
msgqueue_param_t * msgqueue
parsed message queue of jpipstream
Definition: openjpip.h:161
-
Byte_t * jp2kstream
J2K codestream or JP2 file codestream.
Definition: openjpip.h:223
-
Target list parameters.
Definition: target_manager.h:59
-
OPJ_API void OPJ_CALLCONV destroy_index(index_t **idx)
Destroy index parameters.
Definition: openjpip.c:476
-
Byte_t * jpipstream
JPT/JPP stream.
Definition: openjpip.h:159
-
int SOCKET
Definition: sock_manager.h:40
-
auxiliary transport setting parameters
Definition: auxtrans_manager.h:38
- - -
OPJ_API void OPJ_CALLCONV decode_jpip(jpip_dec_param_t *dec)
Decode jpip codestream.
Definition: openjpip.c:378
-
index parameters
Definition: index_manager.h:86
- -
OPJ_API void OPJ_CALLCONV terminate_dec_server(dec_server_record_t **rec)
Terminate the image decoding server.
Definition: openjpip.c:244
-
msgqueue_param_t * msgqueue
message queue
Definition: openjpip.h:220
-
Query parameters.
Definition: query_parser.h:47
-
SOCKET listening_socket
listenning socket
Definition: openjpip.h:162
-
OPJ_API dec_server_record_t *OPJ_CALLCONV init_dec_server(int port)
Initialize the image decoding server.
Definition: openjpip.c:230
-
Byte_t * jpipstream
JPT/JPP-stream.
Definition: openjpip.h:218
-
JPIP decoding parameters.
Definition: openjpip.h:217
-
Session list parameters.
Definition: session_manager.h:45
-
struct jpip_dec_param jpip_dec_param_t
JPIP decoding parameters.
-
#define OPJ_CALLCONV
Definition: openjpeg.h:92
-
OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip(const char fname[], jpip_dec_param_t *dec)
Read jpip codestream from a file.
Definition: openjpip.c:350
-
I.5.3.1 Image Header box.
Definition: ihdrbox_manager.h:39
- - - -
#define OPJ_API
Definition: openjpeg.h:89
-
OPJ_API jpip_dec_param_t *OPJ_CALLCONV init_jpipdecoder(OPJ_BOOL jp2)
Initialize jpip decoder.
Definition: openjpip.c:334
-
OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k(const char fname[], jpip_dec_param_t *dec)
Write J2K/JP2 codestream to a file.
Definition: openjpip.c:396
-
SOCKET client_t
Client socket identifier.
Definition: openjpip.h:167
-
struct dec_server_record dec_server_record_t
Decoding server static records.
- -
uint64_t Byte8_t
Definition: byte_manager.h:40
-
Channel parameters.
Definition: channel_manager.h:43
- -
metadata-bin list parameters
Definition: metadata_manager.h:54
+Go to the documentation of this file.
1 /*
+
2  * $Id$
+
3  *
+
4  * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
+
5  * Copyright (c) 2002-2014, Professor Benoit Macq
+
6  * Copyright (c) 2010-2011, Kaori Hagihara
+
7  * All rights reserved.
+
8  *
+
9  * Redistribution and use in source and binary forms, with or without
+
10  * modification, are permitted provided that the following conditions
+
11  * are met:
+
12  * 1. Redistributions of source code must retain the above copyright
+
13  * notice, this list of conditions and the following disclaimer.
+
14  * 2. Redistributions in binary form must reproduce the above copyright
+
15  * notice, this list of conditions and the following disclaimer in the
+
16  * documentation and/or other materials provided with the distribution.
+
17  *
+
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
+
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+
28  * POSSIBILITY OF SUCH DAMAGE.
+
29  */
+
30 
+
31 #ifndef OPENJPIP_H_
+
32 # define OPENJPIP_H_
+
33 
+
34 #include "session_manager.h"
+
35 #include "target_manager.h"
+
36 #include "query_parser.h"
+
37 #include "msgqueue_manager.h"
+
38 #include "sock_manager.h"
+
39 #include "auxtrans_manager.h"
+
40 
+
41 #ifdef SERVER
+
42 
+
43 #include "fcgi_stdio.h"
+
44 #define logstream FCGI_stdout
+
45 
+
46 #else
+
47 
+
48 #define FCGI_stdout stdout
+
49 #define FCGI_stderr stderr
+
50 #define logstream stderr
+
51 
+
52 #include "cache_manager.h"
+
53 #include "byte_manager.h"
+
54 #include "imgsock_manager.h"
+
55 
+
56 #include "metadata_manager.h"
+
57 #include "ihdrbox_manager.h"
+
58 #include "index_manager.h"
+
59 
+
60 #endif /*SERVER*/
+
61 
+
62 /*
+
63  *==========================================================
+
64  * JPIP server API
+
65  *==========================================================
+
66  */
+
67 
+
68 #ifdef SERVER
+
69 
+
71 typedef struct server_record {
+
72  sessionlist_param_t *sessionlist;
+
73  targetlist_param_t *targetlist;
+
74  auxtrans_param_t auxtrans;
+
75 } server_record_t;
+
76 
+
78 typedef struct QR {
+
79  query_param_t *query;
+
80  msgqueue_param_t *msgqueue;
+
81  channel_param_t *channel;
+
82 } QR_t;
+
83 
+
91 server_record_t * init_JPIPserver(int tcp_auxport, int udp_auxport);
+
92 
+
98 void terminate_JPIPserver(server_record_t **rec);
+
99 
+
106 QR_t * parse_querystring(const char *query_string);
+
107 
+
115 OPJ_BOOL process_JPIPrequest(server_record_t *rec, QR_t *qr);
+
116 
+
123 void send_responsedata(server_record_t *rec, QR_t *qr);
+
124 
+
131 void end_QRprocess(server_record_t *rec, QR_t **qr);
+
132 
+
143 void local_log(OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions,
+
144  OPJ_BOOL targets, QR_t *qr, server_record_t *rec);
+
145 
+
146 #endif /*SERVER*/
+
147 
+
148 /*
+
149  *==========================================================
+
150  * JPIP decoding server API
+
151  *==========================================================
+
152  */
+
153 
+
154 #ifndef SERVER
+
155 
+
157 typedef struct dec_server_record {
+ + + + + + +
164 
+
165 
+
167 typedef SOCKET client_t;
+
168 
+ +
176 
+ +
183 
+ +
191 
+ +
200  dec_server_record_t *rec);
+
201 
+
202 #endif /*SERVER*/
+
203 
+
204 /*
+
205  *==========================================================
+
206  * JPIP tool API
+
207  *==========================================================
+
208  */
+
209 
+
210 #ifndef SERVER
+
211 
+
212 /*
+
213  * jpip to JP2 or J2K
+
214  */
+
215 
+
217 typedef struct jpip_dec_param {
+ + + + + + + + +
226 
+ +
234 
+ +
241 
+
249 OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip(const char fname[],
+
250  jpip_dec_param_t *dec);
+
251 
+ +
258 
+
266 OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k(const char fname[],
+
267  jpip_dec_param_t *dec);
+
268 
+
277 OPJ_API void OPJ_CALLCONV output_log(OPJ_BOOL messages, OPJ_BOOL metadata,
+
278  OPJ_BOOL ihdrbox, jpip_dec_param_t *dec);
+
279 
+
280 /*
+
281  * test the format of index (cidx) box in JP2 file
+
282  */
+
283 
+ +
286 
+ +
294 
+ +
301 
+
302 
+ +
309 
+
310 #endif /*SERVER*/
+
311 
+
312 #endif /* !OPENJPIP_H_ */
+
OPJ_OFF_T get_filesize(int fd)
Get file size.
Definition: byte_manager.c:167
+
OPJ_API void OPJ_CALLCONV output_index(index_t *index)
print index parameters
Definition: openjpip.c:481
+
@ CIDDST
Definition: imgsock_manager.h:39
+
index_t *OPJ_CALLCONV get_index_from_JP2file(int fd)
Parse JP2 file and get index information from cidx box inside.
Definition: openjpip.c:448
+
@ CIDREQ
Definition: imgsock_manager.h:39
+
Session parameters.
Definition: session_manager.h:38
+
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
+
auxiliary transport setting parameters
Definition: auxtrans_manager.h:38
+
void delete_query(query_param_t **query)
delete query
Definition: query_parser.c:449
+
ihdrbox_param_t * ihdrbox
ihdr box going into JP2 file
Definition: openjpip.h:222
+
void delete_targetlist(targetlist_param_t **targetlist)
delete target list
Definition: target_manager.c:192
+
void recons_stream_from_msgqueue(msgqueue_param_t *msgqueue, int tmpfd)
reconstruct JPT/JPP-stream from message queue
Definition: msgqueue_manager.c:443
+
SOCKET listening_socket
listenning socket
Definition: openjpip.h:162
+
OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k(const char fname[], jpip_dec_param_t *dec)
Write J2K/JP2 codestream to a file.
Definition: openjpip.c:396
+
@ SIZREQ
Definition: imgsock_manager.h:39
+
+
OPJ_API dec_server_record_t *OPJ_CALLCONV init_dec_server(int port)
Initialize the image decoding server.
Definition: openjpip.c:230
+
cachelist_param_t * gene_cachelist(void)
generate a cache list
Definition: cache_manager.c:36
+
dec_server_record_t *OPJ_CALLCONV init_dec_server(int port)
Initialize the image decoding server.
Definition: openjpip.c:230
+
void OPJ_CALLCONV decode_jpip(jpip_dec_param_t *dec)
Decode jpip codestream.
Definition: openjpip.c:378
+
SOCKET client_t
Client socket identifier.
Definition: openjpip.h:167
+
OPJ_BOOL close_channel(query_param_t query_param, sessionlist_param_t *sessionlist, session_param_t **cursession, channel_param_t **curchannel)
REQUEST: channel close (cclose)
Definition: jpip_parser.c:131
+
void save_codestream(Byte_t *codestream, OPJ_SIZE_T streamlen, const char *fmt)
Definition: jpipstream_manager.c:58
+
+
Byte_t * jpipstream
JPT/JPP stream.
Definition: openjpip.h:159
+
void OPJ_CALLCONV terminate_dec_server(dec_server_record_t **rec)
Terminate the image decoding server.
Definition: openjpip.c:244
+
uint8_t Byte_t
Definition: byte_manager.h:37
+
+
#define OPJ_API
Definition: openjpeg.h:95
+
+
#define FCGI_stdout
Definition: auxtrans_manager.c:46
+
Session list parameters.
Definition: session_manager.h:45
+
Byte8_t jp2klen
length of j2kstream or JP2 file
Definition: openjpip.h:224
+
OPJ_BOOL gene_JPIPstream(query_param_t query_param, target_param_t *target, session_param_t *cursession, channel_param_t *curchannel, msgqueue_param_t **msgqueue)
REQUEST: view-window (fsiz)
Definition: jpip_parser.c:204
+
void print_msgqueue(msgqueue_param_t *msgqueue)
print message queue
Definition: msgqueue_manager.c:97
+
@ tcp
Definition: query_parser.h:41
+
+
+
OPJ_API jpip_dec_param_t *OPJ_CALLCONV init_jpipdecoder(OPJ_BOOL jp2)
Initialize jpip decoder.
Definition: openjpip.c:334
+
targetlist_param_t * gene_targetlist(void)
generate a target list
Definition: target_manager.c:57
+
void OPJ_CALLCONV destroy_index(index_t **idx)
Destroy index parameters.
Definition: openjpip.c:476
+
OPJ_API void OPJ_CALLCONV output_log(OPJ_BOOL messages, OPJ_BOOL metadata, OPJ_BOOL ihdrbox, jpip_dec_param_t *dec)
Option; print out parameter values to stderr.
Definition: openjpip.c:418
+
index parameters
Definition: index_manager.h:86
+
msgqueue_param_t * gene_msgqueue(OPJ_BOOL stateless, cachemodel_param_t *cachemodel)
generate message queue
Definition: msgqueue_manager.c:59
+
void delete_cachelist(cachelist_param_t **cachelist)
delete cache list
Definition: cache_manager.c:48
+
#define FCGI_stderr
Definition: auxtrans_manager.c:47
+
void handle_CIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle ChannelID request message
Definition: dec_clientmsg_handler.c:183
+
void delete_index(index_param_t **index)
delete index
Definition: index_manager.c:192
+
query_param_t * parse_query(const char *query_string)
parse query
Definition: query_parser.c:88
+
struct dec_server_record dec_server_record_t
Decoding server static records.
+
OPJ_BOOL open_channel(query_param_t query_param, sessionlist_param_t *sessionlist, auxtrans_param_t auxtrans, target_param_t *target, session_param_t **cursession, channel_param_t **curchannel)
REQUEST: new channel (cnew) assignment.
Definition: jpip_parser.c:100
+
void OPJ_CALLCONV output_log(OPJ_BOOL messages, OPJ_BOOL metadata, OPJ_BOOL ihdrbox, jpip_dec_param_t *dec)
Option; print out parameter values to stderr.
Definition: openjpip.c:418
+
Byte_t bpc
bits per component
Definition: ihdrbox_manager.h:43
+
metadata-bin list parameters
Definition: metadata_manager.h:54
+
Byte_t * jp2kstream
J2K codestream or JP2 file codestream.
Definition: openjpip.h:223
+
void OPJ_CALLCONV destroy_jpipdecoder(jpip_dec_param_t **dec)
Destroy jpip decoding parameters.
Definition: openjpip.c:435
+
OPJ_API client_t OPJ_CALLCONV accept_connection(dec_server_record_t *rec)
Accept client connection.
Definition: openjpip.c:260
+
void print_queryparam(query_param_t query_param)
print query parameters
Definition: query_parser.c:238
+
@ QUIT
Definition: imgsock_manager.h:39
+
int SOCKET
Definition: sock_manager.h:40
+
Byte_t * jpipstream
JPT/JPP-stream.
Definition: openjpip.h:218
+
int OPJ_BOOL
Definition: openjpeg.h:116
+
size_t OPJ_SIZE_T
Definition: openjpeg.h:139
+
+
void print_index(index_param_t index)
print index parameters
Definition: index_manager.c:122
+
void handle_JPIPstreamMSG(SOCKET connected_socket, cachelist_param_t *cachelist, Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue)
handle JPT- JPP- stream message
Definition: dec_clientmsg_handler.c:42
+
@ JP2SAVE
Definition: imgsock_manager.h:39
+
@ non
Definition: query_parser.h:41
+
void handle_dstCIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle distroy ChannelID message
Definition: dec_clientmsg_handler.c:203
+
sessionlist_param_t * gene_sessionlist(void)
generate a session list
Definition: session_manager.c:47
+
auxtrans_param_t init_aux_transport(int tcp_auxport, int udp_auxport)
Initialize auxiliary transport server of JPIP server.
Definition: auxtrans_manager.c:51
+
SOCKET open_listeningsocket(uint16_t port)
open listening socket
Definition: sock_manager.c:57
+
+
void print_allsession(sessionlist_param_t *sessionlist)
print all sessions
Definition: session_manager.c:186
+
OPJ_BOOL is_allsent(cachemodel_param_t cachemodel)
check if all data has been sent
Definition: cachemodel_manager.c:211
+
Byte4_t width
Definition: ihdrbox_manager.h:41
+
OPJ_BOOL OPJ_CALLCONV fwrite_jp2k(const char fname[], jpip_dec_param_t *dec)
Write J2K/JP2 codestream to a file.
Definition: openjpip.c:396
+
+
void handle_TIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle TargetID request message
Definition: dec_clientmsg_handler.c:165
+
void delete_sessionlist(sessionlist_param_t **sessionlist)
delete session list
Definition: session_manager.c:161
+
Byte_t * fetch_bytes(int fd, OPJ_OFF_T offset, OPJ_SIZE_T size)
fetch bytes of data in file stream
Definition: byte_manager.c:52
+
OPJ_API void OPJ_CALLCONV decode_jpip(jpip_dec_param_t *dec)
Decode jpip codestream.
Definition: openjpip.c:378
+
Decoding server static records.
Definition: openjpip.h:157
+
void parse_metamsg(msgqueue_param_t *msgqueue, Byte_t *stream, Byte8_t streamlen, metadatalist_param_t *metadatalist)
parse JPT- JPP- stream to message queue
Definition: msgqueue_manager.c:687
+
#define OPJ_TRUE
Definition: openjpeg.h:117
+
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
+
ihdrbox_param_t * gene_ihdrbox(metadatalist_param_t *metadatalist, Byte_t *jpipstream)
generate ihdr box
Definition: ihdrbox_manager.c:36
+
@ udp
Definition: query_parser.h:41
+
+
client_t OPJ_CALLCONV accept_connection(dec_server_record_t *rec)
Accept client connection.
Definition: openjpip.c:260
+
@ TIDREQ
Definition: imgsock_manager.h:39
+
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
+
void delete_metadatalist(metadatalist_param_t **list)
delete metadata list
Definition: metadata_manager.c:114
+
+
Byte_t * recons_jp2(msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, Byte8_t *jp2len)
reconstruct jp2 file codestream from message queue
Definition: jp2k_encoder.c:98
+
OPJ_API void OPJ_CALLCONV destroy_index(index_t **idx)
Destroy index parameters.
Definition: openjpip.c:476
+
metadatalist_param_t * gene_metadatalist(void)
generate a metadata list
Definition: metadata_manager.c:49
+
+
msgqueue_param_t * msgqueue
message queue
Definition: openjpip.h:220
+
struct jpip_dec_param jpip_dec_param_t
JPIP decoding parameters.
+
void close_aux_transport(auxtrans_param_t auxtrans)
Close auxiliary transport server of JPIP server.
+
void parse_JPIPstream(Byte_t *JPIPstream, Byte8_t streamlen, OPJ_OFF_T offset, msgqueue_param_t *msgqueue)
parse JPT- JPP- stream to message queue
Definition: msgqueue_manager.c:631
+
int close_socket(SOCKET sock)
close socket
Definition: sock_manager.c:180
+
OPJ_API index_t *OPJ_CALLCONV get_index_from_JP2file(int fd)
Parse JP2 file and get index information from cidx box inside.
Definition: openjpip.c:448
+
OPJ_API OPJ_BOOL OPJ_CALLCONV handle_clientreq(client_t client, dec_server_record_t *rec)
Handle client request.
Definition: openjpip.c:272
+
void print_allmetadata(metadatalist_param_t *list)
print all metadata parameters
Definition: metadata_manager.c:182
+
Byte8_t csn
index of the codestream
Definition: msgqueue_manager.h:53
+
cachelist_param_t * cachelist
cache list
Definition: openjpip.h:158
+
OPJ_BOOL OPJ_CALLCONV handle_clientreq(client_t client, dec_server_record_t *rec)
Handle client request.
Definition: openjpip.c:272
+
@ XMLREQ
Definition: imgsock_manager.h:39
+
void OPJ_CALLCONV output_index(index_t *index)
print index parameters
Definition: openjpip.c:481
+
OPJ_BOOL OPJ_CALLCONV fread_jpip(const char fname[], jpip_dec_param_t *dec)
Read jpip codestream from a file.
Definition: openjpip.c:350
+
void send_responsedata_on_aux(OPJ_BOOL istcp, auxtrans_param_t auxtrans, const char cid[], void *data, OPJ_SIZE_T datalen, OPJ_SIZE_T maxlenPerFrame)
Send response data on aux transport.
Definition: auxtrans_manager.c:109
+
void handle_JP2saveMSG(SOCKET connected_socket, cachelist_param_t *cachelist, msgqueue_param_t *msgqueue, Byte_t *jpipstream)
handle saving JP2 file request message
Definition: dec_clientmsg_handler.c:250
+
Target list parameters.
Definition: target_manager.h:59
+
+
void handle_PNMreqMSG(SOCKET connected_socket, Byte_t *jpipstream, msgqueue_param_t *msgqueue, cachelist_param_t *cachelist)
handle PNM request message
Definition: dec_clientmsg_handler.c:102
+
OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip(const char fname[], jpip_dec_param_t *dec)
Read jpip codestream from a file.
Definition: openjpip.c:350
+
void handle_XMLreqMSG(SOCKET connected_socket, Byte_t *jpipstream, cachelist_param_t *cachelist)
handle XML request message
Definition: dec_clientmsg_handler.c:141
+
index_param_t * parse_jp2file(int fd)
parse JP2 file AnnexI: Indexing JPEG2000 files for JPIP
Definition: index_manager.c:73
+
JPIP decoding parameters.
Definition: openjpip.h:217
+
@ PNMREQ
Definition: imgsock_manager.h:39
+
OPJ_API void OPJ_CALLCONV terminate_dec_server(dec_server_record_t **rec)
Terminate the image decoding server.
Definition: openjpip.c:244
+
target parameters
Definition: target_manager.h:40
+
Query parameters.
Definition: query_parser.h:47
+
OPJ_BOOL associate_channel(query_param_t query_param, sessionlist_param_t *sessionlist, session_param_t **cursession, channel_param_t **curchannel)
REQUEST: channel association this must be processed before any process.
Definition: jpip_parser.c:82
+
message queue parameters
Definition: msgqueue_manager.h:63
+
OPJ_API void OPJ_CALLCONV destroy_jpipdecoder(jpip_dec_param_t **dec)
Destroy jpip decoding parameters.
Definition: openjpip.c:435
+
Byte4_t height
Definition: ihdrbox_manager.h:40
+
Definition: cache_manager.h:50
+
void handle_SIZreqMSG(SOCKET connected_socket, Byte_t *jpipstream, msgqueue_param_t *msgqueue, cachelist_param_t *cachelist)
handle SIZ request message
Definition: dec_clientmsg_handler.c:214
+
OPJ_SIZE_T jpipstreamlen
length of jpipstream
Definition: openjpip.h:160
+
#define OPJ_FALSE
Definition: openjpeg.h:118
+
Byte_t * recons_j2k(msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, int fw, int fh, Byte8_t *j2klen)
reconstruct j2k codestream from message queue
Definition: jp2k_encoder.c:79
+
SOCKET accept_socket(SOCKET listening_socket)
accept a new connection to the listenning socket
Definition: sock_manager.c:96
+
I.5.3.1 Image Header box.
Definition: ihdrbox_manager.h:39
+
index_param_t index_t
Redefinition of index parameters.
Definition: openjpip.h:285
+
msgtype_t identify_clientmsg(SOCKET connected_socket)
indeitify client message type
Definition: imgsock_manager.c:39
+
+
Byte8_t jpiplen
length of jpipstream
Definition: openjpip.h:219
+
Channel parameters.
Definition: channel_manager.h:43
+
enum eMSGTYPE msgtype_t
+
+
@ MSGERROR
Definition: imgsock_manager.h:39
+
uint64_t Byte8_t
Definition: byte_manager.h:40
+
#define OPJ_CALLCONV
Definition: openjpeg.h:98
+
msgqueue_param_t * msgqueue
parsed message queue of jpipstream
Definition: openjpip.h:161
+
OPJ_BOOL identify_target(query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target)
REQUEST: target identification by target or tid request.
Definition: jpip_parser.c:49
+
metadatalist_param_t * metadatalist
metadata list going into JP2 file
Definition: openjpip.h:221
+
+
message_param_t * first
first message pointer of the list
Definition: msgqueue_manager.h:64
+
@ JPIPSTREAM
Definition: imgsock_manager.h:39
+
+
void delete_msgqueue(msgqueue_param_t **msgqueue)
delete message queue
Definition: msgqueue_manager.c:75
+
jpip_dec_param_t *OPJ_CALLCONV init_jpipdecoder(OPJ_BOOL jp2)
Initialize jpip decoder.
Definition: openjpip.c:334
+
Byte2_t nc
number of components
Definition: ihdrbox_manager.h:42
+
+
void print_alltarget(targetlist_param_t *targetlist)
print all target parameters
Definition: target_manager.c:213