]> git.sesse.net Git - mlt/commitdiff
Add service metadata to linsys module (WIP).
authorDan Dennedy <dan@dennedy.org>
Mon, 30 May 2011 19:13:55 +0000 (12:13 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 30 May 2011 19:13:55 +0000 (12:13 -0700)
src/modules/linsys/Makefile
src/modules/linsys/consumer_sdi.yml [new file with mode: 0644]
src/modules/linsys/factory.c

index 500abcc21b5d8d645255900d8cc94e86c885dc81..6dc3df4fe7b5c8c2b763d8d55dc364a716274f43 100755 (executable)
@@ -33,6 +33,8 @@ clean:
 
 install: all
        install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
+       install -d "$(DESTDIR)$(datadir)/mlt/linsys"
+       install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/linsys"
 
 ifneq ($(wildcard .depend),)
 include .depend
diff --git a/src/modules/linsys/consumer_sdi.yml b/src/modules/linsys/consumer_sdi.yml
new file mode 100644 (file)
index 0000000..ba18f36
--- /dev/null
@@ -0,0 +1,12 @@
+schema_version: 0.1
+type: consumer
+identifier: sdi
+title: Linear Systems SDI
+version: 1
+copyright: Broadcasting Center Europe S.A.
+creator: Thomas Kurpick
+license: GPLv2
+language: en
+tags:
+  - Audio
+  - Video
index 61013154d81d8efcce8200b9724f16e25c36e017..9519e0df83e1de0a2b7c32a0a911d5a0ac4b2818 100644 (file)
@@ -3,11 +3,20 @@
 */
 
 #include <framework/mlt.h>
+#include <limits.h>
 #include <string.h>
 
 extern mlt_consumer consumer_SDIstream_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 
+static mlt_properties metadata( mlt_service_type type, const char *id, void *data )
+{
+       char file[ PATH_MAX ];
+       snprintf( file, PATH_MAX, "%s/linsys/%s", mlt_environment( "MLT_DATA" ), (char*) data );
+       return mlt_properties_parse_yaml( file );
+}
+
 MLT_REPOSITORY
 {
        MLT_REGISTER( consumer_type, "sdi", consumer_SDIstream_init );
+       MLT_REGISTER_METADATA( consumer_type, "sdi", metadata, "consumer_sdi.yml" );
 }