Hi

http://www.kdenlive.org/mantis/view.php?id=235
to solve this, a made a patch for mlt, wich allows to setup params for frei0r 
plugins (which have not min/max vals and cause crashes).

the patch here is for mlt to solve this not only for kdenlive.

every wrong plugins, needs now a yml file (which will be used if present).

everybody who can submit a yml file for a buggy plugin:
plases send this to the mailing list, so i can update this all in mlt later

regards marco

Am Wednesday 22 October 2008 09:28:52 schrieben Sie:
> Le mardi 21 octobre 2008 à 19:16 +0200, Marco a écrit :
> > i wrote the frei0r plugin for mlt.
>
> For your attention, I found this bug:
> http://www.kdenlive.org/mantis/view.php?id=249
>
> FreiOr recently moved to GIT:
> Checkout: git clone git://code.dyne.org/frei0r.git
> update: git pull

diff --git a/mlt/src/modules/frei0r/Makefile b/mlt/src/modules/frei0r/Makefile
index 61b927a..f261e15 100644
--- a/mlt/src/modules/frei0r/Makefile
+++ b/mlt/src/modules/frei0r/Makefile
@@ -31,6 +31,7 @@ clean:
 
 install: all
 	install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
+	install -m 644 *.yml "$(DESTDIR)$(prefix)/share/mlt/frei0r"
 
 ifneq ($(wildcard .depend),)
 include .depend
diff --git a/mlt/src/modules/frei0r/factory.c b/mlt/src/modules/frei0r/factory.c
index 6c14611..568ffb1 100644
--- a/mlt/src/modules/frei0r/factory.c
+++ b/mlt/src/modules/frei0r/factory.c
@@ -23,6 +23,7 @@
 
 #include <stddef.h>
 #include <stdio.h>
+#include <sys/stat.h>
 #include <sys/types.h>
 #include <dirent.h>
 #include <dlfcn.h>
@@ -36,6 +37,28 @@ extern mlt_frame transition_process( mlt_transition transition, mlt_frame a_fram
 
 static mlt_properties fill_param_info ( mlt_service_type type, const char *service_name, char *name )
 {
+	char file[ PATH_MAX ];
+	char servicetype[ 1024 ]="";
+	struct stat stat_buff;
+	
+	switch ( type ) {
+		case filter_type:
+			strcpy ( servicetype , "filter" );
+			break;
+		case transition_type:
+			strcpy ( servicetype , "transition" ) ;
+			break;
+		default:
+			strcpy ( servicetype , "" );
+	};
+	
+	snprintf( file, PATH_MAX, "%s/frei0r/%s_%s.yml", mlt_environment( "MLT_DATA" ), servicetype, service_name );
+	stat(file,&stat_buff);
+
+	if (S_ISREG(stat_buff.st_mode)){
+		return mlt_properties_parse_yaml( file );
+	}
+		
 	void* handle=dlopen(name,RTLD_LAZY);
 	if (!handle) return NULL;
 	void (*plginfo)(f0r_plugin_info_t*)=dlsym(handle,"f0r_get_plugin_info");
diff --git a/mlt/src/modules/frei0r/filter_frei0r.nosync0r.yml b/mlt/src/modules/frei0r/filter_frei0r.nosync0r.yml
new file mode 100644
index 0000000..1cd81ff
--- /dev/null
+++ b/mlt/src/modules/frei0r/filter_frei0r.nosync0r.yml
@@ -0,0 +1,32 @@
+schema_version: 0.1
+type: filter # consumer, filter, producer, or transition
+identifier: frei0r.nosync0r
+title: NoSync0r
+version: 0.0.1
+license: GPL
+language: en
+url: none
+creator: frei0r
+tags:
+  - Video # this may produce video
+description: Frei0r Module
+
+notes: Implementation or additional usage notes go here.
+bugs: # this can be just for documentation, or the tool may disclose it to help user avoid pitfalls
+  - need to do some speed improvement.
+
+parameters:
+  - identifier: HSync
+    title: Hsync
+    type: float
+    description: HSync
+    readonly: no
+    required: yes
+    minimum: 0
+    maximum: 1
+    default: 0
+    mutable: no
+    widget: spinner
+    unit: pixel
+
+
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Kdenlive-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kdenlive-devel

Reply via email to