Go to the documentation of this file.
32 #ifndef DEC_CLIENTMSG_HANDLER_H_
33 # define DEC_CLIENTMSG_HANDLER_H_
cache_param_t * search_cache(const char targetname[], cachelist_param_t *cachelist)
search a cache by target name
Definition: cache_manager.c:113
void add_cachecid(const char *cid, cache_param_t *cache)
add cid into a cache
Definition: cache_manager.c:193
void save_codestream(Byte_t *codestream, OPJ_SIZE_T streamlen, const char *fmt)
Definition: jpipstream_manager.c:58
void send_PNMstream(SOCKET connected_socket, Byte_t *pnmstream, unsigned int width, unsigned int height, unsigned int numofcomp, Byte_t maxval)
send PGM/PPM image stream to the client
Definition: imgsock_manager.c:176
uint8_t Byte_t
Definition: byte_manager.h:37
void handle_XMLreqMSG(SOCKET connected_socket, Byte_t *jpipstream, cachelist_param_t *cachelist)
handle XML request message
Definition: dec_clientmsg_handler.c:141
void send_TIDstream(SOCKET connected_socket, const char *tid, OPJ_SIZE_T tidlen)
send TID data stream to the client
Definition: imgsock_manager.c:157
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
void handle_dstCIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle distroy ChannelID message
Definition: dec_clientmsg_handler.c:203
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
void handle_CIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle ChannelID request message
Definition: dec_clientmsg_handler.c:183
cache_param_t * search_cacheBycid(const char cid[], cachelist_param_t *cachelist)
search a cache by cid
Definition: cache_manager.c:151
char * tid
taregt identifier
Definition: cache_manager.h:40
int numOfcid
number of cids
Definition: cache_manager.h:43
char ** cid
dynamic array of channel identifiers
Definition: cache_manager.h:42
void handle_CIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle ChannelID request message
Definition: dec_clientmsg_handler.c:183
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
Byte_t * update_JPIPstream(Byte_t *newstream, OPJ_SIZE_T newstreamlen, Byte_t *cache_stream, OPJ_SIZE_T *streamlen)
Definition: jpipstream_manager.c:41
Byte_t bpc
bits per component
Definition: ihdrbox_manager.h:43
cache parameters
Definition: cache_manager.h:38
int SOCKET
Definition: sock_manager.h:40
size_t OPJ_SIZE_T
Definition: openjpeg.h:139
void handle_TIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle TargetID request message
Definition: dec_clientmsg_handler.c:165
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
void remove_cachecid(const char *cid, cachelist_param_t *cachelist)
remove cid in cache
Definition: cache_manager.c:225
Byte_t * receive_JPIPstream(SOCKET connected_socket, char **target, char **tid, char **cid, OPJ_SIZE_T *streamlen)
receive a JPT- JPP- stream from client
Definition: imgsock_manager.c:67
void handle_dstCIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle distroy ChannelID message
Definition: dec_clientmsg_handler.c:203
Definition: metadata_manager.h:37
OPJ_SIZE_T receive_line(SOCKET connected_socket, char *p)
receive a string line (ending with ' ') from client
Definition: sock_manager.c:142
Byte4_t width
Definition: ihdrbox_manager.h:41
void handle_TIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist)
handle TargetID request message
Definition: dec_clientmsg_handler.c:165
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 insert_cache_into_list(cache_param_t *cache, cachelist_param_t *cachelist)
insert a cache into list
Definition: cache_manager.c:103
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
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
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
void send_SIZstream(SOCKET connected_socket, unsigned int width, unsigned int height)
send SIZ data stream to the client
Definition: imgsock_manager.c:196
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
message_param_t * last
last message pointer of the list
Definition: msgqueue_manager.h:65
Byte8_t csn
index of the codestream
Definition: msgqueue_manager.h:53
char * receive_string(SOCKET connected_socket)
receive a string line (ending with ' ') from client, return malloc string
Definition: sock_manager.c:169
cache_param_t * search_cacheBytid(const char tid[], cachelist_param_t *cachelist)
search a cache by tid
Definition: cache_manager.c:173
cache_param_t * gene_cache(const char *targetname, int csn, char *tid, char *cid)
generate a cache
Definition: cache_manager.c:61
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
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
void send_XMLstream(SOCKET connected_socket, Byte_t *xmlstream, OPJ_SIZE_T length)
send XML data stream to the client
Definition: imgsock_manager.c:134
void update_cachetid(const char *tid, cache_param_t *cache)
update tid of a cache
Definition: cache_manager.c:210
ihdrbox_param_t * get_SIZ_from_jpipstream(Byte_t *jpipstream, msgqueue_param_t *msgqueue, Byte8_t csn)
Definition: jpipstream_manager.c:116
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
void handle_XMLreqMSG(SOCKET connected_socket, Byte_t *jpipstream, cachelist_param_t *cachelist)
handle XML request message
Definition: dec_clientmsg_handler.c:141
message queue parameters
Definition: msgqueue_manager.h:63
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
Byte8_t length
length of the box contents
Definition: metadata_manager.h:39
ihdrbox_param_t * ihdrbox
ihdrbox
Definition: cache_manager.h:45
I.5.3.1 Image Header box.
Definition: ihdrbox_manager.h:39
void response_signal(SOCKET connected_socket, OPJ_BOOL succeed)
send response signal to the client
Definition: imgsock_manager.c:214
uint64_t Byte8_t
Definition: byte_manager.h:40
cache_param_t * search_cacheBycsn(int csn, cachelist_param_t *cachelist)
search a cache by csn
Definition: cache_manager.c:135
Byte_t * jpipstream_to_pnm(Byte_t *jpipstream, msgqueue_param_t *msgqueue, Byte8_t csn, int fw, int fh, ihdrbox_param_t **ihdrbox)
Definition: jpipstream_manager.c:80
void send_CIDstream(SOCKET connected_socket, const char *cid, OPJ_SIZE_T cidlen)
send CID data stream to the client
Definition: imgsock_manager.c:152
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
metadatalist_param_t * metadatalist
metadata-bin list
Definition: cache_manager.h:44
Byte2_t nc
number of components
Definition: ihdrbox_manager.h:42
int csn
codestream number
Definition: cache_manager.h:41