OpenJPEG  2.4.0
Macros | Functions
jpip_parser.c File Reference
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "jpip_parser.h"
#include "channel_manager.h"
#include "imgreg_manager.h"

Macros

#define FCGI_stdout   stdout
 
#define FCGI_stderr   stderr
 
#define logstream   stderr
 

Functions

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. More...
 
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. More...
 
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. More...
 
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) More...
 
void enqueue_imagedata (query_param_t query_param, msgqueue_param_t *msgqueue)
 enqueue tiles or precincts into the message queue More...
 
OPJ_BOOL enqueue_metabins (query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue)
 enqueue metadata bins into the message queue More...
 
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) More...
 
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 More...
 
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 More...
 

Macro Definition Documentation

#define FCGI_stderr   stderr

Referenced by associate_channel().

#define FCGI_stdout   stdout
#define logstream   stderr

Referenced by close_channel().

Function Documentation

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.

Parameters
[in]query_paramstructured query
[in]sessionlistsession list pointer
[out]cursessionaddress of the associated session pointer
[out]curchanneladdress of the associated channel pointer
Returns
if succeeded (true) or failed (false)

References query_param::cid, query_param::cnew, FCGI_stderr, OPJ_FALSE, OPJ_TRUE, search_session_and_channel(), and set_channel_variable_param().

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)

Parameters
[in]query_paramstructured query
[in]sessionlistsession list pointer
[in,out]cursessionaddress of the session pointer of deleting channel
[in,out]curchanneladdress of the deleting channel pointer
Returns
if succeeded (true) or failed (false)

References query_param::cclose, delete_channel(), delete_session(), enqueue_imagedata(), enqueue_metabins(), FCGI_stdout, logstream, query_param::numOfcclose, OPJ_FALSE, OPJ_TRUE, search_channel(), and search_session_and_channel().

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

Parameters
[in]tile_idtile index
[in]leveldecomposition level
[in]lastcomplast component number
[in]compspointer to the array that stores the requested components
[in]layersnumber of quality layers
[in]msgqueuemessage queue
Returns

References msgqueue_param::cachemodel, index_param::COD, target_param::codeidx, SIZmarker_param::Csiz, enqueue_precinct(), get_tile_XSiz(), get_tile_YSiz(), CODmarker_param::numOfdecomp, CODmarker_param::Scod, index_param::SIZ, cachemodel_param::target, CODmarker_param::XPsiz, and CODmarker_param::YPsiz.

Referenced by enqueue_imagedata(), and gene_JPIPstream().

void enqueue_imagedata ( query_param_t  query_param,
msgqueue_param_t msgqueue 
)
OPJ_BOOL enqueue_metabins ( query_param_t  query_param,
metadatalist_param_t metadatalist,
msgqueue_param_t msgqueue 
)

enqueue metadata bins into the message queue

Parameters
[in]query_paramstructured query
[in]metadatalistpointer to metadata bin list
[in,out]msgqueuemessage queue pointer
Returns
if succeeded (true) or failed (false)

References query_param::box_type, enqueue_metadata(), FCGI_stdout, MAX_NUMOFBOX, OPJ_FALSE, OPJ_TRUE, and search_metadataidx().

Referenced by close_channel(), and gene_JPIPstream().

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

Parameters
[in]xminmin x coordinate in the tile at the decomposition level
[in]xmaxmax x coordinate in the tile at the decomposition level
[in]yminmin y coordinate in the tile at the decomposition level
[in]ymaxmax y coordinate in the tile at the decomposition level
[in]tile_idtile index
[in]leveldecomposition level
[in]lastcomplast component number
[in]compspointer to the array that stores the requested components
[in]layersnumber of quality layers
[in]msgqueuemessage queue
Returns

References msgqueue_param::cachemodel, index_param::COD, target_param::codeidx, SIZmarker_param::Csiz, enqueue_precinct(), get_tile_XSiz(), get_tile_YSiz(), CODmarker_param::numOfdecomp, CODmarker_param::Scod, index_param::SIZ, cachemodel_param::target, CODmarker_param::XPsiz, and CODmarker_param::YPsiz.

Referenced by enqueue_imagedata(), and 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)

Parameters
[in]query_paramstructured query
[in]targetrequested target pointer
[in,out]cursessionassociated session pointer
[in,out]curchannelassociated channel pointer
[out]msgqueueaddress of the message queue pointer
Returns
if succeeded (true) or failed (false)

References query_param::box_type, channel_param::cachemodel, index_param::COD, target_param::codeidx, enqueue_allprecincts(), enqueue_imagedata(), enqueue_mainheader(), enqueue_metabins(), enqueue_precincts(), FCGI_stdout, query_param::fx, query_param::fy, gene_cachemodel(), gene_msgqueue(), cachemodel_param::jppstream, JPPstream, query_param::layers, query_param::len, query_param::metadata_only, index_param::metadatalist, cachemodel_param::mhead_model, CODmarker_param::numOflayers, OPJ_FALSE, OPJ_TRUE, query_param::return_type, and cachemodel_param::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.

Parameters
[in]query_paramstructured query
[in]targetlisttarget list pointer
[out]targetaddress of target pointer
Returns
if succeeded (true) or failed (false)

References query_param::cid, FCGI_stdout, gene_target(), OPJ_FALSE, OPJ_TRUE, search_target(), search_targetBytid(), query_param::target, and query_param::tid.

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.

Parameters
[in]query_paramstructured query
[in]sessionlistsession list pointer
[in]auxtransauxiliary transport
[in]targetrequested target pointer
[in,out]cursessionaddress of the associated/opened session pointer
[in,out]curchanneladdress of the associated/opened channel pointer
Returns
if succeeded (true) or failed (false)

References gene_cachemodel(), gene_channel(), gene_session(), JPPstream, OPJ_FALSE, OPJ_TRUE, query_param::return_type, and search_cachemodel().