]> git.sesse.net Git - mlt/commitdiff
Add service metadata for core module (WIP).
authorDan Dennedy <dan@dennedy.org>
Sun, 29 May 2011 18:26:27 +0000 (11:26 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 29 May 2011 18:26:27 +0000 (11:26 -0700)
24 files changed:
src/modules/core/Makefile
src/modules/core/factory.c
src/modules/core/filter_audiowave.yml [new file with mode: 0644]
src/modules/core/filter_brightness.yml [new file with mode: 0644]
src/modules/core/filter_channelcopy.yml [new file with mode: 0644]
src/modules/core/filter_crop.yml [new file with mode: 0644]
src/modules/core/filter_data_show.yml [new file with mode: 0644]
src/modules/core/filter_gamma.yml [new file with mode: 0644]
src/modules/core/filter_greyscale.yml [new file with mode: 0644]
src/modules/core/filter_luma.yml [new file with mode: 0644]
src/modules/core/filter_mirror.yml [new file with mode: 0644]
src/modules/core/filter_mono.yml [new file with mode: 0644]
src/modules/core/filter_obscure.yml [new file with mode: 0644]
src/modules/core/filter_region.yml [new file with mode: 0644]
src/modules/core/filter_transition.yml [new file with mode: 0644]
src/modules/core/filter_watermark.yml [new file with mode: 0644]
src/modules/core/producer_colour.yml [new file with mode: 0644]
src/modules/core/producer_consumer.yml [new file with mode: 0644]
src/modules/core/producer_hold.yml [new file with mode: 0644]
src/modules/core/producer_noise.yml [new file with mode: 0644]
src/modules/core/transition_composite.yml [new file with mode: 0644]
src/modules/core/transition_luma.yml [new file with mode: 0644]
src/modules/core/transition_mix.yml [new file with mode: 0644]
src/modules/core/transition_region.yml [new file with mode: 0644]

index b0a653c237a2c819079c1280fd91f02f1427f9b2..b24a843895f1413021ecac6dd741a2b8b20becdf 100644 (file)
@@ -69,10 +69,11 @@ clean:
 
 install: all
        install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
-       install -d "$(DESTDIR)$(prefix)/share/mlt/core"
+       install -d "$(DESTDIR)$(datadir)/mlt/core"
        install -m 644 data_fx.properties "$(DESTDIR)$(datadir)/mlt/core"
        install -m 644 loader.dict "$(DESTDIR)$(datadir)/mlt/core"
        install -m 644 loader.ini "$(DESTDIR)$(datadir)/mlt/core"
+       install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/core"
 
 ifneq ($(wildcard .depend),)
 include .depend
index 9f207faab46289361dd5cdf096a53db450928d42..5cb4550400851783d3a7631ed173d7a65ac9de9d 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <framework/mlt.h>
 #include <string.h>
+#include <limits.h>
 
 extern mlt_consumer consumer_null_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 extern mlt_filter filter_audiochannels_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
@@ -54,6 +55,34 @@ extern mlt_transition transition_luma_init( mlt_profile profile, mlt_service_typ
 extern mlt_transition transition_mix_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
 #include "transition_region.h"
 
+static mlt_properties metadata( mlt_service_type type, const char *id, void *data )
+{
+       char file[ PATH_MAX ];
+       const char *service_type = NULL;
+       switch ( type )
+       {
+               case filter_type:
+                       service_type = "filter";
+                       break;
+               case producer_type:
+                       service_type = "producer";
+                       break;
+               case transition_type:
+                       service_type = "transition";
+                       break;
+               default:
+                       return NULL;
+       }
+       if ( !strcmp( id, "grayscale" ) )
+               id = "greyscale";
+       else if ( !strcmp( id, "color" ) )
+               id = "colour";
+       else if ( !strcmp( id, "channelswap" ) )
+               id = "channelcopy";
+       snprintf( file, PATH_MAX, "%s/core/%s_%s.yml", mlt_environment( "MLT_DATA" ), service_type, id );
+       return mlt_properties_parse_yaml( file );
+}
+
 MLT_REPOSITORY
 {
        MLT_REGISTER( consumer_type, "null", consumer_null_init );
@@ -92,4 +121,30 @@ MLT_REPOSITORY
        MLT_REGISTER( transition_type, "luma", transition_luma_init );
        MLT_REGISTER( transition_type, "mix", transition_mix_init );
        MLT_REGISTER( transition_type, "region", transition_region_init );
+
+       MLT_REGISTER_METADATA( filter_type, "audiowave", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "brightness", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "channelcopy", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "channelswap", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "crop", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "data_show", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "gamma", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "greyscale", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "grayscale", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "luma", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "mirror", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "mono", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "obscure", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "region", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "transition", metadata, NULL );
+       MLT_REGISTER_METADATA( filter_type, "watermark", metadata, NULL );
+       MLT_REGISTER_METADATA( producer_type, "colour", metadata, NULL );
+       MLT_REGISTER_METADATA( producer_type, "color", metadata, NULL );
+       MLT_REGISTER_METADATA( producer_type, "consumer", metadata, NULL );
+       MLT_REGISTER_METADATA( producer_type, "hold", metadata, NULL );
+       MLT_REGISTER_METADATA( producer_type, "noise", metadata, NULL );
+       MLT_REGISTER_METADATA( transition_type, "composite", metadata, NULL );
+       MLT_REGISTER_METADATA( transition_type, "luma", metadata, NULL );
+       MLT_REGISTER_METADATA( transition_type, "mix", metadata, NULL );
+       MLT_REGISTER_METADATA( transition_type, "region", metadata, NULL );
 }
diff --git a/src/modules/core/filter_audiowave.yml b/src/modules/core/filter_audiowave.yml
new file mode 100644 (file)
index 0000000..f9fbaab
--- /dev/null
@@ -0,0 +1,17 @@
+schema_version: 0.1
+type: filter
+identifier: audiowave
+title: Audio Waveform
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+description: Generate audio waveforms.
+tags:
+  - Video
+bugs:
+  - >
+    This does not work alone on audio-only clips. It must have video to overwrite.
+    A workaround is to apply this to a multitrack with a color generator.
+  - The quality of the waveforms is not so good especially for high definition video.
diff --git a/src/modules/core/filter_brightness.yml b/src/modules/core/filter_brightness.yml
new file mode 100644 (file)
index 0000000..d245591
--- /dev/null
@@ -0,0 +1,31 @@
+schema_version: 0.1
+type: filter
+identifier: brightness
+title: Brightness
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+description: Adjust the brightness value of the image.
+tags:
+  - Video
+parameters:
+  - identifier: argument
+    title: Start level
+    type: float
+    minimum: 0.0
+    maximum: 15.0
+    default: 1.0
+  - identifier: start
+    title: Start level
+    type: float
+    minimum: 0.0
+    maximum: 15.0
+    default: 1.0
+  - identifier: end
+    title: End level
+    type: float
+    minimum: 0.0
+    maximum: 15.0
+    default: 1.0
diff --git a/src/modules/core/filter_channelcopy.yml b/src/modules/core/filter_channelcopy.yml
new file mode 100644 (file)
index 0000000..0a4da21
--- /dev/null
@@ -0,0 +1,39 @@
+schema_version: 0.1
+type: filter
+identifier: channelcopy
+title: Copy Channels
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+description: Copy one audio channel to another.
+tags:
+  - Audio
+parameters:
+  - identifier: argument
+    title: To
+    type: integer
+    minimum: 0
+    maximum: 15
+    default: 1
+  - identifier: to
+    title: To
+    type: integer
+    minimum: 0
+    maximum: 15
+    default: 1
+  - identifer: from
+    title: From
+    type: integer
+    minimum: 0
+    maximum: 15
+    default: 0
+  - identifier: swap
+    title: Swap
+    description: Swap the two channels instead of duplicating the source channel.
+    type: integer
+    minimum: 0
+    maximum: 1
+    default: 0
+    widget: checkbox
diff --git a/src/modules/core/filter_crop.yml b/src/modules/core/filter_crop.yml
new file mode 100644 (file)
index 0000000..c58e610
--- /dev/null
@@ -0,0 +1,76 @@
+schema_version: 0.1
+type: filter
+identifier: crop
+title: Crop
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+description: Remove pixels from the edges of the video.
+tags:
+  - Video
+notes: >
+  This filter is meant to be included as a normalizing filter attached
+  automatically by the loader so that cropping occurs early in the processing
+  stack and can request the full resolution of the source image. Then, a
+  second instance of the filter may be applied to set the parameters of the
+  crop operation.
+parameters:
+  - identifier: argument
+    title: Active
+    description: Whether to do the processing (1) or simply set the parameters.
+    type: integer
+    minimum: 0
+    maximum: 1
+    default: 0
+  - identifier: left
+    title: Left
+    type: integer
+    minimum: 0
+    default: 0
+    unit: pixels
+  - identifier: right
+    title: Right
+    type: integer
+    minimum: 0
+    default: 0
+    unit: pixels
+  - identifier: top
+    title: Top
+    type: integer
+    minimum: 0
+    default: 0
+    unit: pixels
+  - identifier: bottom
+    title: Bottom
+    type: integer
+    minimum: 0
+    default: 0
+    unit: pixels
+  - identifier: center
+    title: Center crop
+    description: Whether to automatically crop whatever is needed to fill the output frame and prevent padding.
+    type: integer
+    minimum: 0
+    maximum: 1
+    default: 0
+    widget: checkbox
+  - identifier: center_bias
+    title: Center balance
+    description: When center crop is enabled, offset the center point.
+    type: integer
+    minimum: 0
+    default: 0
+    unit: pixels
+  - identifier: use_profile
+    title: Use profile resolution
+    description: >
+      This is useful for proxy editing. Normally all crop values are expressed in terms
+      of pixels of the source footage, but this option makes them relative to the
+      profile resolution.
+    type: integer
+    minimum: 0
+    maximum: 1
+    default: 0
+    widget: checkbox
diff --git a/src/modules/core/filter_data_show.yml b/src/modules/core/filter_data_show.yml
new file mode 100644 (file)
index 0000000..b15678d
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: data_show
+title: Template
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_gamma.yml b/src/modules/core/filter_gamma.yml
new file mode 100644 (file)
index 0000000..963dde9
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: gamma
+title: Gamma
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_greyscale.yml b/src/modules/core/filter_greyscale.yml
new file mode 100644 (file)
index 0000000..ff31284
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: greyscale
+title: Greyscale
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_luma.yml b/src/modules/core/filter_luma.yml
new file mode 100644 (file)
index 0000000..2f37105
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: luma
+title: Wipe
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_mirror.yml b/src/modules/core/filter_mirror.yml
new file mode 100644 (file)
index 0000000..1b8013e
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: mirror
+title: Mirror
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_mono.yml b/src/modules/core/filter_mono.yml
new file mode 100644 (file)
index 0000000..3d66372
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: mono
+title: Threshold
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_obscure.yml b/src/modules/core/filter_obscure.yml
new file mode 100644 (file)
index 0000000..6fbe30b
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: obscure
+title: Obscure
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_region.yml b/src/modules/core/filter_region.yml
new file mode 100644 (file)
index 0000000..24aa9fe
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: region
+title: Regionalize
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: CHarles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_transition.yml b/src/modules/core/filter_transition.yml
new file mode 100644 (file)
index 0000000..286fa3b
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: transition
+title: Transition as Filter
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/filter_watermark.yml b/src/modules/core/filter_watermark.yml
new file mode 100644 (file)
index 0000000..8b963dd
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: filter
+identifier: watermark
+title: Overlay
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/producer_colour.yml b/src/modules/core/producer_colour.yml
new file mode 100644 (file)
index 0000000..0a34349
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: producer
+identifier: colour
+title: Color
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/producer_consumer.yml b/src/modules/core/producer_consumer.yml
new file mode 100644 (file)
index 0000000..6f2c14b
--- /dev/null
@@ -0,0 +1,12 @@
+schema_version: 0.1
+type: producer
+identifier: consumer
+title: Consumer as Producer
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Audio
+  - Video
diff --git a/src/modules/core/producer_hold.yml b/src/modules/core/producer_hold.yml
new file mode 100644 (file)
index 0000000..84298aa
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: producer
+identifier: hold
+title: Still
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/producer_noise.yml b/src/modules/core/producer_noise.yml
new file mode 100644 (file)
index 0000000..9cbb86a
--- /dev/null
@@ -0,0 +1,12 @@
+schema_version: 0.1
+type: producer
+identifier: noise
+title: Noise
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Audio
+  - Video
diff --git a/src/modules/core/transition_composite.yml b/src/modules/core/transition_composite.yml
new file mode 100644 (file)
index 0000000..1e30de0
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: transition
+identifier: composite
+title: Composite
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/transition_luma.yml b/src/modules/core/transition_luma.yml
new file mode 100644 (file)
index 0000000..5ad9cf3
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: transition
+identifier: luma
+title: Wipe
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Video
diff --git a/src/modules/core/transition_mix.yml b/src/modules/core/transition_mix.yml
new file mode 100644 (file)
index 0000000..9c0cd37
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: transition
+identifier: mix
+title: Mix
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy
+license: LGPLv2.1
+language: en
+tags:
+  - Audio
diff --git a/src/modules/core/transition_region.yml b/src/modules/core/transition_region.yml
new file mode 100644 (file)
index 0000000..acfa024
--- /dev/null
@@ -0,0 +1,11 @@
+schema_version: 0.1
+type: transition
+identifier: region
+title: Regionalize
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+  - Video