#include <mlt++/MltProducer.h>
#include "mlt_flip_effect.h"
+static void set_movit_parameters( GlslChain *chain, mlt_service service, mlt_frame frame );
+
static void yuv422_to_yuv422p( uint8_t *yuv422, uint8_t *yuv422p, int width, int height )
{
uint8_t *Y = yuv422p;
fingerprint->push_back( '(' );
fingerprint->append( mlt_properties_get( MLT_SERVICE_PROPERTIES( service ), "_unique_id" ) );
- bool disable = mlt_properties_get_int( MLT_SERVICE_PROPERTIES( service ), "movit.disable" );
+
+ const char* effect_fingerprint = mlt_properties_get( MLT_SERVICE_PROPERTIES( service ), "_movit fingerprint" );
+ if ( effect_fingerprint ) {
+ fingerprint->push_back( '[' );
+ fingerprint->append( effect_fingerprint );
+ fingerprint->push_back( ']' );
+ }
+
+ bool disable = mlt_properties_get_int( MLT_SERVICE_PROPERTIES( service ), "movit.parms.int.disable" );
if ( disable ) {
fingerprint->push_back( 'd' );
- bool ok = effect->set_int( "disable", 1 );
- assert(ok);
}
fingerprint->push_back( ')' );
}
// Build the chain if needed.
if ( !chain || new_fingerprint != chain->fingerprint ) {
- printf("=== CREATING NEW CHAIN (old chain=%p, leaf=%p, fingerprint=%s) ===\n", chain, leaf_service, new_fingerprint.c_str());
+ mlt_log_debug( leaf_service, "=== CREATING NEW CHAIN (old chain=%p, leaf=%p, fingerprint=%s) ===\n", chain, leaf_service, new_fingerprint.c_str() );
mlt_profile profile = mlt_service_profile( leaf_service );
chain = new GlslChain;
chain->effect_chain = new EffectChain( profile->display_aspect_num, profile->display_aspect_den );
chain->fingerprint = new_fingerprint;
build_movit_chain( leaf_service, frame, chain );
+ set_movit_parameters( chain, leaf_service, frame );
chain->effect_chain->add_effect( new Mlt::VerticalFlip );
ImageFormat output_format;
finalize_movit_chain( leaf_service, frame );
// Set per-frame parameters now that we know which Effect instances to set them on.
+ // (finalize_movit_chain may already have done this, though, but twice doesn't hurt.)
GlslChain *chain = GlslManager::get_chain( leaf_service );
set_movit_parameters( chain, leaf_service, frame );