#endif
#if defined(OPJ_STATIC) || !defined(_WIN32)
+/* http://gcc.gnu.org/wiki/Visibility */
+#if __GNUC__ >= 4
+#define OPJ_API __attribute__ ((visibility ("default")))
+#define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
+#else
#define OPJ_API
+#define OPJ_LOCAL
+#endif
#define OPJ_CALLCONV
#else
#define OPJ_CALLCONV __stdcall
-/** SHOULD BE MOVE IN EVET.H when we remove old functions
+/** SHOULD BE MOVE IN EVET.H when we remove old functions TODO MSD
Message handler object
used for
<ul>
/**
* Creates an image without allocating memory for the image (used in the new version of the library).
*
- * @param p_num_cmpts the number of components
- * @param p_cmpt_parms the components parameters
- * @param p_clr_spc the image color space
+ * @param numcmpts the number of components
+ * @param cmptparms the components parameters
+ * @param clrspc the image color space
*
* @return a new image structure if successful, NULL otherwise.
*/
/**
* Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
*
- * @param l_is_reader if set to true then the stream will be an input stream, an output stream else.
+ * @param p_is_input if set to true then the stream will be an input stream, an output stream else.
*
* @return a stream object.
*/
OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_default_create(opj_bool p_is_input);
+
+/**
+ * Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
+ *
+ * @param p_buffer_size FIXME DOC
+ * @param p_is_input if set to true then the stream will be an input stream, an output stream else.
+ *
+ * @return a stream object.
+*/
OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, opj_bool p_is_input);
/**
/**
* Sets the length of the user data for the stream.
- * @param p_stream the stream to modify
- * @param data_length length of the user_data.
+ *
+ * @param p_stream the stream to modify
+ * @param data_length length of the user_data.
*/
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream, OPJ_UINT64 data_length);
* @param p_is_read_stream whether the stream is a read stream (true) or not (false)
*/
OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE * p_file, opj_bool p_is_read_stream);
+
+/**
+ * FIXME DOC
+ * @param p_file the file stream to operate on
+ * @param p_buffer_size FIXME DOC
+ * @param p_is_read_stream FIXME DOC
+*/
OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (FILE * p_file, OPJ_SIZE_T p_buffer_size, opj_bool p_is_read_stream);
/* -----------> */
OPJ_API opj_bool OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec, opj_msg_callback p_callback,void * p_user_data);
OPJ_API opj_bool OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, opj_msg_callback p_callback,void * p_user_data);
-/**
- */
-DEPRECATED( OPJ_API opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context));
-
/*
==========================================================
codec functions definitions
* Sets the given area to be decoded. This function should be called right after opj_read_header and before any tile header reading.
*
* @param p_codec the jpeg2000 codec.
+ * @param p_image FIXME DOC
* @param p_start_x the left position of the rectangle to decode (in image coordinates).
* @param p_end_x the right position of the rectangle to decode (in image coordinates).
* @param p_start_y the up position of the rectangle to decode (in image coordinates).
/**
* Writes a tile with the given data.
*
- * @param p_compressor the jpeg2000 codec.
+ * @param p_codec the jpeg2000 codec.
* @param p_tile_index the index of the tile to write. At the moment, the tiles must be written from 0 to n-1 in sequence.
* @param p_data pointer to the data to write. Data is arranged in sequence, data_comp0, then data_comp1, then ... NO INTERLEAVING should be set.
- * @param p_data_size this value os used to make sure the data being written is correct. The size must be equal to the sum for each component of tile_width * tile_height * component_size. component_size can be 1,2 or 4 bytes,
- * depending on the precision of the given component.
+ * @param p_data_size this value os used to make sure the data being written is correct. The size must be equal to the sum for each component of tile_width * tile_height * component_size. component_size can be 1,2 or 4 bytes, depending on the precision of the given component.
* @param p_stream the stream to write data to.
*
* @return true if the data could be written.
* Encode an image into a JPEG-2000 codestream
* @param p_codec compressor handle
* @param p_stream Output buffer stream
- * @param image Image to encode
*
* @return Returns true if successful, returns false otherwise
*/
-OPJ_API opj_bool OPJ_CALLCONV opj_encode(opj_codec_t *p_codec,
+OPJ_API opj_bool OPJ_CALLCONV opj_encode(opj_codec_t *p_codec,
opj_stream_t *p_stream);
Destroy Codestream information after compression or decompression
@param cstr_info Codestream information structure
*/
-OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info);
-
-OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info_v2(opj_codestream_info_v2_t **cstr_info);
+OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info);