diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2016-05-25 16:36:47 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2016-05-25 21:02:07 +0200 |
| commit | d4b7f03cfa4732132767188782683f3d957da912 (patch) | |
| tree | 47ae5bbd2694e2df24c80d3f4779a25f07345181 /src/lib/openjp2/opj_codec.h | |
| parent | 54179fe1d53156c6b440166fe71a10f238a6ea56 (diff) | |
Add opj_codec_set_threads() in public API and propagate resulting thread pool to tcd level
By default, only the main thread is used. If opj_codec_set_threads() is not used,
but the OPJ_NUM_THREADS environment variable is set, its value will be
used to initialize the number of threads. The value can be either an integer
number, or "ALL_CPUS". If OPJ_NUM_THREADS is set and this function is called,
this function will override the behaviour of the environment variable.
Diffstat (limited to 'src/lib/openjp2/opj_codec.h')
| -rw-r--r-- | src/lib/openjp2/opj_codec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/openjp2/opj_codec.h b/src/lib/openjp2/opj_codec.h index 6bd791fa..c88005d7 100644 --- a/src/lib/openjp2/opj_codec.h +++ b/src/lib/openjp2/opj_codec.h @@ -113,6 +113,7 @@ typedef struct opj_codec_private OPJ_BOOL (*opj_set_decoded_resolution_factor) ( void * p_codec, OPJ_UINT32 res_factor, opj_event_mgr_t * p_manager); + } m_decompression; /** @@ -157,6 +158,9 @@ typedef struct opj_codec_private void (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream); opj_codestream_info_v2_t* (*opj_get_codec_info)(void* p_codec); opj_codestream_index_t* (*opj_get_codec_index)(void* p_codec); + + /** Set number of threads */ + OPJ_BOOL (*opj_set_threads) ( void * p_codec, OPJ_UINT32 num_threads ); } opj_codec_private_t; |
