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

index 161f3b0bb9024bf6ded9e226757f8ea94b9f0c0f..6c8cd6c6572f3a9c745f956630fb84764ff182c8 100644 (file)
@@ -33,6 +33,8 @@ clean:
 
 install: all
        install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
+       install -d "$(DESTDIR)$(datadir)/mlt/vorbis"
+       install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/vorbis"
 
 ifneq ($(wildcard .depend),)
 include .depend
index 3df2e7524f72a6cc0c569b78f4a5696afbe7ad5b..a044bfa8307c896514170a3d3821a732bcedb49b 100644 (file)
  */
 
 #include <string.h>
+#include <limits.h>
 #include <framework/mlt.h>
 
 extern mlt_producer producer_vorbis_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/vorbis/%s", mlt_environment( "MLT_DATA" ), (char*) data );
+       return mlt_properties_parse_yaml( file );
+}
+
 MLT_REPOSITORY
 {
        MLT_REGISTER( producer_type, "vorbis", producer_vorbis_init );
+       MLT_REGISTER_METADATA( producer_type, "vorbis", metadata, "producer_vorbis.yml" );
 }
diff --git a/src/modules/vorbis/producer_vorbis.yml b/src/modules/vorbis/producer_vorbis.yml
new file mode 100644 (file)
index 0000000..85fc61b
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: producer
+identifier: vorbis
+title: Ogg Vorbis
+version: 1
+copyright: Visual Media FX ?
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Audio