OpenJPEG  2.5.0
jpip_parser.h
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  * Copyright (c) 2011, Lucian Corlaciu, GSoC
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef JPIP_PARSER_H_
33 # define JPIP_PARSER_H_
34 
35 #include "query_parser.h"
36 #include "session_manager.h"
37 #include "target_manager.h"
38 #include "msgqueue_manager.h"
39 #include "channel_manager.h"
40 
50  targetlist_param_t *targetlist, target_param_t **target);
51 
63  sessionlist_param_t *sessionlist,
64  session_param_t **cursession,
65  channel_param_t **curchannel);
78  sessionlist_param_t *sessionlist,
79  auxtrans_param_t auxtrans,
80  target_param_t *target,
81  session_param_t **cursession,
82  channel_param_t **curchannel);
83 
94  sessionlist_param_t *sessionlist,
95  session_param_t **cursession,
96  channel_param_t **curchannel);
97 
109  target_param_t *target,
110  session_param_t *cursession,
111  channel_param_t *curchannel,
112  msgqueue_param_t **msgqueue);
113 
114 #endif /* !JPIP_PARSER_H_ */
imgreg_param::ox
int ox
frame size (fsiz)
Definition: imgreg_manager.h:39
enqueue_tileheader
void enqueue_tileheader(int tile_id, msgqueue_param_t *msgqueue)
enqueue tile headers data-bin into message queue
Definition: msgqueue_manager.c:165
query_param::ry
int ry
Definition: query_parser.h:51
cachemodel_param
Cache model parameters.
Definition: cachemodel_manager.h:37
session_param
Session parameters.
Definition: session_manager.h:38
delete_session
OPJ_BOOL delete_session(session_param_t **session, sessionlist_param_t *sessionlist)
delete a session
Definition: session_manager.c:126
search_target
target_param_t * search_target(const char targetname[], targetlist_param_t *targetlist)
search a target by target name
Definition: target_manager.c:224
auxtrans_param
auxiliary transport setting parameters
Definition: auxtrans_manager.h:38
query_param::metadata_only
OPJ_BOOL metadata_only
metadata-only request
Definition: query_parser.h:69
target_param::codeidx
index_param_t * codeidx
index information of codestream
Definition: target_manager.h:49
CODmarker_param::numOflayers
Byte2_t numOflayers
number of layers
Definition: index_manager.h:79
query_param::len
int len
maximum response length
Definition: query_parser.h:71
range_param::minvalue
Byte4_t minvalue
minimal value
Definition: index_manager.h:148
gene_target
target_param_t * gene_target(targetlist_param_t *targetlist, char *targetpath)
generate a target
Definition: target_manager.c:79
CODmarker_param::Scod
Byte_t Scod
Coding style for all components.
Definition: index_manager.h:77
logstream
#define logstream
Definition: jpip_parser.c:45
SIZmarker_param::XTnum
Byte4_t XTnum
number of tiles in horizontal direction
Definition: index_manager.h:66
close_channel
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
CODmarker_param::XPsiz
Byte4_t * XPsiz
dynamic array of precinct width at successive resolution level in order
Definition: index_manager.h:81
get_tile_Xrange
range_param_t get_tile_Xrange(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get horizontal range of the tile in reference grid
Definition: index_manager.c:729
channel_manager.h
query_param::fy
int fy
frame size (fx,fy)
Definition: query_parser.h:50
imgreg_manager.h
gene_channel
channel_param_t * gene_channel(query_param_t query_param, auxtrans_param_t auxtrans, cachemodel_param_t *cachemodel, channellist_param_t *channellist)
generate a channel under the channel list
Definition: channel_manager.c:60
sessionlist_param
Session list parameters.
Definition: session_manager.h:45
gene_JPIPstream
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
search_session_and_channel
OPJ_BOOL search_session_and_channel(char cid[], sessionlist_param_t *sessionlist, session_param_t **foundsession, channel_param_t **foundchannel)
search a channel and its belonging session by channel ID
Definition: session_manager.c:80
session_manager.h
SIZmarker_param::Xsiz
Byte4_t Xsiz
width of the reference grid
Definition: index_manager.h:58
query_param::return_type
image_return_t return_type
image return type
Definition: query_parser.h:70
query_param::cclose
char * cclose
list of closing channel identifiers, separated by '\0'
Definition: query_parser.h:58
index_param
index parameters
Definition: index_manager.h:86
get_nmax
Byte8_t get_nmax(faixbox_param_t *faix)
get nmax parameter value from faix box
Definition: faixbox_manager.c:163
get_tile_Yrange
range_param_t get_tile_Yrange(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get vertical range of the tile in reference grid
Definition: index_manager.c:735
gene_msgqueue
msgqueue_param_t * gene_msgqueue(OPJ_BOOL stateless, cachemodel_param_t *cachemodel)
generate message queue
Definition: msgqueue_manager.c:59
imgreg_param::oy
int oy
Definition: imgreg_manager.h:39
SIZmarker_param::Ysiz
Byte4_t Ysiz
height of the reference grid
Definition: index_manager.h:59
index_param::tilepart
faixbox_param_t * tilepart
tile part information from tpix box
Definition: index_manager.h:93
SIZmarker_param::XOsiz
Byte4_t XOsiz
horizontal offset from the origin of the reference grid to the left side of the image area
Definition: index_manager.h:60
query_param::lastcomp
int lastcomp
last component number
Definition: query_parser.h:53
cachemodel_param::jppstream
OPJ_BOOL jppstream
return type, true: JPP-stream, false: JPT-stream
Definition: cachemodel_manager.h:39
open_channel
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
gene_session
session_param_t * gene_session(sessionlist_param_t *sessionlist)
generate a session under the sesion list
Definition: session_manager.c:59
imgreg_param
image region parameters
Definition: imgreg_manager.h:35
search_channel
channel_param_t * search_channel(const char cid[], channellist_param_t *channellist)
search a channel by channel ID
Definition: channel_manager.c:173
imgreg_param::sx
int sx
offset (roff)
Definition: imgreg_manager.h:40
query_param::rw
int rw
Definition: query_parser.h:51
metadatalist_param
metadata-bin list parameters
Definition: metadata_manager.h:54
query_param::comps
OPJ_BOOL * comps
components (dynamic array) for jpp-stream, null means all components
Definition: query_parser.h:54
query_param::rh
int rh
roi region
Definition: query_parser.h:51
query_param::target
char * target
target name
Definition: query_parser.h:48
SIZmarker_param::YTnum
Byte4_t YTnum
number of tiles in vertical direction
Definition: index_manager.h:67
OPJ_BOOL
int OPJ_BOOL
Definition: openjpeg.h:116
enqueue_tile
void enqueue_tile(Byte4_t tile_id, int level, msgqueue_param_t *msgqueue)
enqueue tile data-bin into message queue
Definition: msgqueue_manager.c:198
SIZmarker_param::YOsiz
Byte4_t YOsiz
vertical offset from the origin of the reference grid to the top side of the image area
Definition: index_manager.h:61
index_param::COD
CODmarker_param_t COD
COD marker information.
Definition: index_manager.h:92
set_channel_variable_param
void set_channel_variable_param(query_param_t query_param, channel_param_t *channel)
set channel variable parameters
Definition: channel_manager.c:112
MAX_NUMOFBOX
#define MAX_NUMOFBOX
maximum number of meta request box
Definition: query_parser.h:38
target_manager.h
enqueue_precinct
void enqueue_precinct(int seq_id, int tile_id, int comp_id, int layers, msgqueue_param_t *msgqueue)
enqueue precinct data-bin into message queue
Definition: msgqueue_manager.c:256
query_param::box_type
char box_type[MAX_NUMOFBOX][4]
interested box-types
Definition: query_parser.h:60
enqueue_imagedata
void enqueue_imagedata(query_param_t query_param, msgqueue_param_t *msgqueue)
enqueue tiles or precincts into the message queue
Definition: jpip_parser.c:300
CODmarker_param::numOfdecomp
Byte_t numOfdecomp
number of decompositions levels
Definition: index_manager.h:80
imgreg_param::sy
int sy
Definition: imgreg_manager.h:40
msgqueue_manager.h
query_param::layers
int layers
quality layers
Definition: query_parser.h:52
query_param::cid
char * cid
channel identifier
Definition: query_parser.h:55
CODmarker_param::YPsiz
Byte4_t * YPsiz
dynamic array of precinct height at successive resolution level in order
Definition: index_manager.h:82
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:117
query_param::cnew
cnew_transport_t cnew
transport name if there is new channel request, else non
Definition: query_parser.h:57
msgqueue_param::cachemodel
cachemodel_param_t * cachemodel
reference cachemodel pointer
Definition: msgqueue_manager.h:67
enqueue_metadata
void enqueue_metadata(Byte8_t meta_id, msgqueue_param_t *msgqueue)
enqueue Metadata-bin into message queue
Definition: msgqueue_manager.c:323
cachemodel_param::target
target_param_t * target
reference pointer to the target
Definition: cachemodel_manager.h:38
Byte4_t
uint32_t Byte4_t
Definition: byte_manager.h:39
imgreg_param::level
int level
region size (rsiz)
Definition: imgreg_manager.h:41
enqueue_metabins
OPJ_BOOL enqueue_metabins(query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue)
enqueue metadata bins into the message queue
Definition: jpip_parser.c:488
map_viewin2imgreg
imgreg_param_t map_viewin2imgreg(const int fx, const int fy, const int rx, const int ry, const int rw, const int rh, const int XOsiz, const int YOsiz, const int Xsiz, const int Ysiz, const int numOfreslev)
map view-window requests to codestream image resolutions and regions
Definition: imgreg_manager.c:46
search_metadataidx
Byte8_t search_metadataidx(char boxtype[4], metadatalist_param_t *list)
search a metadata index by box-type
Definition: metadata_manager.c:223
get_tile_XSiz
Byte4_t get_tile_XSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get tile wdith at the decomposition level
Definition: index_manager.c:757
range_param::maxvalue
Byte4_t maxvalue
maximal value
Definition: index_manager.h:149
FCGI_stderr
#define FCGI_stderr
Definition: jpip_parser.c:44
index_param::SIZ
SIZmarker_param_t SIZ
SIZ marker information.
Definition: index_manager.h:91
channel_param::cachemodel
cachemodel_param_t * cachemodel
reference pointer to the cache model
Definition: channel_manager.h:44
delete_channel
void delete_channel(channel_param_t **channel, channellist_param_t *channellist)
delete a channel
Definition: channel_manager.c:121
SIZmarker_param::Csiz
Byte2_t Csiz
number of the components in the image
Definition: index_manager.h:68
open_channel
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
gene_cachemodel
cachemodel_param_t * gene_cachemodel(cachemodellist_param_t *cachemodellist, target_param_t *target, OPJ_BOOL reqJPP)
generate a cache model under a list
Definition: cachemodel_manager.c:60
close_channel
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
targetlist_param
Target list parameters.
Definition: target_manager.h:59
query_param::tid
char * tid
target identifier
Definition: query_parser.h:49
index_param::metadatalist
metadatalist_param_t * metadatalist
metadata-bin list
Definition: index_manager.h:87
associate_channel
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
range_param
1-dimensional range parameters
Definition: index_manager.h:147
enqueue_mainheader
void enqueue_mainheader(msgqueue_param_t *msgqueue)
enqueue main header data-bin into message queue
Definition: msgqueue_manager.c:135
query_param::numOfcclose
int numOfcclose
number of closing channels
Definition: query_parser.h:59
imgreg_param::xosiz
int xosiz
Definition: imgreg_manager.h:36
target_param
target parameters
Definition: target_manager.h:40
query_param
Query parameters.
Definition: query_parser.h:47
associate_channel
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
msgqueue_param
message queue parameters
Definition: msgqueue_manager.h:63
enqueue_precincts
void enqueue_precincts(int xmin, int xmax, int ymin, int ymax, int tile_id, int level, int lastcomp, OPJ_BOOL *comps, int layers, msgqueue_param_t *msgqueue)
enqueue precinct data-bins into the queue
Definition: jpip_parser.c:386
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:118
get_tile_YSiz
Byte4_t get_tile_YSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
Definition: index_manager.c:765
FCGI_stdout
#define FCGI_stdout
Definition: jpip_parser.c:43
JPPstream
@ JPPstream
Definition: query_parser.h:44
enqueue_allprecincts
void enqueue_allprecincts(int tile_id, int level, int lastcomp, OPJ_BOOL *comps, int layers, msgqueue_param_t *msgqueue)
enqueue all precincts inside a tile into the queue
Definition: jpip_parser.c:452
imgreg_param::yosiz
int yosiz
Definition: imgreg_manager.h:36
cachemodel_param::mhead_model
OPJ_BOOL mhead_model
main header model, if sent, 1, else 0
Definition: cachemodel_manager.h:40
identify_target
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
channel_param
Channel parameters.
Definition: channel_manager.h:43
Byte8_t
uint64_t Byte8_t
Definition: byte_manager.h:40
query_param::rx
int rx
Definition: query_parser.h:51
identify_target
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
query_param::fx
int fx
Definition: query_parser.h:50
search_targetBytid
target_param_t * search_targetBytid(const char tid[], targetlist_param_t *targetlist)
search a target by tid
Definition: target_manager.c:242
query_parser.h
gene_JPIPstream
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
jpip_parser.h
search_cachemodel
cachemodel_param_t * search_cachemodel(target_param_t *target, cachemodellist_param_t *cachemodellist)
search a cache model of a target
Definition: cachemodel_manager.c:160