MLT  7.34.0
mlt_cache.h
Go to the documentation of this file.
1 
23 #ifndef MLT_CACHE_H
24 #define MLT_CACHE_H
25 
26 #include "mlt_export.h"
27 #include "mlt_types.h"
28 
29 MLT_EXPORT void *mlt_cache_item_data(mlt_cache_item item, int *size);
30 MLT_EXPORT void mlt_cache_item_close(mlt_cache_item item);
31 
33 MLT_EXPORT void mlt_cache_set_size(mlt_cache cache, int size);
34 MLT_EXPORT int mlt_cache_get_size(mlt_cache cache);
35 MLT_EXPORT void mlt_cache_close(mlt_cache cache);
36 MLT_EXPORT void mlt_cache_purge(mlt_cache cache, void *object);
37 MLT_EXPORT void mlt_cache_put(
38  mlt_cache cache, void *object, void *data, int size, mlt_destructor destructor);
39 MLT_EXPORT mlt_cache_item mlt_cache_get(mlt_cache cache, void *object);
40 MLT_EXPORT void mlt_cache_put_frame(mlt_cache cache, mlt_frame frame);
41 MLT_EXPORT void mlt_cache_put_frame_audio(mlt_cache cache, mlt_frame frame);
42 MLT_EXPORT void mlt_cache_put_frame_image(mlt_cache cache, mlt_frame frame);
44 
45 #endif
Provides forward definitions of all public types.
int32_t mlt_position
Definition: mlt_types.h:255
void(* mlt_destructor)(void *)
pointer to destructor function
Definition: mlt_types.h:307
Cache item class.
Definition: mlt_cache.c:50
void mlt_cache_item_close(mlt_cache_item item)
Close a cache item.
Definition: mlt_cache.c:185
Cache class.
Definition: mlt_cache.c:82
void mlt_cache_put_frame_audio(mlt_cache cache, mlt_frame frame)
Put a frame in the cache with audio.
Definition: mlt_cache.c:580
void mlt_cache_close(mlt_cache cache)
Destroy a cache.
Definition: mlt_cache.c:247
mlt_cache_item mlt_cache_get(mlt_cache cache, void *object)
Get a chunk of data from the cache.
Definition: mlt_cache.c:433
int mlt_cache_get_size(mlt_cache cache)
Get the number of possible cache items.
Definition: mlt_cache.c:236
void mlt_cache_put(mlt_cache cache, void *object, void *data, int size, mlt_destructor destructor)
Put a chunk of data in the cache.
Definition: mlt_cache.c:353
void mlt_cache_put_frame(mlt_cache cache, mlt_frame frame)
Put a frame in the cache with audio and video.
Definition: mlt_cache.c:562
void * mlt_cache_item_data(mlt_cache_item item, int *size)
Get the data pointer from the cache item.
Definition: mlt_cache.c:106
mlt_cache mlt_cache_init()
Create a new cache.
Definition: mlt_cache.c:201
void mlt_cache_purge(mlt_cache cache, void *object)
Remove cache entries for an object.
Definition: mlt_cache.c:269
void mlt_cache_put_frame_image(mlt_cache cache, mlt_frame frame)
Put a frame in the cache with image.
Definition: mlt_cache.c:598
void mlt_cache_set_size(mlt_cache cache, int size)
Set the number of items to cache.
Definition: mlt_cache.c:223
mlt_frame mlt_cache_get_frame(mlt_cache cache, mlt_position position)
Get a frame from the cache.
Definition: mlt_cache.c:614
Frame class.
Definition: mlt_frame.h:91