trying to track issue with msgqueue_manager on win32. Use C-style comments
This commit is contained in:
parent
6dd7da0e05
commit
baf01b98fd
|
@ -33,12 +33,12 @@
|
|||
|
||||
#include "sock_manager.h"
|
||||
|
||||
//! auxiliary transport setting parameters
|
||||
/** auxiliary transport setting parameters*/
|
||||
typedef struct auxtrans_param{
|
||||
int tcpauxport; //!< tcp port
|
||||
int udpauxport; //!< udp port
|
||||
SOCKET tcplistensock; //!< listenning socket for aux tcp (-1 if not open)
|
||||
SOCKET udplistensock; //!< listenning socket for aux udp (-1 if not open)
|
||||
int tcpauxport; /**< tcp port*/
|
||||
int udpauxport; /**< udp port*/
|
||||
SOCKET tcplistensock; /**< listenning socket for aux tcp (-1 if not open)*/
|
||||
SOCKET udplistensock; /**< listenning socket for aux udp (-1 if not open)*/
|
||||
} auxtrans_param_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,21 +33,21 @@
|
|||
|
||||
#include "byte_manager.h"
|
||||
|
||||
//! box parameters
|
||||
/** box parameters*/
|
||||
typedef struct box_param{
|
||||
int fd; //!< file descriptor
|
||||
Byte8_t offset; //!< byte position of the whole Box (LBox) in the file
|
||||
Byte_t headlen; //!< header length 8 or 16
|
||||
Byte8_t length; //!< length of the whole Box
|
||||
char type[4]; //!< type of information in the DBox
|
||||
struct box_param *next; //!< pointer to the next box
|
||||
int fd; /**< file descriptor*/
|
||||
Byte8_t offset; /**< byte position of the whole Box (LBox) in the file*/
|
||||
Byte_t headlen; /**< header length 8 or 16*/
|
||||
Byte8_t length; /**< length of the whole Box*/
|
||||
char type[4]; /**< type of information in the DBox*/
|
||||
struct box_param *next; /**< pointer to the next box*/
|
||||
} box_param_t;
|
||||
|
||||
|
||||
//! Box list parameters
|
||||
/** Box list parameters*/
|
||||
typedef struct boxlist_param{
|
||||
box_param_t *first; //!< first box pointer of the list
|
||||
box_param_t *last; //!< last box pointer of the list
|
||||
box_param_t *first; /**< first box pointer of the list*/
|
||||
box_param_t *last; /**< last box pointer of the list*/
|
||||
} boxlist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -31,16 +31,16 @@
|
|||
#ifndef BYTE_MANAGER_H_
|
||||
# define BYTE_MANAGER_H_
|
||||
|
||||
//! 1Byte parameter type
|
||||
/** 1Byte parameter type*/
|
||||
typedef unsigned char Byte_t;
|
||||
|
||||
//! 2Byte parameter type
|
||||
/** 2Byte parameter type*/
|
||||
typedef unsigned short int Byte2_t;
|
||||
|
||||
//! 4Byte parameter type
|
||||
/** 4Byte parameter type*/
|
||||
typedef unsigned int Byte4_t;
|
||||
|
||||
//! 8Byte parameter type
|
||||
/** 8Byte parameter type*/
|
||||
typedef unsigned long long int Byte8_t;
|
||||
|
||||
|
||||
|
|
|
@ -34,22 +34,22 @@
|
|||
#include "metadata_manager.h"
|
||||
#include "ihdrbox_manager.h"
|
||||
|
||||
//! cache parameters
|
||||
/** cache parameters*/
|
||||
typedef struct cache_param{
|
||||
char *filename; //!< file name
|
||||
char *tid; //!< taregt identifier
|
||||
int csn; //!< codestream number
|
||||
char **cid; //!< dynamic array of channel identifiers
|
||||
int numOfcid; //!< number of cids
|
||||
metadatalist_param_t *metadatalist; //!< metadata-bin list
|
||||
ihdrbox_param_t *ihdrbox; //!< ihdrbox
|
||||
struct cache_param *next; //!< pointer to the next cache
|
||||
char *filename; /**< file name*/
|
||||
char *tid; /**< taregt identifier*/
|
||||
int csn; /**< codestream number*/
|
||||
char **cid; /**< dynamic array of channel identifiers*/
|
||||
int numOfcid; /**< number of cids*/
|
||||
metadatalist_param_t *metadatalist; /**< metadata-bin list*/
|
||||
ihdrbox_param_t *ihdrbox; /**< ihdrbox*/
|
||||
struct cache_param *next; /**< pointer to the next cache*/
|
||||
} cache_param_t;
|
||||
|
||||
//!< cache list parameters
|
||||
/**< cache list parameters*/
|
||||
typedef struct cachelist_param{
|
||||
cache_param_t *first; //!< first cache pointer of the list
|
||||
cache_param_t *last; //!< last cache pointer of the list
|
||||
cache_param_t *first; /**< first cache pointer of the list*/
|
||||
cache_param_t *last; /**< last cache pointer of the list*/
|
||||
} cachelist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -34,21 +34,21 @@
|
|||
#include "bool.h"
|
||||
#include "target_manager.h"
|
||||
|
||||
//! Cache model parameters
|
||||
/** Cache model parameters*/
|
||||
typedef struct cachemodel_param{
|
||||
target_param_t *target; //!< reference pointer to the target
|
||||
bool jppstream; //!< return type, true: JPP-stream, false: JPT-stream
|
||||
bool mhead_model; //!< main header model, if sent, 1, else 0
|
||||
bool *tp_model; //!< dynamic array pointer of tile part model, if sent, 1, else 0
|
||||
bool *th_model; //!< dynamic array pointer of tile header model
|
||||
bool **pp_model; //!< dynamic array pointer of precint packet model
|
||||
struct cachemodel_param *next; //!< pointer to the next cache model
|
||||
target_param_t *target; /**< reference pointer to the target*/
|
||||
bool jppstream; /**< return type, true: JPP-stream, false: JPT-stream*/
|
||||
bool mhead_model; /**< main header model, if sent, 1, else 0*/
|
||||
bool *tp_model; /**< dynamic array pointer of tile part model, if sent, 1, else 0*/
|
||||
bool *th_model; /**< dynamic array pointer of tile header model*/
|
||||
bool **pp_model; /**< dynamic array pointer of precint packet model*/
|
||||
struct cachemodel_param *next; /**< pointer to the next cache model*/
|
||||
} cachemodel_param_t;
|
||||
|
||||
//! Cache model list parameters
|
||||
/** Cache model list parameters*/
|
||||
typedef struct cachemodellist_param{
|
||||
cachemodel_param_t *first; //!< first cache model pointer of the list
|
||||
cachemodel_param_t *last; //!< last cache model pointer of the list
|
||||
cachemodel_param_t *first; /**< first cache model pointer of the list*/
|
||||
cachemodel_param_t *last; /**< last cache model pointer of the list*/
|
||||
} cachemodellist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -36,24 +36,24 @@
|
|||
#include "cachemodel_manager.h"
|
||||
#include "auxtrans_manager.h"
|
||||
|
||||
//! maximum length of channel identifier
|
||||
/** maximum length of channel identifier*/
|
||||
#define MAX_LENOFCID 30
|
||||
|
||||
//! Channel parameters
|
||||
/** Channel parameters*/
|
||||
typedef struct channel_param{
|
||||
cachemodel_param_t *cachemodel; //!< reference pointer to the cache model
|
||||
char cid[MAX_LENOFCID]; //!< channel identifier
|
||||
cnew_transport_t aux; //!< auxiliary transport
|
||||
// - a record of the client's capabilities and preferences to the extent that the server queues requests
|
||||
time_t start_tm; //!< starting time
|
||||
struct channel_param *next; //!< pointer to the next channel
|
||||
cachemodel_param_t *cachemodel; /**< reference pointer to the cache model*/
|
||||
char cid[MAX_LENOFCID]; /**< channel identifier*/
|
||||
cnew_transport_t aux; /**< auxiliary transport*/
|
||||
/* - a record of the client's capabilities and preferences to the extent that the server queues requests*/
|
||||
time_t start_tm; /**< starting time*/
|
||||
struct channel_param *next; /**< pointer to the next channel*/
|
||||
} channel_param_t;
|
||||
|
||||
|
||||
//! Channel list parameters
|
||||
/** Channel list parameters*/
|
||||
typedef struct channellist_param{
|
||||
channel_param_t *first; //!< first channel pointer of the list
|
||||
channel_param_t *last; //!< last channel pointer of the list
|
||||
channel_param_t *first; /**< first channel pointer of the list*/
|
||||
channel_param_t *last; /**< last channel pointer of the list*/
|
||||
} channellist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -34,47 +34,47 @@
|
|||
#include "byte_manager.h"
|
||||
#include "box_manager.h"
|
||||
|
||||
//! 4byte parameters of a faix element
|
||||
/** 4byte parameters of a faix element*/
|
||||
typedef struct faixelem4_param{
|
||||
Byte4_t off; //!< offset
|
||||
Byte4_t len; //!< length
|
||||
Byte4_t off; /**< offset*/
|
||||
Byte4_t len; /**< length*/
|
||||
} faixelem4_param_t;
|
||||
|
||||
//! 8byte parameters of a faix element
|
||||
/** 8byte parameters of a faix element*/
|
||||
typedef struct faixelem8_param{
|
||||
Byte8_t off; //!< offset
|
||||
Byte8_t len; //!< length
|
||||
Byte8_t off; /**< offset*/
|
||||
Byte8_t len; /**< length*/
|
||||
} faixelem8_param_t;
|
||||
|
||||
//! 4byte parameters of fragment array index box
|
||||
/** 4byte parameters of fragment array index box*/
|
||||
typedef struct subfaixbox4_param{
|
||||
Byte4_t nmax; //!< maximum number of valid elements in any row of the array
|
||||
Byte4_t m; //!< number of raws of the array
|
||||
faixelem4_param_t *elem; //!< dynamic array pointer of faix elements
|
||||
Byte4_t *aux; //!< dynamic array pointer of auxiliary
|
||||
//!info in each element for version 2 or 3
|
||||
Byte4_t nmax; /**< maximum number of valid elements in any row of the array*/
|
||||
Byte4_t m; /**< number of raws of the array*/
|
||||
faixelem4_param_t *elem; /**< dynamic array pointer of faix elements*/
|
||||
Byte4_t *aux; /**< dynamic array pointer of auxiliary*/
|
||||
/**info in each element for version 2 or 3*/
|
||||
} subfaixbox4_param_t;
|
||||
|
||||
//! 8byte parameters of fragment array index box
|
||||
/** 8byte parameters of fragment array index box*/
|
||||
typedef struct subfaixbox8_param{
|
||||
Byte8_t nmax; //!< maximum number of valid elements in any row of the array
|
||||
Byte8_t m; //!< number of raws of the array
|
||||
faixelem8_param_t *elem; //!< dynamic array pointer of faix elements
|
||||
Byte4_t *aux; //!< dynamic array pointer of auxiliary
|
||||
//!info in each element for version 2 or 3
|
||||
Byte8_t nmax; /**< maximum number of valid elements in any row of the array*/
|
||||
Byte8_t m; /**< number of raws of the array*/
|
||||
faixelem8_param_t *elem; /**< dynamic array pointer of faix elements*/
|
||||
Byte4_t *aux; /**< dynamic array pointer of auxiliary*/
|
||||
/**info in each element for version 2 or 3*/
|
||||
} subfaixbox8_param_t;
|
||||
|
||||
//! variable sized parameters in fragment array index box
|
||||
/** variable sized parameters in fragment array index box*/
|
||||
typedef union subfaixbox_param{
|
||||
subfaixbox4_param_t *byte4_params; //!< parameters with 4byte codes for version 0 or 2
|
||||
subfaixbox8_param_t *byte8_params; //!< parameters with 8byte codes for version 1 or 3
|
||||
subfaixbox4_param_t *byte4_params; /**< parameters with 4byte codes for version 0 or 2*/
|
||||
subfaixbox8_param_t *byte8_params; /**< parameters with 8byte codes for version 1 or 3*/
|
||||
} subfaixbox_param_t;
|
||||
|
||||
//! fragment array index box parameters
|
||||
//! I.3.2.4.2 Fragment Array Index box
|
||||
/** fragment array index box parameters*/
|
||||
/** I.3.2.4.2 Fragment Array Index box*/
|
||||
typedef struct faixbox_param{
|
||||
Byte_t version; //!< Refer to the Table I.3 - Version values
|
||||
subfaixbox_param_t subfaixbox; //!< rest information in faixbox
|
||||
Byte_t version; /**< Refer to the Table I.3 - Version values*/
|
||||
subfaixbox_param_t subfaixbox; /**< rest information in faixbox*/
|
||||
} faixbox_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
#include "box_manager.h"
|
||||
#include "metadata_manager.h"
|
||||
|
||||
//! I.5.3.1 Image Header box
|
||||
/** I.5.3.1 Image Header box*/
|
||||
typedef struct ihdrbox_param{
|
||||
Byte4_t height;
|
||||
Byte4_t width;
|
||||
Byte2_t nc; //!< number of components
|
||||
Byte_t bpc; //!< bits per component
|
||||
Byte2_t nc; /**< number of components*/
|
||||
Byte_t bpc; /**< bits per component*/
|
||||
} ihdrbox_param_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "mhixbox_manager.h"
|
||||
#include "bool.h"
|
||||
|
||||
//! progression order
|
||||
/** progression order */
|
||||
typedef enum porder {
|
||||
PROG_UNKNOWN = -1, /**< place-holder */
|
||||
LRCP = 0, /**< layer-resolution-component-precinct order */
|
||||
|
@ -47,48 +47,48 @@ typedef enum porder {
|
|||
CPRL = 4 /**< component-precinct-resolution-layer order */
|
||||
} porder_t;
|
||||
|
||||
//! A.5.1 Image and tile size (SIZ)
|
||||
/** A.5.1 Image and tile size (SIZ)*/
|
||||
typedef struct SIZmarker_param{
|
||||
Byte2_t Lsiz; //!< length of marker segment excluding the marker
|
||||
Byte2_t Rsiz; //!< capabilities that a decoder needs
|
||||
Byte4_t Xsiz; //!< width of the reference grid
|
||||
Byte4_t Ysiz; //!< height of the reference grid
|
||||
Byte4_t XOsiz; //!< horizontal offset from the origin of the reference grid to the left side of the image area
|
||||
Byte4_t YOsiz; //!< vertical offset from the origin of the reference grid to the top side of the image area
|
||||
Byte4_t XTsiz; //!< width of one reference tile with respect to the reference grid
|
||||
Byte4_t YTsiz; //!< height of one reference tile with respect to the reference grid
|
||||
Byte4_t XTOsiz; //!< horizontal offset from the origin of the reference grid to the left side of the first tile
|
||||
Byte4_t YTOsiz; //!< vertical offset from the origin of the reference grid to the top side of the first tile
|
||||
Byte4_t XTnum; //!< number of tiles in horizontal direction
|
||||
Byte4_t YTnum; //!< number of tiles in vertical direction
|
||||
Byte2_t Csiz; //!< number of the components in the image
|
||||
Byte_t Ssiz[3]; //!< precision (depth) in bits and sign of the component samples
|
||||
Byte_t XRsiz[3]; //!< horizontal separation of a sample of component with respect to the reference grid
|
||||
Byte_t YRsiz[3]; //!< vertical separation of a sample of component with respect to the reference grid
|
||||
Byte2_t Lsiz; /**< length of marker segment excluding the marker*/
|
||||
Byte2_t Rsiz; /**< capabilities that a decoder needs*/
|
||||
Byte4_t Xsiz; /**< width of the reference grid*/
|
||||
Byte4_t Ysiz; /**< height of the reference grid*/
|
||||
Byte4_t XOsiz; /**< horizontal offset from the origin of the reference grid to the left side of the image area*/
|
||||
Byte4_t YOsiz; /**< vertical offset from the origin of the reference grid to the top side of the image area*/
|
||||
Byte4_t XTsiz; /**< width of one reference tile with respect to the reference grid*/
|
||||
Byte4_t YTsiz; /**< height of one reference tile with respect to the reference grid*/
|
||||
Byte4_t XTOsiz; /**< horizontal offset from the origin of the reference grid to the left side of the first tile*/
|
||||
Byte4_t YTOsiz; /**< vertical offset from the origin of the reference grid to the top side of the first tile*/
|
||||
Byte4_t XTnum; /**< number of tiles in horizontal direction*/
|
||||
Byte4_t YTnum; /**< number of tiles in vertical direction*/
|
||||
Byte2_t Csiz; /**< number of the components in the image*/
|
||||
Byte_t Ssiz[3]; /**< precision (depth) in bits and sign of the component samples*/
|
||||
Byte_t XRsiz[3]; /**< horizontal separation of a sample of component with respect to the reference grid*/
|
||||
Byte_t YRsiz[3]; /**< vertical separation of a sample of component with respect to the reference grid*/
|
||||
} SIZmarker_param_t;
|
||||
|
||||
//! A.6.1 Coding style default (COD)
|
||||
/** A.6.1 Coding style default (COD)*/
|
||||
typedef struct CODmarker_param{
|
||||
Byte2_t Lcod; //!< length of marker segment excluding the marker
|
||||
Byte_t Scod; //!< Coding style for all components
|
||||
porder_t prog_order; //!< progression order
|
||||
Byte2_t numOflayers; //!< number of layers
|
||||
Byte_t numOfdecomp; //!< number of decompositions levels
|
||||
Byte4_t *XPsiz; //!< dynamic array of precinct width at successive resolution level in order
|
||||
Byte4_t *YPsiz; //!< dynamic array of precinct height at successive resolution level in order
|
||||
Byte2_t Lcod; /**< length of marker segment excluding the marker*/
|
||||
Byte_t Scod; /**< Coding style for all components*/
|
||||
porder_t prog_order; /**< progression order*/
|
||||
Byte2_t numOflayers; /**< number of layers*/
|
||||
Byte_t numOfdecomp; /**< number of decompositions levels*/
|
||||
Byte4_t *XPsiz; /**< dynamic array of precinct width at successive resolution level in order*/
|
||||
Byte4_t *YPsiz; /**< dynamic array of precinct height at successive resolution level in order*/
|
||||
} CODmarker_param_t;
|
||||
|
||||
//! index parameters
|
||||
/** index parameters*/
|
||||
typedef struct index_param{
|
||||
metadatalist_param_t *metadatalist; //!< metadata-bin list
|
||||
Byte8_t offset; //!< codestream offset
|
||||
Byte8_t length; //!< codestream length
|
||||
Byte8_t mhead_length; //!< main header length
|
||||
SIZmarker_param_t SIZ; // !< SIZ marker information
|
||||
CODmarker_param_t COD; // !< COD marker information
|
||||
faixbox_param_t *tilepart; //!< tile part information from tpix box
|
||||
mhixbox_param_t **tileheader; //!< dynamic array of tile header information from thix box
|
||||
faixbox_param_t **precpacket; //!< dynamic array of precint packet information from ppix box
|
||||
metadatalist_param_t *metadatalist; /**< metadata-bin list*/
|
||||
Byte8_t offset; /**< codestream offset*/
|
||||
Byte8_t length; /**< codestream length */
|
||||
Byte8_t mhead_length; /**< main header length */
|
||||
SIZmarker_param_t SIZ; /**< SIZ marker information*/
|
||||
CODmarker_param_t COD; /**< COD marker information*/
|
||||
faixbox_param_t *tilepart; /**< tile part information from tpix box*/
|
||||
mhixbox_param_t **tileheader; /**< dynamic array of tile header information from thix box*/
|
||||
faixbox_param_t **precpacket; /**< dynamic array of precint packet information from ppix box*/
|
||||
} index_param_t;
|
||||
|
||||
|
||||
|
@ -137,10 +137,10 @@ void delete_index( index_param_t **index);
|
|||
void delete_COD( CODmarker_param_t COD);
|
||||
|
||||
|
||||
//! 1-dimensional range parameters
|
||||
/** 1-dimensional range parameters*/
|
||||
typedef struct range_param{
|
||||
Byte4_t minvalue; //!< minimal value
|
||||
Byte4_t maxvalue; //!< maximal value
|
||||
Byte4_t minvalue; /**< minimal value*/
|
||||
Byte4_t maxvalue; /**< maximal value*/
|
||||
} range_param_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,23 +35,23 @@
|
|||
#include "placeholder_manager.h"
|
||||
|
||||
typedef struct boxcontents_param{
|
||||
Byte8_t offset; //!< byte position of the box contents in the file
|
||||
Byte8_t length; //!< length of the box contents
|
||||
Byte8_t offset; /**< byte position of the box contents in the file*/
|
||||
Byte8_t length; /**< length of the box contents*/
|
||||
} boxcontents_param_t;
|
||||
|
||||
//! metadata-bin parameters
|
||||
/** metadata-bin parameters*/
|
||||
typedef struct metadata_param{
|
||||
int idx; //!< index number
|
||||
boxlist_param_t *boxlist; //!< box list
|
||||
placeholderlist_param_t *placeholderlist; //!< placeholder box list
|
||||
boxcontents_param_t *boxcontents; //!< box contens in case of no boxlist and placeholderlist
|
||||
struct metadata_param *next; //!< pointer to the next metadata-bin
|
||||
int idx; /**< index number*/
|
||||
boxlist_param_t *boxlist; /**< box list*/
|
||||
placeholderlist_param_t *placeholderlist; /**< placeholder box list*/
|
||||
boxcontents_param_t *boxcontents; /**< box contens in case of no boxlist and placeholderlist*/
|
||||
struct metadata_param *next; /**< pointer to the next metadata-bin*/
|
||||
} metadata_param_t;
|
||||
|
||||
//! metadata-bin list parameters
|
||||
/** metadata-bin list parameters*/
|
||||
typedef struct metadatalist_param{
|
||||
metadata_param_t *first; //!< first metadata-bin pointer of the list
|
||||
metadata_param_t *last; //!< last metadata-bin pointer of the list
|
||||
metadata_param_t *first; /**< first metadata-bin pointer of the list*/
|
||||
metadata_param_t *last; /**< last metadata-bin pointer of the list*/
|
||||
} metadatalist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -34,25 +34,25 @@
|
|||
#include "byte_manager.h"
|
||||
#include "box_manager.h"
|
||||
|
||||
//! Marker index parameters
|
||||
/** Marker index parameters*/
|
||||
typedef struct markeridx_param{
|
||||
Byte2_t code; //!< marker code
|
||||
Byte2_t num_remain; //!< remining number of the same marker index segments listed immediately
|
||||
Byte8_t offset; //!< offset relative to the start of the
|
||||
//!codestream ( including the length
|
||||
//!parameter but not the marker itself)
|
||||
Byte2_t length; //!< marker segment length
|
||||
struct markeridx_param *next; //!< pointer to the next markeridx
|
||||
Byte2_t code; /**< marker code*/
|
||||
Byte2_t num_remain; /**< remining number of the same marker index segments listed immediately*/
|
||||
Byte8_t offset; /**< offset relative to the start of the*/
|
||||
/**codestream ( including the length*/
|
||||
/**parameter but not the marker itself)*/
|
||||
Byte2_t length; /**< marker segment length*/
|
||||
struct markeridx_param *next; /**< pointer to the next markeridx*/
|
||||
} markeridx_param_t;
|
||||
|
||||
|
||||
|
||||
//! header index table box parameters
|
||||
//! I.3.2.4.3 Header Index Table box
|
||||
/** header index table box parameters*/
|
||||
/** I.3.2.4.3 Header Index Table box*/
|
||||
typedef struct mhixbox_param{
|
||||
Byte8_t tlen; //!< length ( total length of the main
|
||||
//!header or of the first tile-part header)
|
||||
markeridx_param_t *first; //!< first marker index pointer of the list
|
||||
Byte8_t tlen; /**< length ( total length of the main*/
|
||||
/**header or of the first tile-part header)*/
|
||||
markeridx_param_t *first; /**< first marker index pointer of the list*/
|
||||
} mhixbox_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#define FCGI_stdout stdout
|
||||
#define FCGI_stderr stderr
|
||||
#define logstream stderr
|
||||
#endif //SERVER
|
||||
#endif /*SERVER*/
|
||||
|
||||
msgqueue_param_t * gene_msgqueue( bool stateless, cachemodel_param_t *cachemodel)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ void enqueue_mainheader( msgqueue_param_t *msgqueue)
|
|||
msg->csn = target->csn;
|
||||
msg->bin_offset = 0;
|
||||
msg->length = codeidx->mhead_length;
|
||||
msg->aux = 0; // non exist
|
||||
msg->aux = 0; /* non exist*/
|
||||
msg->res_offset = codeidx->offset;
|
||||
msg->phld = NULL;
|
||||
msg->next = NULL;
|
||||
|
@ -162,9 +162,9 @@ void enqueue_tileheader( int tile_id, msgqueue_param_t *msgqueue)
|
|||
msg->class_id = TILE_HEADER_MSG;
|
||||
msg->csn = target->csn;
|
||||
msg->bin_offset = 0;
|
||||
msg->length = codeidx->tileheader[tile_id]->tlen-2; // SOT marker segment is removed
|
||||
msg->aux = 0; // non exist
|
||||
msg->res_offset = codeidx->offset + get_elemOff( codeidx->tilepart, 0, tile_id) + 2; // skip SOT marker seg
|
||||
msg->length = codeidx->tileheader[tile_id]->tlen-2; /* SOT marker segment is removed*/
|
||||
msg->aux = 0; /* non exist*/
|
||||
msg->res_offset = codeidx->offset + get_elemOff( codeidx->tilepart, 0, tile_id) + 2; /* skip SOT marker seg*/
|
||||
msg->phld = NULL;
|
||||
msg->next = NULL;
|
||||
|
||||
|
@ -178,7 +178,7 @@ void enqueue_tile( int tile_id, int level, msgqueue_param_t *msgqueue)
|
|||
cachemodel_param_t *cachemodel;
|
||||
target_param_t *target;
|
||||
bool *tp_model;
|
||||
Byte8_t numOftparts; // num of tile parts par tile
|
||||
Byte8_t numOftparts; /* num of tile parts par tile*/
|
||||
Byte8_t numOftiles;
|
||||
index_param_t *codeidx;
|
||||
faixbox_param_t *tilepart;
|
||||
|
@ -364,7 +364,7 @@ message_param_t * gene_metamsg( int meta_id, Byte8_t binOffset, Byte8_t length,
|
|||
msg->csn = csn;
|
||||
msg->bin_offset = binOffset;
|
||||
msg->length = length;
|
||||
msg->aux = 0; // non exist
|
||||
msg->aux = 0; /* non exist*/
|
||||
msg->res_offset = res_offset;
|
||||
msg->phld = phld;
|
||||
msg->next = NULL;
|
||||
|
@ -426,7 +426,7 @@ void recons_stream_from_msgqueue( msgqueue_param_t *msgqueue, int tmpfd)
|
|||
add_vbas_stream( msg->bin_offset, tmpfd);
|
||||
add_vbas_stream (msg->length, tmpfd);
|
||||
|
||||
if( msg->class_id%2) // Aux is present only if the id is odd
|
||||
if( msg->class_id%2) /* Aux is present only if the id is odd*/
|
||||
add_vbas_stream( msg->aux, tmpfd);
|
||||
|
||||
if( msg->phld)
|
||||
|
@ -446,8 +446,8 @@ void add_bin_id_vbas_stream( Byte_t bb, Byte_t c, Byte8_t in_class_id, int tmpfd
|
|||
int bytelength;
|
||||
Byte8_t tmp;
|
||||
|
||||
// A.2.3 In-class identifiers
|
||||
// 7k-3bits, where k is the number of bytes in the VBAS
|
||||
/* A.2.3 In-class identifiers */
|
||||
/* 7k-3bits, where k is the number of bytes in the VBAS*/
|
||||
bytelength = 1;
|
||||
tmp = in_class_id >> 4;
|
||||
while( tmp){
|
||||
|
@ -567,12 +567,12 @@ Byte_t * parse_vbas( Byte_t *streamptr, Byte8_t *elem);
|
|||
|
||||
void parse_JPIPstream( Byte_t *JPIPstream, Byte8_t streamlen, Byte8_t offset, msgqueue_param_t *msgqueue)
|
||||
{
|
||||
Byte_t *ptr; // stream pointer
|
||||
Byte_t *ptr; /* stream pointer*/
|
||||
message_param_t *msg;
|
||||
Byte_t bb, c;
|
||||
Byte8_t class_id, csn;
|
||||
|
||||
class_id = -1; // dummy
|
||||
class_id = -1; /* dummy*/
|
||||
csn = -1;
|
||||
ptr = JPIPstream;
|
||||
while( ptr-JPIPstream < streamlen){
|
||||
|
@ -594,7 +594,7 @@ void parse_JPIPstream( Byte_t *JPIPstream, Byte8_t streamlen, Byte8_t offset, ms
|
|||
ptr = parse_vbas( ptr, &msg->bin_offset);
|
||||
ptr = parse_vbas( ptr, &msg->length);
|
||||
|
||||
if( msg->class_id%2) // Aux is present only if the id is odd
|
||||
if( msg->class_id%2) /* Aux is present only if the id is odd*/
|
||||
ptr = parse_vbas( ptr, &msg->aux);
|
||||
else
|
||||
msg->aux = 0;
|
||||
|
@ -637,6 +637,8 @@ placeholder_param_t * parse_phld( Byte_t *datastream, Byte8_t metalength);
|
|||
|
||||
void parse_metadata( metadata_param_t *metadata, message_param_t *msg, Byte_t *datastream)
|
||||
{
|
||||
box_param_t *box;
|
||||
placeholder_param_t *phld;
|
||||
char *boxtype = (char *)(datastream+4);
|
||||
|
||||
msg->phld = NULL;
|
||||
|
@ -645,7 +647,7 @@ void parse_metadata( metadata_param_t *metadata, message_param_t *msg, Byte_t *d
|
|||
if( !metadata->placeholderlist)
|
||||
metadata->placeholderlist = gene_placeholderlist();
|
||||
|
||||
placeholder_param_t *phld = parse_phld( datastream, msg->length);
|
||||
phld = parse_phld( datastream, msg->length);
|
||||
msg->phld = phld;
|
||||
insert_placeholder_into_list( phld, metadata->placeholderlist);
|
||||
}
|
||||
|
@ -655,7 +657,7 @@ void parse_metadata( metadata_param_t *metadata, message_param_t *msg, Byte_t *d
|
|||
if( !metadata->boxlist)
|
||||
metadata->boxlist = gene_boxlist();
|
||||
|
||||
box_param_t *box = gene_boxbyOffinStream( datastream, msg->res_offset);
|
||||
box = gene_boxbyOffinStream( datastream, msg->res_offset);
|
||||
insert_box_into_list( box, metadata->boxlist);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -45,26 +45,26 @@
|
|||
#define MAINHEADER_MSG 6
|
||||
#define METADATA_MSG 8
|
||||
|
||||
//! message parameters
|
||||
/** message parameters */
|
||||
typedef struct message_param{
|
||||
bool last_byte; //!< if message contains the last byte of the data-bin
|
||||
Byte8_t in_class_id; //!< in-class identifier A.2.3
|
||||
Byte8_t class_id; //!< class identifiers
|
||||
Byte8_t csn; //!< index of the codestream
|
||||
Byte8_t bin_offset; //!< offset of the data in this message from the start of the data-bin
|
||||
Byte8_t length; //!< message byte length
|
||||
Byte8_t aux; //!<
|
||||
Byte8_t res_offset; //!< offset in the resource
|
||||
placeholder_param_t *phld; //!< placeholder pointer in index
|
||||
struct message_param *next; //!< pointer to the next message
|
||||
bool last_byte; /**< if message contains the last byte of the data-bin*/
|
||||
Byte8_t in_class_id; /**< in-class identifier A.2.3*/
|
||||
Byte8_t class_id; /**< class identifiers */
|
||||
Byte8_t csn; /**< index of the codestream*/
|
||||
Byte8_t bin_offset; /**< offset of the data in this message from the start of the data-bin*/
|
||||
Byte8_t length; /**< message byte length*/
|
||||
Byte8_t aux; /**<*/
|
||||
Byte8_t res_offset; /**< offset in the resource*/
|
||||
placeholder_param_t *phld; /**< placeholder pointer in index*/
|
||||
struct message_param *next; /**< pointer to the next message*/
|
||||
} message_param_t;
|
||||
|
||||
//! message queue parameters
|
||||
/** message queue parameters */
|
||||
typedef struct msgqueue_param{
|
||||
message_param_t *first; //!< first message pointer of the list
|
||||
message_param_t *last; //!< last message pointer of the list
|
||||
bool stateless; //!< if this is a stateless message queue
|
||||
cachemodel_param_t *cachemodel; //!< reference cachemodel pointer
|
||||
message_param_t *first; /**< first message pointer of the list*/
|
||||
message_param_t *last; /**< last message pointer of the list*/
|
||||
bool stateless; /**< if this is a stateless message queue*/
|
||||
cachemodel_param_t *cachemodel; /**< reference cachemodel pointer*/
|
||||
} msgqueue_param_t;
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include "ihdrbox_manager.h"
|
||||
#include "index_manager.h"
|
||||
|
||||
#endif //SERVER
|
||||
#endif /*SERVER*/
|
||||
|
||||
/*
|
||||
*==========================================================
|
||||
|
@ -68,18 +68,18 @@
|
|||
|
||||
#ifdef SERVER
|
||||
|
||||
//! Server static records
|
||||
/** Server static records*/
|
||||
typedef struct server_record{
|
||||
sessionlist_param_t *sessionlist; //!< list of session records
|
||||
targetlist_param_t *targetlist; //!< list of target records
|
||||
sessionlist_param_t *sessionlist; /**< list of session records*/
|
||||
targetlist_param_t *targetlist; /**< list of target records*/
|
||||
auxtrans_param_t auxtrans;
|
||||
} server_record_t;
|
||||
|
||||
//! Query/response data for each client
|
||||
/** Query/response data for each client*/
|
||||
typedef struct QR{
|
||||
query_param_t *query; //!< query parameters
|
||||
msgqueue_param_t *msgqueue; //!< message queue
|
||||
channel_param_t *channel; //!< channel, (NULL if stateless)
|
||||
query_param_t *query; /**< query parameters*/
|
||||
msgqueue_param_t *msgqueue; /**< message queue*/
|
||||
channel_param_t *channel; /**< channel, (NULL if stateless)*/
|
||||
} QR_t;
|
||||
|
||||
/**
|
||||
|
@ -143,7 +143,7 @@ void end_QRprocess( server_record_t *rec, QR_t **qr);
|
|||
*/
|
||||
void local_log( bool query, bool messages, bool sessions, bool targets, QR_t *qr, server_record_t *rec);
|
||||
|
||||
#endif //SERVER
|
||||
#endif /*SERVER*/
|
||||
|
||||
/*
|
||||
*==========================================================
|
||||
|
@ -153,17 +153,17 @@ void local_log( bool query, bool messages, bool sessions, bool targets, QR_t *qr
|
|||
|
||||
#ifndef SERVER
|
||||
|
||||
//! Decoding server static records
|
||||
/** Decoding server static records*/
|
||||
typedef struct dec_server_record{
|
||||
cachelist_param_t *cachelist; //!< cache list
|
||||
Byte_t *jpipstream; //!< JPT/JPP stream
|
||||
int jpipstreamlen; //!< length of jpipstream
|
||||
msgqueue_param_t *msgqueue; //!< parsed message queue of jpipstream
|
||||
SOCKET listening_socket; //!< listenning socket
|
||||
cachelist_param_t *cachelist; /**< cache list*/
|
||||
Byte_t *jpipstream; /**< JPT/JPP stream*/
|
||||
int jpipstreamlen; /**< length of jpipstream*/
|
||||
msgqueue_param_t *msgqueue; /**< parsed message queue of jpipstream*/
|
||||
SOCKET listening_socket; /**< listenning socket*/
|
||||
} dec_server_record_t;
|
||||
|
||||
|
||||
//! Client socket identifier
|
||||
/** Client socket identifier*/
|
||||
typedef SOCKET client_t;
|
||||
|
||||
/**
|
||||
|
@ -198,7 +198,7 @@ client_t accept_connection( dec_server_record_t *rec);
|
|||
*/
|
||||
bool handle_clientreq( client_t client, dec_server_record_t *rec);
|
||||
|
||||
#endif //SERVER
|
||||
#endif /*SERVER*/
|
||||
|
||||
/*
|
||||
*==========================================================
|
||||
|
@ -212,15 +212,15 @@ bool handle_clientreq( client_t client, dec_server_record_t *rec);
|
|||
* jpip to JP2 or J2K
|
||||
*/
|
||||
|
||||
//! JPIP decoding parameters
|
||||
/** JPIP decoding parameters*/
|
||||
typedef struct jpip_dec_param{
|
||||
Byte_t *jpipstream; //!< JPT/JPP-stream
|
||||
Byte8_t jpiplen; //!< length of jpipstream
|
||||
msgqueue_param_t *msgqueue; //!< message queue
|
||||
metadatalist_param_t *metadatalist; //!< metadata list going into JP2 file
|
||||
ihdrbox_param_t *ihdrbox; //!< ihdr box going into JP2 file
|
||||
Byte_t *jp2kstream; //!< J2K codestream or JP2 file codestream
|
||||
Byte8_t jp2klen; //!< length of j2kstream or JP2 file
|
||||
Byte_t *jpipstream; /**< JPT/JPP-stream*/
|
||||
Byte8_t jpiplen; /**< length of jpipstream*/
|
||||
msgqueue_param_t *msgqueue; /**< message queue*/
|
||||
metadatalist_param_t *metadatalist; /**< metadata list going into JP2 file*/
|
||||
ihdrbox_param_t *ihdrbox; /**< ihdr box going into JP2 file*/
|
||||
Byte_t *jp2kstream; /**< J2K codestream or JP2 file codestream*/
|
||||
Byte8_t jp2klen; /**< length of j2kstream or JP2 file*/
|
||||
} jpip_dec_param_t;
|
||||
|
||||
/**
|
||||
|
@ -277,7 +277,7 @@ void output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *d
|
|||
* test the format of index (cidx) box in JP2 file
|
||||
*/
|
||||
|
||||
//! Redefinition of index parameters
|
||||
/** Redefinition of index parameters*/
|
||||
typedef index_param_t index_t;
|
||||
|
||||
/**
|
||||
|
@ -303,6 +303,6 @@ void destroy_index( index_t **idx);
|
|||
*/
|
||||
void output_index( index_t *index);
|
||||
|
||||
#endif //SERVER
|
||||
#endif /*SERVER*/
|
||||
|
||||
#endif /* !OPENJPIP_H_ */
|
||||
|
|
|
@ -34,30 +34,30 @@
|
|||
#include "byte_manager.h"
|
||||
#include "box_manager.h"
|
||||
|
||||
//! A.3.6.3 Placeholder box format
|
||||
//! placeholder box parameters
|
||||
/** A.3.6.3 Placeholder box format*/
|
||||
/** placeholder box parameters*/
|
||||
typedef struct placeholder_param{
|
||||
Byte4_t LBox;
|
||||
char TBox[4];
|
||||
Byte4_t Flags;
|
||||
Byte8_t OrigID;
|
||||
Byte_t *OrigBH; //!< dynamic memory pointer
|
||||
Byte_t OrigBHlen; //!< length of OrigBH
|
||||
Byte_t *OrigBH; /**< dynamic memory pointer*/
|
||||
Byte_t OrigBHlen; /**< length of OrigBH*/
|
||||
#ifdef AAA
|
||||
Byte8_t EquivID;
|
||||
Byte_t *EquivBH; //!< dynamic memory pointer
|
||||
Byte_t EquivBHlen; //!< length of EquivBH
|
||||
Byte_t *EquivBH; /**< dynamic memory pointer*/
|
||||
Byte_t EquivBHlen; /**< length of EquivBH*/
|
||||
Byte8_t CSID;
|
||||
Byte4_t NCS;
|
||||
#endif //AAA
|
||||
struct placeholder_param *next; //!< pointer to the next placeholder
|
||||
#endif /*AAA*/
|
||||
struct placeholder_param *next; /**< pointer to the next placeholder*/
|
||||
} placeholder_param_t;
|
||||
|
||||
|
||||
//! placeholder box list parameters
|
||||
/** placeholder box list parameters*/
|
||||
typedef struct placeholderlist_param{
|
||||
placeholder_param_t *first; //!< first placeholder pointer of the list
|
||||
placeholder_param_t *last; //!< last placeholder pointer of the list
|
||||
placeholder_param_t *first; /**< first placeholder pointer of the list*/
|
||||
placeholder_param_t *last; /**< last placeholder pointer of the list*/
|
||||
} placeholderlist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -35,17 +35,17 @@
|
|||
#include "channel_manager.h"
|
||||
#include "cachemodel_manager.h"
|
||||
|
||||
//! Session parameters
|
||||
/** Session parameters*/
|
||||
typedef struct session_param{
|
||||
channellist_param_t *channellist; //!< channel list pointer
|
||||
cachemodellist_param_t *cachemodellist; //!< cache list pointer
|
||||
struct session_param *next; //!< pointer to the next session
|
||||
channellist_param_t *channellist; /**< channel list pointer*/
|
||||
cachemodellist_param_t *cachemodellist; /**< cache list pointer*/
|
||||
struct session_param *next; /**< pointer to the next session*/
|
||||
} session_param_t;
|
||||
|
||||
//! Session list parameters
|
||||
/** Session list parameters*/
|
||||
typedef struct sessionlist_param{
|
||||
session_param_t *first; //!< first session pointer of the list
|
||||
session_param_t *last; //!< last session pointer of the list
|
||||
session_param_t *first; /**< first session pointer of the list*/
|
||||
session_param_t *last; /**< last session pointer of the list*/
|
||||
} sessionlist_param_t;
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <winsock2.h>
|
||||
#else
|
||||
typedef int SOCKET;
|
||||
#endif //_WIN32
|
||||
#endif /*_WIN32*/
|
||||
|
||||
#define BUF_LEN 256
|
||||
|
||||
|
|
|
@ -34,30 +34,30 @@
|
|||
#include "bool.h"
|
||||
#include "index_manager.h"
|
||||
|
||||
//! maximum length of target identifier
|
||||
/** maximum length of target identifier*/
|
||||
#define MAX_LENOFTID 30
|
||||
|
||||
//! target parameters
|
||||
/** target parameters*/
|
||||
typedef struct target_param{
|
||||
char tid[MAX_LENOFTID]; //!< taregt identifier
|
||||
char *targetname; //!< local file path or URL ( URL is suported only with SERVER mode)
|
||||
int fd; //!< file descriptor
|
||||
char tid[MAX_LENOFTID]; /**< target identifier*/
|
||||
char *targetname; /**< local file path or URL ( URL is suported only with SERVER mode)*/
|
||||
int fd; /**< file descriptor*/
|
||||
#ifdef SERVER
|
||||
char *tmpfname; //!< temporal file name to download a remote target file
|
||||
char *tmpfname; /**< temporal file name to download a remote target file*/
|
||||
#endif
|
||||
int csn; //!< codestream number
|
||||
index_param_t *codeidx; //!< index information of codestream
|
||||
int num_of_use; //!< numbers of sessions refering to this target
|
||||
bool jppstream; //!< if this target can return JPP-stream
|
||||
bool jptstream; //!< if this target can return JPP-stream
|
||||
struct target_param *next; //!< pointer to the next target
|
||||
int csn; /**< codestream number */
|
||||
index_param_t *codeidx; /**< index information of codestream */
|
||||
int num_of_use; /**< numbers of sessions refering to this target */
|
||||
bool jppstream; /**< if this target can return JPP-stream */
|
||||
bool jptstream; /**< if this target can return JPP-stream */
|
||||
struct target_param *next; /**< pointer to the next target */
|
||||
} target_param_t;
|
||||
|
||||
|
||||
//! Target list parameters
|
||||
/** Target list parameters*/
|
||||
typedef struct targetlist_param{
|
||||
target_param_t *first; //!< first target pointer of the list
|
||||
target_param_t *last; //!< last target pointer of the list
|
||||
target_param_t *first; /**< first target pointer of the list*/
|
||||
target_param_t *last; /**< last target pointer of the list*/
|
||||
} targetlist_param_t;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue