30#if CONFIG_RESOURCE_COMPRESSION
53 .class_name =
"ResourceManager",
66#if CONFIG_RESOURCE_COMPRESSION
71 unsigned chunk = 65534;
76 memset(&strm, 0,
sizeof(strm));
86 ret = inflateInit2(&strm, 15 + 16);
93 strm.avail_in = in_len;
95 strm.avail_out = chunk;
99 if (ret != Z_OK && ret != Z_STREAM_END) {
103 return (ret == Z_STREAM_END) ? Z_OK : ((ret == Z_OK) ? Z_BUF_ERROR : ret);
106 if (strm.avail_out == 0) {
111 *out_len = chunk - strm.avail_out;
140 resource_definition = def;
154#if CONFIG_RESOURCE_COMPRESSION
159 int ret = decompress_gzip(
ctx, (uint8_t *)resource_definition.
data, *resource_definition.
data_len, &
out, &out_len);
176 dict_ret =
av_dict_set(&
ctx->resource_dic, resource_definition.
name, (
const char *)resource_definition.
data, 0);
191 res = dic_entry->
value;
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
#define i(width, name, range_min, range_max)
common internal and external API header
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_MUTEX_INITIALIZER
static int ff_mutex_unlock(AVMutex *mutex)
static int ff_mutex_lock(AVMutex *mutex)
const unsigned int ff_graph_html_len
static ResourceManagerContext resman_ctx
const unsigned char ff_graph_css_data[]
const unsigned ff_graph_css_len
const unsigned char ff_graph_html_data[]
static const FFResourceDefinition resource_definitions[]
char * ff_resman_get_string(FFResourceId resource_id)
static const AVClass resman_class
void ff_resman_uninit(void)
#define FF_ARRAY_ELEMS(a)
Describe the class of an AVClass context structure.
const unsigned * data_len
const unsigned char * data
AVDictionary * resource_dic
static AVFormatContext * ctx
static void inflate(uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)