#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 );
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 );
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 );
}
--- /dev/null
+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