71 #include <jasper/jas_config.h>
88 #if defined(JAS_FOR_INTERNAL_USE_ONLY)
110 size_t image_numfmts;
114 size_t dec_default_max_samples;
385 int jas_get_debug_level_internal(
void);
389 size_t jas_get_dec_default_max_samples_internal(
void);
395 #if defined(JAS_FOR_INTERNAL_USE_ONLY)
396 #if defined(JAS_HAVE_THREAD_LOCAL)
397 extern _Thread_local jas_ctx_t *jas_cur_ctx;
401 jas_ctx_t *jas_get_ctx_internal(
void);
404 static inline jas_ctx_t *jas_get_ctx(
void)
406 #if defined(JAS_HAVE_THREAD_LOCAL)
407 return jas_cur_ctx ? jas_cur_ctx : jas_get_ctx_internal();
409 return JAS_CAST(jas_ctx_t *, jas_get_ctx_internal());
431 #if defined(JAS_FOR_INTERNAL_USE_ONLY)
432 jas_ctx_t *ctx = jas_get_ctx();
433 return ctx->debug_level;
435 return jas_get_debug_level_internal();
458 #if defined(JAS_FOR_INTERNAL_USE_ONLY)
459 jas_ctx_t *ctx = jas_get_ctx();
460 return ctx->dec_default_max_samples;
462 return jas_get_dec_default_max_samples_internal();
484 #if defined(JAS_FOR_INTERNAL_USE_ONLY)
485 jas_ctx_t *ctx = jas_get_ctx();
486 return ctx->vlogmsgf;
488 return jas_get_vlogmsgf_internal();
#define JAS_IMAGE_MAXFMTS
The maximum number of image data formats supported.
Definition: jas_image.h:293
JAS_EXPORT jas_context_t jas_get_context(void)
Get the current context for the calling thread.
Definition: jas_init.c:927
JAS_EXPORT int jas_cleanup_library(void)
Perform clean up for the JasPer library.
Definition: jas_init.c:636
JAS_EXPORT void jas_cleanup(void)
Perform any clean up for the JasPer library.
Definition: jas_init.c:822
static jas_vlogmsgf_t * jas_get_vlogmsgf(void)
Get the function to be used for log messages.
Definition: jas_init.h:482
JAS_EXPORT void jas_conf_set_vlogmsgf(jas_vlogmsgf_t *func)
Set the function used by the library to output error, warning, and informational messages.
JAS_EXPORT void jas_set_debug_level(int debug_level)
Set the debug level for a particular context.
Definition: jas_init.c:1002
JAS_EXPORT jas_context_t jas_context_create(void)
Create a context.
Definition: jas_init.c:885
JAS_EXPORT void jas_conf_set_allocator(jas_allocator_t *allocator)
Set the memory allocator to be used by the library.
Definition: jas_init.c:425
JAS_EXPORT void jas_set_vlogmsgf(jas_vlogmsgf_t *func)
Set the function to be used for log messages.
JAS_EXPORT void jas_conf_set_multithread(int multithread)
Set the multithreading flag for the library.
Definition: jas_init.c:419
JAS_EXPORT int jas_init(void)
Configure and initialize the JasPer library using the default configuration settings.
Definition: jas_init.c:807
JAS_EXPORT void jas_set_dec_default_max_samples(size_t max_samples)
Set the default maximum number of samples that a decoder is permitted to process.
Definition: jas_init.c:1016
JAS_EXPORT void jas_conf_set_dec_default_max_samples(size_t max_samples)
Set the default value for the maximum number of samples that is allowed in an image to be decoded.
Definition: jas_init.c:452
JAS_EXPORT void jas_conf_set_max_mem_usage(size_t max_mem)
Set the maximum amount of memory that can be used by the library (assuming the allocator wrapper is n...
Definition: jas_init.c:445
JAS_EXPORT int jas_cleanup_thread(void)
Perform per-thread cleanup for the JasPer library.
Definition: jas_init.c:757
JAS_EXPORT jas_context_t jas_get_default_context(void)
Get the current context for the calling thread.
Definition: jas_init.c:933
JAS_EXPORT void jas_conf_clear(void)
Configure the JasPer library with the default configuration settings.
Definition: jas_init.c:397
JAS_EXPORT void jas_context_destroy(jas_context_t context)
Destroy a context.
Definition: jas_init.c:902
static int jas_get_debug_level(void)
Get the debug level for a particular context.
Definition: jas_init.h:429
static size_t jas_get_dec_default_max_samples(void)
Get the default maximum number of samples that a decoder is permitted to process.
Definition: jas_init.h:456
JAS_EXPORT int jas_init_thread(void)
Perform per-thread initialization for the JasPer library.
Definition: jas_init.c:696
JAS_EXPORT void jas_conf_set_debug_level(int debug_level)
Set the initial debug level for the library.
Definition: jas_init.c:439
void * jas_context_t
An opaque handle type used to represent a JasPer library context.
Definition: jas_init.h:123
JAS_EXPORT void jas_set_context(jas_context_t context)
Set the current context for the calling thread.
Definition: jas_init.c:939
JAS_EXPORT int jas_init_library(void)
Initialize the JasPer library with the current configuration settings.
Definition: jas_init.c:475
int() jas_vlogmsgf_t(jas_logtype_t, const char *, va_list)
Type used for formatted message logging function.
Definition: jas_log.h:117
JasPer Logging Functionality.
A memory allocator.
Definition: jas_malloc.h:101
Image format information.
Definition: jas_image.h:314