Skip to content

Commit

Permalink
grok.h: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Grok Compression committed Jan 5, 2025
1 parent 33fc914 commit d6e8d92
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/core/grok.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ bool GRK_CALLCONV grk_decompress(grk_object* codecWrapper, grk_plugin_tile* tile
}
return false;
}

void GRK_CALLCONV grk_decompress_wait(grk_object* codecWrapper)
{
(void)codecWrapper;
}
bool GRK_CALLCONV grk_decompress_tile(grk_object* codecWrapper, uint16_t tile_index)
{
if(codecWrapper)
Expand Down
11 changes: 11 additions & 0 deletions src/lib/core/grok.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Please see the LICENSE file in the root directory for details.
*
*/

#pragma once

#include <stdint.h>
Expand Down Expand Up @@ -560,6 +561,7 @@ typedef struct _grk_stream_params
{
/* 1. File */
const char* file; /* file */
size_t file_offset; /* offset into file */

/* 2. Buffer */
uint8_t* buf; /* buffer */
Expand Down Expand Up @@ -636,6 +638,8 @@ typedef struct _grk_decompress_params
{
/** core library parameters */
grk_decompress_core_params core; /* core */
/* If false then decompression is executed asynchronously */
bool synchronous;
/** input file name */
char infile[GRK_PATH_LEN]; /* input file */
/** output file name */
Expand Down Expand Up @@ -1154,6 +1158,13 @@ GRK_API bool GRK_CALLCONV grk_decompress_set_window(grk_object* codec, double st
* */
GRK_API bool GRK_CALLCONV grk_decompress(grk_object* codec, grk_plugin_tile* tile);

/**
* @brief Waits for an asynchronous decompression to complete
*
* @param codecWrapper codec wrapper @ref grk_object
*/
GRK_API void GRK_CALLCONV grk_decompress_wait(grk_object* codecWrapper);

/**
* @brief Decompresses a specific tile
*
Expand Down

0 comments on commit d6e8d92

Please sign in to comment.