]> git.sesse.net Git - mlt/commitdiff
Add service metadata for SDL module (WIP).
authorDan Dennedy <dan@dennedy.org>
Mon, 30 May 2011 06:41:52 +0000 (23:41 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 30 May 2011 06:41:52 +0000 (23:41 -0700)
src/modules/qimage/producer_qimage.yml
src/modules/sdl/Makefile
src/modules/sdl/consumer_sdl.yml [new file with mode: 0644]
src/modules/sdl/consumer_sdl_audio.yml [new file with mode: 0644]
src/modules/sdl/consumer_sdl_preview.yml [new file with mode: 0644]
src/modules/sdl/consumer_sdl_still.yml [new file with mode: 0644]
src/modules/sdl/factory.c
src/modules/sdl/producer_sdl_image.yml [new file with mode: 0644]

index f32c18f2294c17b90f11fb4a8a83e56a99030241..b998f9cc8dcd6c1b14a5fbef983f9e5c61bf7610 100644 (file)
@@ -1,7 +1,7 @@
 schema_version: 0.1
 type: producer
 identifier: qimage
-title: QImage
+title: Qt QImage
 version: 1
 copyright: Visual Media ?
 creator: Charles Yates
index 62f1fb3360d9feb3467ad64c39f52fa775d24cce..20a3eafc4e5158cb2b7a089eea3d46efb38d55f3 100644 (file)
@@ -58,6 +58,8 @@ clean:
 
 install: all
        install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
+       install -d "$(DESTDIR)$(datadir)/mlt/sdl"
+       install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/sdl"
 
 ifneq ($(wildcard .depend),)
 include .depend
diff --git a/src/modules/sdl/consumer_sdl.yml b/src/modules/sdl/consumer_sdl.yml
new file mode 100644 (file)
index 0000000..44ea82d
--- /dev/null
@@ -0,0 +1,12 @@
+schema_version: 0.1
+type: consumer
+identifier: sdl
+title: SDL Fast YUV
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Audio
+  - Video
diff --git a/src/modules/sdl/consumer_sdl_audio.yml b/src/modules/sdl/consumer_sdl_audio.yml
new file mode 100644 (file)
index 0000000..2e1d802
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: consumer
+identifier: sdl_audio
+title: SDL Audio Only
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Audio
diff --git a/src/modules/sdl/consumer_sdl_preview.yml b/src/modules/sdl/consumer_sdl_preview.yml
new file mode 100644 (file)
index 0000000..9017055
--- /dev/null
@@ -0,0 +1,12 @@
+schema_version: 0.1
+type: consumer
+identifier: sdl
+title: SDL
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Audio
+  - Video
diff --git a/src/modules/sdl/consumer_sdl_still.yml b/src/modules/sdl/consumer_sdl_still.yml
new file mode 100644 (file)
index 0000000..8476e4a
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: consumer
+identifier: sdl_still
+title: SDL RGB
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
index 4263fbac82862ab51d1a5a7b70c8af80ffa6753d..147f66b5410b1e28012cfcf2d27a54a039797301 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <string.h>
+#include <limits.h>
 #include <framework/mlt.h>
 
 extern mlt_consumer consumer_sdl_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
@@ -30,6 +31,13 @@ extern mlt_consumer consumer_sdl_preview_init( mlt_profile profile, mlt_service_
 extern mlt_producer producer_sdl_image_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 #endif
 
+static mlt_properties metadata( mlt_service_type type, const char *id, void *data )
+{
+       char file[ PATH_MAX ];
+       snprintf( file, PATH_MAX, "%s/sdl/%s", mlt_environment( "MLT_DATA" ), (char*) data );
+       return mlt_properties_parse_yaml( file );
+}
+
 MLT_REPOSITORY
 {
        MLT_REGISTER( consumer_type, "sdl", consumer_sdl_init );
@@ -38,5 +46,11 @@ MLT_REPOSITORY
        MLT_REGISTER( consumer_type, "sdl_still", consumer_sdl_still_init );
 #ifdef WITH_SDL_IMAGE
        MLT_REGISTER( producer_type, "sdl_image", producer_sdl_image_init );
+       MLT_REGISTER_METADATA( producer_type, "sdl_image", metadata, "consumer_sdl_image.yml" );
 #endif
+
+       MLT_REGISTER_METADATA( consumer_type, "sdl", metadata, "consumer_sdl.yml" );
+       MLT_REGISTER_METADATA( consumer_type, "sdl_audio", metadata, "consumer_sdl_audio.yml" );
+       MLT_REGISTER_METADATA( consumer_type, "sdl_preview", metadata, "consumer_sdl_preview.yml" );
+       MLT_REGISTER_METADATA( consumer_type, "sdl_still", metadata, "consumer_sdl_still.yml" );
 }
diff --git a/src/modules/sdl/producer_sdl_image.yml b/src/modules/sdl/producer_sdl_image.yml
new file mode 100644 (file)
index 0000000..d810b03
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: producer
+identifier: sdl_image
+title: SDL Image
+version: 1
+copyright: Visual Media FX ?
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video