Go to the documentation of this file.
32 #ifndef MSGQUEUE_MANAGER_H_
33 # define MSGQUEUE_MANAGER_H_
39 #define PRECINCT_MSG 0
40 #define EXT_PRECINCT_MSG 1
41 #define TILE_HEADER_MSG 2
43 #define EXT_TILE_MSG 5
44 #define MAINHEADER_MSG 6
45 #define METADATA_MSG 8
#define METADATA_MSG
Definition: msgqueue_manager.h:45
void enqueue_tileheader(int tile_id, msgqueue_param_t *msgqueue)
enqueue tile headers data-bin into message queue
Definition: msgqueue_manager.c:165
Cache model parameters.
Definition: cachemodel_manager.h:37
OPJ_BOOL ** pp_model
dynamic array pointer of precint packet model
Definition: cachemodel_manager.h:43
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
Byte8_t comp_precinct_id(int t, int c, int s, int num_components, int num_tiles)
compute precinct ID A.3.2.1
Definition: msgqueue_manager.c:311
struct box_param * next
pointer to the next box
Definition: box_manager.h:43
#define TILE_MSG
Definition: msgqueue_manager.h:42
void add_bigendian_bytestream(Byte8_t code, int bytelength, int tmpfd)
Definition: msgqueue_manager.c:589
index_param_t * codeidx
index information of codestream
Definition: target_manager.h:49
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
void recons_stream_from_msgqueue(msgqueue_param_t *msgqueue, int tmpfd)
reconstruct JPT/JPP-stream from message queue
Definition: msgqueue_manager.c:443
void delete_message_in_msgqueue(message_param_t **message, msgqueue_param_t *msgqueue)
delete a message in msgqueue
Definition: msgqueue_manager.c:795
Byte2_t numOflayers
number of layers
Definition: index_manager.h:79
void delete_message_in_msgqueue(message_param_t **msg, msgqueue_param_t *msgqueue)
delete a message in msgqueue
Definition: msgqueue_manager.c:795
void delete_cachemodel(cachemodel_param_t **cachemodel)
delete a cache model
Definition: cachemodel_manager.c:191
int csn
codestream number
Definition: target_manager.h:47
Byte_t OrigBHlen
length of OrigBH
Definition: placeholder_manager.h:45
OPJ_OFF_T offset
byte position of the whole Box (LBox) in the file
Definition: box_manager.h:39
Byte4_t XTnum
number of tiles in horizontal direction
Definition: index_manager.h:66
Byte4_t big4(Byte_t *buf)
convert 4-byte big endian Byte codes to number
Definition: byte_manager.c:147
#define logstream
Definition: msgqueue_manager.c:56
#define EXT_TILE_MSG
Definition: msgqueue_manager.h:43
A.3.6.3 Placeholder box format.
Definition: placeholder_manager.h:39
uint8_t Byte_t
Definition: byte_manager.h:37
void delete_msgqueue(msgqueue_param_t **msgqueue)
delete message queue
Definition: msgqueue_manager.c:75
OPJ_OFF_T offset
codestream offset
Definition: index_manager.h:88
void print_msgqueue(msgqueue_param_t *msgqueue)
print message queue
Definition: msgqueue_manager.c:97
OPJ_BOOL stateless
if this is a stateless message queue
Definition: msgqueue_manager.h:66
#define PRECINCT_MSG
Definition: msgqueue_manager.h:39
int64_t OPJ_OFF_T
Definition: openjpeg.h:136
OPJ_OFF_T offset
byte position of the box contents in the file
Definition: metadata_manager.h:38
box parameters
Definition: box_manager.h:37
index parameters
Definition: index_manager.h:86
fragment array index box parameters
Definition: faixbox_manager.h:77
Byte8_t get_nmax(faixbox_param_t *faix)
get nmax parameter value from faix box
Definition: faixbox_manager.c:163
msgqueue_param_t * gene_msgqueue(OPJ_BOOL stateless, cachemodel_param_t *cachemodel)
generate message queue
Definition: msgqueue_manager.c:59
void add_vbas_stream(Byte8_t code, int tmpfd)
Definition: msgqueue_manager.c:521
Byte8_t comp_precinct_id(int t, int c, int s, int num_components, int num_tiles)
compute precinct ID A.3.2.1
Definition: msgqueue_manager.c:311
void enqueue_box(Byte8_t meta_id, boxlist_param_t *boxlist, msgqueue_param_t *msgqueue, Byte8_t *binOffset)
Definition: msgqueue_manager.c:356
void add_body_stream(message_param_t *msg, int fd, int tmpfd)
Definition: msgqueue_manager.c:554
void add_placeholder_stream(placeholder_param_t *phld, int tmpfd)
Definition: msgqueue_manager.c:573
faixbox_param_t * tilepart
tile part information from tpix box
Definition: index_manager.h:93
Byte8_t OrigID
Definition: placeholder_manager.h:43
void print_placeholder(placeholder_param_t *phld)
print placeholder parameters
Definition: placeholder_manager.c:115
OPJ_BOOL last_byte
if message contains the last byte of the data-bin
Definition: msgqueue_manager.h:50
Byte8_t length
message byte length
Definition: msgqueue_manager.h:55
void enqueue_message(message_param_t *msg, msgqueue_param_t *msgqueue)
Definition: msgqueue_manager.c:426
void enqueue_mainheader(msgqueue_param_t *msgqueue)
enqueue main header data-bin into message queue
Definition: msgqueue_manager.c:135
Byte4_t YTnum
number of tiles in vertical direction
Definition: index_manager.h:67
int OPJ_BOOL
Definition: openjpeg.h:116
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
#define FCGI_stderr
Definition: msgqueue_manager.c:55
CODmarker_param_t COD
COD marker information.
Definition: index_manager.h:92
Byte8_t bin_offset
offset of the data in this message from the start of the data-bin
Definition: msgqueue_manager.h:54
void enqueue_tileheader(int tile_id, msgqueue_param_t *msgqueue)
enqueue tile headers data-bin into message queue
Definition: msgqueue_manager.c:165
Byte8_t get_elemOff(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id)
get offset of a element from faix box
Definition: faixbox_manager.c:181
Byte8_t get_elemLen(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id)
get length of a element from faix box
Definition: faixbox_manager.c:192
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
message parameters
Definition: msgqueue_manager.h:48
boxlist_param_t * gene_boxlist(void)
generate a box list
Definition: box_manager.c:48
Byte_t * parse_vbas(Byte_t *streamptr, Byte8_t *elem)
Definition: msgqueue_manager.c:780
void enqueue_boxcontents(Byte8_t meta_id, boxcontents_param_t *boxcontents, msgqueue_param_t *msgqueue, Byte8_t *binOffset)
Definition: msgqueue_manager.c:392
Definition: metadata_manager.h:37
msgqueue_param_t * gene_msgqueue(OPJ_BOOL stateless, cachemodel_param_t *cachemodel)
generate message queue
Definition: msgqueue_manager.c:59
struct placeholder_param * next
pointer to the next placeholder
Definition: placeholder_manager.h:53
box_param_t * gene_boxbyOffinStream(Byte_t *stream, OPJ_OFF_T offset)
generate box from code stream (JPP or JPT stream) at the given offset
Definition: box_manager.c:138
void enqueue_phld(Byte8_t meta_id, placeholderlist_param_t *phldlist, msgqueue_param_t *msgqueue, Byte8_t *binOffset)
Definition: msgqueue_manager.c:374
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
struct message_param * next
pointer to the next message
Definition: msgqueue_manager.h:59
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
placeholder_param_t * first
first placeholder pointer of the list
Definition: placeholder_manager.h:59
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
void insert_placeholder_into_list(placeholder_param_t *phld, placeholderlist_param_t *phldlist)
Definition: placeholder_manager.c:104
cachemodel_param_t * cachemodel
reference cachemodel pointer
Definition: msgqueue_manager.h:67
void enqueue_metadata(Byte8_t meta_id, msgqueue_param_t *msgqueue)
enqueue Metadata-bin into message queue
Definition: msgqueue_manager.c:323
mhixbox_param_t ** tileheader
dynamic array of tile header information from thix box
Definition: index_manager.h:95
target_param_t * target
reference pointer to the target
Definition: cachemodel_manager.h:38
uint32_t Byte4_t
Definition: byte_manager.h:39
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
Byte8_t get_m(faixbox_param_t *faix)
get m parameter value from faix box
Definition: faixbox_manager.c:172
void add_bin_id_vbas_stream(Byte_t bb, Byte_t c, Byte8_t in_class_id, int tmpfd)
Definition: msgqueue_manager.c:501
OPJ_OFF_T res_offset
offset in the resource
Definition: msgqueue_manager.h:57
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
OPJ_BOOL * tp_model
dynamic array pointer of tile part model, if sent, 1, else 0
Definition: cachemodel_manager.h:41
placeholder_param_t * parse_phld(Byte_t *datastream, Byte8_t metalength)
Definition: msgqueue_manager.c:741
OPJ_BOOL * th_model
dynamic array pointer of tile header model
Definition: cachemodel_manager.h:42
Byte8_t length
length of the whole Box
Definition: box_manager.h:41
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
Byte8_t in_class_id
in-class identifier A.2.3
Definition: msgqueue_manager.h:51
Byte8_t aux
Definition: msgqueue_manager.h:56
void recons_stream_from_msgqueue(msgqueue_param_t *msgqueue, int tmpfd)
reconstruct JPT/JPP-stream from message queue
Definition: msgqueue_manager.c:443
message_param_t * last
last message pointer of the list
Definition: msgqueue_manager.h:65
char TBox[4]
Definition: placeholder_manager.h:41
Byte8_t csn
index of the codestream
Definition: msgqueue_manager.h:53
struct message_param message_param_t
message parameters
void parse_metadata(metadata_param_t *metadata, message_param_t *msg, Byte_t *stream)
Definition: msgqueue_manager.c:710
void insert_box_into_list(box_param_t *box, boxlist_param_t *boxlist)
insert a box into list
Definition: box_manager.c:440
SIZmarker_param_t SIZ
SIZ marker information.
Definition: index_manager.h:91
Byte8_t big8(Byte_t *buf)
convert 8-byte big endian Byte codes to number
Definition: byte_manager.c:153
Byte2_t Csiz
number of the components in the image
Definition: index_manager.h:68
Byte4_t LBox
Definition: placeholder_manager.h:40
metadatalist_param_t * metadatalist
metadata-bin list
Definition: index_manager.h:87
void print_binarycode(Byte8_t n, int segmentlen)
Definition: msgqueue_manager.c:605
#define MAINHEADER_MSG
Definition: msgqueue_manager.h:44
Byte8_t tlen
length ( total length of the main
Definition: mhixbox_manager.h:53
placeholderlist_param_t * gene_placeholderlist(void)
generate a placeholder list
Definition: placeholder_manager.c:48
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
Byte_t * parse_bin_id_vbas(Byte_t *streamptr, Byte_t *bb, Byte_t *c, Byte8_t *in_class_id)
Definition: msgqueue_manager.c:759
Byte8_t class_id
class identifiers
Definition: msgqueue_manager.h:52
struct msgqueue_param msgqueue_param_t
message queue parameters
void enqueue_mainheader(msgqueue_param_t *msgqueue)
enqueue main header data-bin into message queue
Definition: msgqueue_manager.c:135
int fd
file descriptor
Definition: target_manager.h:43
target parameters
Definition: target_manager.h:40
message queue parameters
Definition: msgqueue_manager.h:63
void enqueue_metadata(Byte8_t meta_id, msgqueue_param_t *msgqueue)
enqueue Metadata-bin into message queue
Definition: msgqueue_manager.c:323
Box list parameters.
Definition: box_manager.h:48
faixbox_param_t ** precpacket
dynamic array of precint packet information from ppix box
Definition: index_manager.h:97
placeholder box list parameters
Definition: placeholder_manager.h:58
Byte8_t length
length of the box contents
Definition: metadata_manager.h:39
placeholder_param_t * phld
placeholder pointer in index
Definition: msgqueue_manager.h:58
#define OPJ_FALSE
Definition: openjpeg.h:118
box_param_t * first
first box pointer of the list
Definition: box_manager.h:49
OPJ_BOOL mhead_model
main header model, if sent, 1, else 0
Definition: cachemodel_manager.h:40
Byte8_t mhead_length
main header length
Definition: index_manager.h:90
uint64_t Byte8_t
Definition: byte_manager.h:40
Byte4_t Flags
Definition: placeholder_manager.h:42
#define TILE_HEADER_MSG
Definition: msgqueue_manager.h:41
Byte_t * OrigBH
dynamic memory pointer
Definition: placeholder_manager.h:44
message_param_t * gene_metamsg(Byte8_t meta_id, Byte8_t binoffset, Byte8_t length, OPJ_OFF_T res_offset, placeholder_param_t *phld, Byte8_t csn)
Definition: msgqueue_manager.c:405
message_param_t * first
first message pointer of the list
Definition: msgqueue_manager.h:64
void delete_msgqueue(msgqueue_param_t **msgqueue)
delete message queue
Definition: msgqueue_manager.c:75
void add_vbas_with_bytelen_stream(Byte8_t code, int bytelength, int tmpfd)
Definition: msgqueue_manager.c:535
void print_msgqueue(msgqueue_param_t *msgqueue)
print message queue
Definition: msgqueue_manager.c:97