mlt_properties_set_int( properties, "width", *width );
mlt_properties_set_int( properties, "height", *height );
mlt_properties_set_double( properties, "aspect_ratio", mlt_frame_get_aspect_ratio( test_frame ) );
- mlt_properties_set( properties, "rescale.interp", "none" );
- mlt_properties_set( properties, "scale", "off" );
}
else
{
if ( hide == 0 && this->get_audio != NULL )
{
+ mlt_position position = mlt_frame_get_position( this );
this->get_audio( this, buffer, format, frequency, channels, samples );
+ mlt_frame_set_position( this, position );
}
else if ( mlt_properties_get_data( properties, "audio", NULL ) )
{
mlt_properties properties = mlt_frame_properties( *frame );
mlt_properties_set_double( properties, "_speed", speed );
mlt_properties_set_position( properties, "_position", position );
- if ( mlt_properties_get_int( properties, "test_image" ) == 0 )
- mlt_properties_set_int( properties, "test_image", hide & 1 );
- if ( mlt_properties_get_int( properties, "test_audio" ) == 0 )
- mlt_properties_set_int( properties, "test_audio", hide & 2 );
+ mlt_properties_set_int( properties, "hide", hide );
}
else
{
mlt_properties_set( mlt_playlist_properties( this ), "resource", "<playlist>" );
mlt_properties_set( mlt_playlist_properties( this ), "mlt_type", "mlt_producer" );
mlt_properties_set_position( mlt_playlist_properties( this ), "in", 0 );
- mlt_properties_set_position( mlt_playlist_properties( this ), "out", 0 );
+ mlt_properties_set_position( mlt_playlist_properties( this ), "out", -1 );
mlt_properties_set_position( mlt_playlist_properties( this ), "length", 0 );
this->size = 10;
char key[ 25 ];
sprintf( key, "_clone.%d", clone_index - 1 );
clone = mlt_properties_get_data( mlt_producer_properties( mlt_producer_cut_parent( this ) ), key, NULL );
- if ( clone == NULL ) fprintf( stderr, "requested clone doesn't exist\n" );
+ if ( clone == NULL ) fprintf( stderr, "requested clone doesn't exist %d\n", clone_index );
clone = clone == NULL ? this : clone;
}
else
int i = 0;
char key[ 25 ];
- // If the number of existing clones is different, the create/remove as necessary
+ // If the number of existing clones is different, then create/remove as necessary
if ( existing != clones )
{
if ( existing < clones )
mlt_properties properties = mlt_parser_properties( this );
mlt_properties producers = mlt_properties_get_data( properties, "producers", NULL );
mlt_producer parent = mlt_producer_cut_parent( object );
- if ( !mlt_producer_is_mix( mlt_producer_cut_parent( object ) ) && mlt_producer_is_cut( object ) )
+ if ( mlt_service_identify( ( mlt_service )mlt_producer_cut_parent( object ) ) == producer_type && mlt_producer_is_cut( object ) )
{
int ref_count = 0;
clip_references *old_refs = NULL;
// Determine which data_queue to pass on...
void *data_queue = NULL;
+ // Temporary properties
+ mlt_properties temp_properties = NULL;
+
// Get the multitrack's producer
mlt_producer target = mlt_multitrack_producer( multitrack );
mlt_producer_seek( target, mlt_producer_frame( parent ) );
// Get a frame from the producer
mlt_service_get_frame( this->producer, &temp, i );
+ // Get the temporary properties
+ temp_properties = mlt_frame_properties( temp );
+
// Check for last track
- done = mlt_properties_get_int( mlt_frame_properties( temp ), "last_track" );
+ done = mlt_properties_get_int( temp_properties, "last_track" );
// We store all frames with a destructor on the output frame
sprintf( label, "_%s_%d", id, count ++ );
mlt_properties_set_data( frame_properties, label, temp, 0, ( mlt_destructor )mlt_frame_close, NULL );
// We want the last data_queue
- if ( mlt_properties_get_data( mlt_frame_properties( temp ), "data_queue", NULL ) != NULL )
+ if ( !done && mlt_properties_get_data( temp_properties, "data_queue", NULL ) != NULL )
data_queue = mlt_properties_get_data( mlt_frame_properties( temp ), "data_queue", NULL );
// Pick up first video and audio frames
- if ( !done && !mlt_frame_is_test_audio( temp ) )
+ if ( !done && !mlt_frame_is_test_audio( temp ) && !( mlt_properties_get_int( temp_properties, "hide" ) & 2 ) )
audio = temp;
- if ( !done && !mlt_frame_is_test_card( temp ) )
+ if ( !done && !mlt_frame_is_test_card( temp ) && !( mlt_properties_get_int( temp_properties, "hide" ) & 1 ) )
video = temp;
}
mlt_properties_set_position( frame_properties, "_position", mlt_properties_get_position( video_properties, "_position" ) );
}
+ mlt_frame_set_position( *frame, mlt_producer_frame( parent ) );
mlt_properties_set_int( mlt_frame_properties( *frame ), "test_audio", audio == NULL );
mlt_properties_set_int( mlt_frame_properties( *frame ), "test_image", video == NULL );
}
mlt_properties properties = mlt_transition_properties( this );
+ int accepts_blanks = mlt_properties_get_int( properties, "_accepts_blanks" );
int a_track = mlt_properties_get_int( properties, "a_track" );
int b_track = mlt_properties_get_int( properties, "b_track" );
mlt_position in = mlt_properties_get_position( properties, "in" );
mlt_position position = mlt_frame_get_position( this->a_frame );
if ( position >= in && position <= out )
{
-#if 0
- // TODO: This could is breaking muliple transitions, but it would be nice to have...
- // essentially, it allows transitions to run over whole tracks, while ignoring test cards
- // (alternative is to put the handling in the transitions themselves :-/)
- if ( this->b_frame == NULL || ( mlt_frame_is_test_card( this->b_frame ) && mlt_frame_is_test_audio( this->b_frame ) ) )
+ if ( !accepts_blanks && ( this->b_frame == NULL || ( mlt_frame_is_test_card( this->b_frame ) && mlt_frame_is_test_audio( this->b_frame ) ) ) )
{
*frame = this->a_frame;
}
- else if ( this->a_frame == NULL || ( mlt_frame_is_test_card( this->a_frame ) && mlt_frame_is_test_audio( this->a_frame ) ) )
+ else if ( !accepts_blanks && ( this->a_frame == NULL || ( mlt_frame_is_test_card( this->a_frame ) && mlt_frame_is_test_audio( this->a_frame ) ) ) )
{
mlt_frame t = this->a_frame;
this->a_frame = this->b_frame;
*frame = this->a_frame;
}
else
-#endif
{
+ int hide = 0;
*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 );
+ hide = 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 );
+ hide |= 2;
+ mlt_properties_set_int( mlt_frame_properties( this->b_frame ), "hide", hide );
}
this->a_held = 0;
}
}
//fprintf( stderr, "transition_mix: previous %f current %f\n", mix_start, mix_end );
- mlt_properties_set_int( b_props, "test_audio", mlt_properties_get_int( b_props, "original_test_audio" ) );
mlt_frame_mix_audio( frame, b_frame, mix_start, mix_end, buffer, format, frequency, channels, samples );
return 0;
mlt_properties_set_double( properties, "previous_mix", mlt_properties_get_double( b_props, "audio.mix" ) );
mlt_properties_set_double( b_props, "audio.reverse", mlt_properties_get_double( properties, "reverse" ) );
-
- mlt_properties_set_int( b_props, "original_test_audio", mlt_properties_get_int( b_props, "test_audio" ) );
}
// Backup the original get_audio (it's still needed)
this->process = transition_process;
if ( arg != NULL )
mlt_properties_set_double( mlt_transition_properties( this ), "start", atof( arg ) );
+ mlt_properties_set_int( mlt_transition_properties( this ), "_accepts_blanks", 1 );
}
return this;
}