#define logstream stderr
#endif /*SERVER */
-codestream_param_t set_codestream( int fd, Byte8_t offset, Byte8_t length)
+codestream_param_t set_codestream( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length)
{
codestream_param_t cs;
return cs;
}
-Byte_t * fetch_codestreambytes( codestream_param_t *cs, long offset, int size)
+Byte_t * fetch_codestreambytes( codestream_param_t *cs, OPJ_OFF_T offset, OPJ_SIZE_T size)
{
return fetch_bytes( cs->fd, cs->offset+offset, size);
}
-Byte_t fetch_codestream1byte( codestream_param_t *cs, long offset)
+Byte_t fetch_codestream1byte( codestream_param_t *cs, OPJ_OFF_T offset)
{
return fetch_1byte( cs->fd, cs->offset+offset);
}
-Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, long offset)
+Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset)
{
return fetch_2bytebigendian( cs->fd, cs->offset+offset);
}
-Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, long offset)
+Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset)
{
return fetch_4bytebigendian( cs->fd, cs->offset+offset);
}
/** codestream parameters*/
typedef struct codestream_param{
int fd; /**< file descriptor*/
- Byte8_t offset; /**< byte position of DBox (Box Contents) in the file*/
+ OPJ_OFF_T offset; /**< byte position of DBox (Box Contents) in the file*/
Byte8_t length; /**< content length*/
} codestream_param_t;
* @param[in] length codestream length
* @return structure of generated codestream parameters
*/
-codestream_param_t set_codestream( int fd, Byte8_t offset, Byte8_t length);
+codestream_param_t set_codestream( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
/**
* @param[in] size Byte length
* @return pointer to the fetched data
*/
-Byte_t * fetch_codestreambytes( codestream_param_t *cs, long offset, int size);
+Byte_t * fetch_codestreambytes( codestream_param_t *cs, OPJ_OFF_T offset, OPJ_SIZE_T size);
/**
* fetch Codestream 1-byte Byte code in file stream
* @param[in] offset start Byte position in codestream
* @return fetched code
*/
-Byte_t fetch_codestream1byte( codestream_param_t *cs, long offset);
+Byte_t fetch_codestream1byte( codestream_param_t *cs, OPJ_OFF_T offset);
/**
* fetch Codestream 2-byte big endian Byte codes in file stream
* @param[in] offset start Byte position in codestream
* @return fetched code
*/
-Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, long offset);
+Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset);
/**
* fetch Codestream 4-byte big endian Byte codes in file stream
* @param[in] offset start Byte position in codestream
* @return fetched code
*/
-Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, long offset);
+Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset);
/**