Blender V2.61 - r43446
Classes | Typedefs | Functions | Variables

moviecache.c File Reference

#include <stdlib.h>
#include <memory.h>
#include "MEM_guardedalloc.h"
#include "MEM_CacheLimiterC-Api.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_mempool.h"
#include "IMB_moviecache.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"

Go to the source code of this file.

Classes

struct  MovieCache
struct  MovieCacheKey
struct  MovieCacheItem

Typedefs

typedef struct MovieCache MovieCache
typedef struct MovieCacheKey MovieCacheKey
typedef struct MovieCacheItem MovieCacheItem

Functions

static unsigned int moviecache_hashhash (const void *keyv)
static int moviecache_hashcmp (const void *av, const void *bv)
static void moviecache_keyfree (void *val)
static void moviecache_valfree (void *val)
static void check_unused_keys (MovieCache *cache)
static int compare_int (const void *av, const void *bv)
static void IMB_moviecache_destructor (void *p)
static intptr_t IMB_get_size_in_memory (ImBuf *ibuf)
static intptr_t get_item_size (void *p)
void IMB_moviecache_init (void)
void IMB_moviecache_destruct (void)
struct MovieCacheIMB_moviecache_create (int keysize, GHashHashFP hashfp, GHashCmpFP cmpfp, MovieCacheGetKeyDataFP getdatafp)
void IMB_moviecache_put (MovieCache *cache, void *userkey, ImBuf *ibuf)
ImBufIMB_moviecache_get (MovieCache *cache, void *userkey)
void IMB_moviecache_free (MovieCache *cache)
void IMB_moviecache_get_cache_segments (MovieCache *cache, int proxy, int render_flags, int *totseg_r, int **points_r)

Variables

static MEM_CacheLimiterClimitor = NULL

Detailed Description

Definition in file moviecache.c.


Typedef Documentation

typedef struct MovieCache MovieCache
typedef struct MovieCacheKey MovieCacheKey

Function Documentation

static void check_unused_keys ( MovieCache cache) [static]
static int compare_int ( const void *  av,
const void *  bv 
) [static]

Definition at line 130 of file moviecache.c.

Referenced by IMB_moviecache_get_cache_segments().

static intptr_t get_item_size ( void *  p) [static]

Definition at line 179 of file moviecache.c.

References MovieCacheItem::ibuf, IMB_get_size_in_memory(), and size().

Referenced by IMB_moviecache_init().

static intptr_t IMB_get_size_in_memory ( ImBuf ibuf) [static]
struct MovieCache* IMB_moviecache_create ( int  keysize,
GHashHashFP  hashfp,
GHashCmpFP  cmpfp,
MovieCacheGetKeyDataFP  getdatafp 
) [read]
void IMB_moviecache_destruct ( void  )

Definition at line 195 of file moviecache.c.

References delete_MEM_CacheLimiter(), and limitor.

Referenced by free_blender().

static void IMB_moviecache_destructor ( void *  p) [static]

Definition at line 137 of file moviecache.c.

References MovieCacheItem::c_handle, MovieCacheItem::ibuf, IMB_freeImBuf(), and NULL.

Referenced by IMB_moviecache_init().

void IMB_moviecache_free ( MovieCache cache)
ImBuf* IMB_moviecache_get ( MovieCache cache,
void *  userkey 
) [read]
void IMB_moviecache_get_cache_segments ( MovieCache cache,
int  proxy,
int  render_flags,
int *  totseg_r,
int **  points_r 
)
void IMB_moviecache_init ( void  )
void IMB_moviecache_put ( MovieCache cache,
void *  userkey,
ImBuf ibuf 
)
static int moviecache_hashcmp ( const void *  av,
const void *  bv 
) [static]

Definition at line 85 of file moviecache.c.

References MovieCacheKey::cache_owner, MovieCache::cmpfp, and MovieCacheKey::userkey.

Referenced by IMB_moviecache_create().

static unsigned int moviecache_hashhash ( const void *  keyv) [static]
static void moviecache_keyfree ( void *  val) [static]
static void moviecache_valfree ( void *  val) [static]

Variable Documentation

MEM_CacheLimiterC* limitor = NULL [static]

Definition at line 47 of file moviecache.c.

Referenced by IMB_moviecache_destruct(), IMB_moviecache_init(), and IMB_moviecache_put().