Hi,i noticed that sometimes pixbufs producers stop caching converted images and do conversion on each get_image call. i found that it happens because of cached pixbuf, image and alpha been dropped from cache because of cache limit.
attached patch implement extending limit of that cache. it similar to: commit 1818d25300e4fee5b75e03d6bb365e669e410a4c Author: Dan Dennedy <d...@dennedy.org> Date: Mon Sep 1 10:10:12 2014 -0700 Add MLT_AVFORMAT_PRODUCER_CACHE environment variable. -- ________________________________________ Maksym Veremeyenko
>From bb55e62080a54218e4037d2f72b37c6eded8cbdc Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko <ve...@m1.tv> Date: Thu, 29 Jan 2015 13:04:47 +0200 Subject: [PATCH 6/7] introduce MLT_GTK2_PRODUCER_CACHE env var for extending default cache size of gtk2 pixbuf producer --- src/modules/gtk2/factory.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/modules/gtk2/factory.c b/src/modules/gtk2/factory.c index 5aee606..1e45d23 100644 --- a/src/modules/gtk2/factory.c +++ b/src/modules/gtk2/factory.c @@ -20,6 +20,7 @@ #include <string.h> #include <framework/mlt.h> #include <gdk/gdk.h> +#include <stdlib.h> #ifdef USE_PIXBUF extern mlt_producer producer_pixbuf_init( char *filename ); @@ -41,6 +42,13 @@ static void initialise( ) { init = 1; g_type_init( ); + if ( getenv("MLT_GTK2_PRODUCER_CACHE") ) + { + int n = atoi( getenv("MLT_GTK2_PRODUCER_CACHE" ) ); + mlt_service_cache_set_size( NULL, "pixbuf.image", n ); + mlt_service_cache_set_size( NULL, "pixbuf.alpha", n ); + mlt_service_cache_set_size( NULL, "pixbuf.pixbuf", n ); + } } } -- 1.7.7.6
------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel