int mlt_frame_is_test_card( mlt_frame this )
{
- return mlt_properties_get_int( mlt_frame_properties( this ), "test_image" );
+ return mlt_deque_count( this->stack_image ) == 0 || mlt_properties_get_int( mlt_frame_properties( this ), "test_image" );
}
/** Check if we have a way to derive something than test audio.
double speed = mlt_properties_get_double( producer_properties, "_speed" );
mlt_properties properties = mlt_frame_properties( *frame );
mlt_properties_set_double( properties, "_speed", speed );
+ mlt_properties_set_int( properties, "hide", mlt_properties_get_int( mlt_producer_properties( producer ), "hide" ) );
}
else
{
mlt_properties_set_double( properties, "fps", mlt_producer_get_fps( this ) );
double speed = mlt_producer_get_speed( this );
mlt_properties_set_double( properties, "_speed", speed );
+ mlt_properties_set_int( properties, "test_audio", mlt_frame_is_test_audio( *frame ) );
+ mlt_properties_set_int( properties, "test_image", mlt_frame_is_test_card( *frame ) );
return 0;
}
mlt_properties_set_data( frame_properties, label, temp, 0, ( mlt_destructor )mlt_frame_close, NULL );
// Pick up first video and audio frames
- if ( audio == NULL && !mlt_frame_is_test_audio( temp ) )
+ if ( !done && !mlt_frame_is_test_audio( temp ) && !( mlt_properties_get_int( mlt_frame_properties( temp ), "hide" ) & 2 ) )
audio = temp;
- if ( video == NULL && !mlt_frame_is_test_card( temp ) )
+ if ( !done && !mlt_frame_is_test_card( temp ) && !( mlt_properties_get_int( mlt_frame_properties( temp ), "hide" ) & 1 ) )
video = temp;
}
{
// Process the transition
*frame = mlt_transition_process( this, this->a_frame, this->b_frame );
+ if ( !mlt_properties_get_int( mlt_frame_properties( this->a_frame ), "test_image" ) )
+ mlt_properties_set_int( mlt_frame_properties( this->b_frame ), "test_image", 1 );
+ if ( !mlt_properties_get_int( mlt_frame_properties( this->a_frame ), "test_audio" ) )
+ mlt_properties_set_int( mlt_frame_properties( this->b_frame ), "test_audio", 1 );
this->a_held = 0;
}
else
producer = NULL;
mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
}
- else if ( !strcmp( argv[ i ], "-track" ) )
+ else if ( !strcmp( argv[ i ], "-track" ) ||
+ !strcmp( argv[ i ], "-hide-track" ) ||
+ !strcmp( argv[ i ], "-hide-video" ) ||
+ !strcmp( argv[ i ], "-hide-audio" ) )
{
if ( producer != NULL )
mlt_playlist_append( playlist, producer );
mlt_multitrack_connect( multitrack, mlt_playlist_producer( playlist ), track ++ );
track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
playlist = mlt_playlist_init( );
+ if ( playlist != NULL )
+ {
+ properties = mlt_playlist_properties( playlist );
+ if ( !strcmp( argv[ i ], "-hide-track" ) )
+ mlt_properties_set_int( properties, "hide", 3 );
+ else if ( !strcmp( argv[ i ], "-hide-video" ) )
+ mlt_properties_set_int( properties, "hide", 1 );
+ else if ( !strcmp( argv[ i ], "-hide-audio" ) )
+ mlt_properties_set_int( properties, "hide", 2 );
+ }
}
else if ( strchr( argv[ i ], '=' ) )
{