Grok
7.6.2
|
#include "grk_includes.h"
Namespaces | |
grk | |
Copyright (C) 2016-2020 Grok Image Compression Inc. | |
Functions | |
template<typename TYPE > | |
void | grk::grk_write (uint8_t *p_buffer, TYPE value, uint32_t nb_bytes) |
template<typename TYPE > | |
void | grk::grk_read (const uint8_t *p_buffer, TYPE *value, uint32_t nb_bytes) |
grk_stream * | grk_stream_create (size_t buffer_size, bool is_input) |
Create an abstract stream. More... | |
void | grk_stream_destroy (grk_stream *stream) |
Destroy a stream created by grk_create_stream. More... | |
void | grk_stream_set_read_function (grk_stream *stream, grk_stream_read_fn p_function) |
Set the given function to be used as a read function. More... | |
void | grk_stream_set_seek_function (grk_stream *stream, grk_stream_seek_fn p_function) |
Set the given function to be used as a seek function, the stream is then seekable. More... | |
void | grk_stream_set_write_function (grk_stream *stream, grk_stream_write_fn p_function) |
Set the given function to be used as a write function. More... | |
void | grk_stream_set_user_data (grk_stream *stream, void *p_data, grk_stream_free_user_data_fn p_function) |
Set the given data to be used as a user data for the stream. More... | |
void | grk_stream_set_user_data_length (grk_stream *stream, uint64_t data_length) |
Set the length of the user data for the stream. More... | |
grk_stream* grk_stream_create | ( | size_t | buffer_size, |
bool | is_input | ||
) |
Create an abstract stream.
This function does nothing except allocate memory and initialize abstract stream.
buffer_size | size of stream's double-buffer |
is_input | if set to true then the stream will be an input stream, an output stream else. |
Referenced by grk_stream_create_file_stream().
void grk_stream_destroy | ( | grk_stream * | stream | ) |
Destroy a stream created by grk_create_stream.
This function does NOT close the abstract stream. If needed the user must close their own implementation of the stream.
stream | the stream to destroy. |
void grk_stream_set_read_function | ( | grk_stream * | stream, |
grk_stream_read_fn | p_function | ||
) |
Set the given function to be used as a read function.
stream | the stream to modify |
p_function | the function to use a read function. |
References GROK_STREAM_STATUS_INPUT.
Referenced by grk_stream_create_file_stream(), and grk::set_up_mem_stream().
void grk_stream_set_seek_function | ( | grk_stream * | stream, |
grk_stream_seek_fn | p_function | ||
) |
Set the given function to be used as a seek function, the stream is then seekable.
stream | the stream to modify |
p_function | the function to use a skip function. |
Referenced by grk_stream_create_file_stream(), and grk::set_up_mem_stream().
void grk_stream_set_user_data | ( | grk_stream * | stream, |
void * | data, | ||
grk_stream_free_user_data_fn | p_function | ||
) |
Set the given data to be used as a user data for the stream.
stream | the stream to modify |
data | the data to set. |
p_function | the function to free data when grk_stream_destroy() is called. |
Referenced by grk::create_mapped_file_read_stream(), grk::create_mapped_file_write_stream(), grk::create_mem_stream(), and grk_stream_create_file_stream().
void grk_stream_set_user_data_length | ( | grk_stream * | stream, |
uint64_t | data_length | ||
) |
Set the length of the user data for the stream.
stream | the stream to modify |
data_length | length of the user_data. |
Referenced by grk_stream_create_file_stream(), and grk::set_up_mem_stream().
void grk_stream_set_write_function | ( | grk_stream * | stream, |
grk_stream_write_fn | p_function | ||
) |
Set the given function to be used as a write function.
stream | the stream to modify |
p_function | the function to use a write function. |
References GROK_STREAM_STATUS_OUTPUT.
Referenced by grk_stream_create_file_stream(), and grk::set_up_mem_stream().