summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/openjpeg.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-01-24 13:26:40 +0100
committerCarl Hetherington <cth@carlh.net>2025-01-24 13:26:40 +0100
commite53debb0a1b49af365cd9b67b7161d343c872ecd (patch)
treef4e11879669639b484169473b98e94412368760f /src/lib/openjp2/openjpeg.h
parentad8edaacd54a862940d0a77c41ecda5858b54d6e (diff)
Diffstat (limited to 'src/lib/openjp2/openjpeg.h')
-rw-r--r--src/lib/openjp2/openjpeg.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h
index 67d168bb..3ca2f5d3 100644
--- a/src/lib/openjp2/openjpeg.h
+++ b/src/lib/openjp2/openjpeg.h
@@ -117,6 +117,11 @@ typedef int OPJ_BOOL;
#define OPJ_TRUE 1
#define OPJ_FALSE 0
+typedef int OPJ_RESULT;
+#define OPJ_SUCCESS OPJ_TRUE
+#define OPJ_FAILURE OPJ_FALSE
+#define OPJ_CANCEL 2
+
typedef char OPJ_CHAR;
typedef float OPJ_FLOAT32;
typedef double OPJ_FLOAT64;
@@ -1160,6 +1165,16 @@ OPJ_API void* OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size);
*/
OPJ_API void OPJ_CALLCONV opj_image_data_free(void* ptr);
+struct opj_cancel;
+typedef struct opj_cancel opj_cancel_t;
+
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_cancel(opj_codec_t * p_codec, opj_cancel_t * p_cancel);
+OPJ_API opj_cancel_t* OPJ_CALLCONV opj_create_cancel(void);
+OPJ_API void OPJ_CALLCONV opj_destroy_cancel(opj_cancel_t * p_cancel);
+OPJ_API void OPJ_CALLCONV opj_cancel(opj_cancel_t * p_cancel);
+OPJ_API void OPJ_CALLCONV opj_reset(opj_cancel_t * p_cancel);
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_should_cancel(opj_cancel_t * p_cancel);
+
/*
==========================================================
stream functions definitions