]> git.sesse.net Git - mlt/commitdiff
Add mlt_cache_get_size()
authorDan Dennedy <dan@dennedy.org>
Mon, 5 Sep 2011 05:57:49 +0000 (22:57 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 5 Sep 2011 05:57:49 +0000 (22:57 -0700)
src/framework/mlt_cache.c
src/framework/mlt_cache.h

index f5b3cfebb88c578c016b1984375aff03553d0d9f..250ea4156994203b1c4c4fbf7ea6df176ce00bce 100644 (file)
@@ -215,6 +215,18 @@ void mlt_cache_set_size( mlt_cache cache, int size )
                cache->size = size;
 }
 
+/** Get the numer of possible cache items.
+ *
+ * \public \memberof mlt_cache_s
+ * \param cache the cache to check
+ * \return the current maximum size of the cache
+ */
+
+int mlt_cache_get_size( mlt_cache cache )
+{
+    return cache->size;
+}
+
 /** Destroy a cache.
  *
  * \public \memberof mlt_cache_s
index 5dfedd3a7ba1cf9f9ad020dbe074f0fc29e35e5e..fb0cca6a048c9e60f1a1e7c68facb6cb38089288 100644 (file)
@@ -31,6 +31,7 @@ extern void mlt_cache_item_close( mlt_cache_item item );
 
 extern mlt_cache mlt_cache_init();
 extern void mlt_cache_set_size( mlt_cache cache, int size );
+extern int mlt_cache_get_size( mlt_cache cache );
 extern void mlt_cache_close( mlt_cache cache );
 extern void mlt_cache_purge( mlt_cache cache, void *object );
 extern void mlt_cache_put( mlt_cache cache, void *object, void* data, int size, mlt_destructor destructor );