From 00a4b8706602f929ee6715ee308b6929da60493c Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Thu, 15 Jan 2004 16:10:25 +0000 Subject: [PATCH] finally - multitrack inigo serialisation git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@81 d19143bc-622f-0410-bfdd-b5b2a6649095 --- mlt/src/framework/mlt_frame.c | 9 --------- mlt/src/framework/mlt_tractor.c | 3 ++- mlt/src/modules/inigo/producer_inigo.c | 2 -- src/framework/mlt_frame.c | 9 --------- src/framework/mlt_tractor.c | 3 ++- src/modules/inigo/producer_inigo.c | 2 -- 6 files changed, 4 insertions(+), 24 deletions(-) diff --git a/mlt/src/framework/mlt_frame.c b/mlt/src/framework/mlt_frame.c index f8f0787..19b7c81 100644 --- a/mlt/src/framework/mlt_frame.c +++ b/mlt/src/framework/mlt_frame.c @@ -263,16 +263,7 @@ int mlt_frame_get_audio( mlt_frame this, int16_t **buffer, mlt_audio_format *for void mlt_frame_close( mlt_frame this ) { - mlt_frame frame = mlt_frame_pop_frame( this ); - - while ( frame != NULL ) - { - mlt_frame_close( frame); - frame = mlt_frame_pop_frame( this ); - } - mlt_properties_close( &this->parent ); - free( this ); } diff --git a/mlt/src/framework/mlt_tractor.c b/mlt/src/framework/mlt_tractor.c index 147c45d..d818fb5 100644 --- a/mlt/src/framework/mlt_tractor.c +++ b/mlt/src/framework/mlt_tractor.c @@ -135,7 +135,6 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra mlt_producer target = mlt_multitrack_producer( multitrack ); mlt_producer_seek( target, mlt_producer_frame( parent ) ); mlt_producer_set_speed( target, mlt_producer_get_speed( parent ) ); - //mlt_producer_set_in_and_out( parent, mlt_producer_get_in( target ), mlt_producer_get_out( target ) ); } else { @@ -176,6 +175,8 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra mlt_properties frame_properties = mlt_frame_properties( *frame ); char label[ 30 ]; sprintf( label, "tractor_%d", count ); + while ( mlt_properties_get_data( frame_properties, label, NULL ) != NULL ) + strcat( label, "+" ); mlt_properties_set_data( frame_properties, label, store[ count ], 0, ( mlt_destructor )mlt_frame_close, NULL ); } diff --git a/mlt/src/modules/inigo/producer_inigo.c b/mlt/src/modules/inigo/producer_inigo.c index 5c60e29..3150ae6 100644 --- a/mlt/src/modules/inigo/producer_inigo.c +++ b/mlt/src/modules/inigo/producer_inigo.c @@ -48,9 +48,7 @@ static mlt_producer parse_inigo( char *file ) if ( result != NULL ) { mlt_properties properties = mlt_producer_properties( result ); - mlt_field field = mlt_properties_get_data( properties, "field", NULL ); mlt_properties_set( properties, "resource", file ); - mlt_properties_set( mlt_field_properties( field ), "resource", file ); } while( count -- ) diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index f8f0787..19b7c81 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -263,16 +263,7 @@ int mlt_frame_get_audio( mlt_frame this, int16_t **buffer, mlt_audio_format *for void mlt_frame_close( mlt_frame this ) { - mlt_frame frame = mlt_frame_pop_frame( this ); - - while ( frame != NULL ) - { - mlt_frame_close( frame); - frame = mlt_frame_pop_frame( this ); - } - mlt_properties_close( &this->parent ); - free( this ); } diff --git a/src/framework/mlt_tractor.c b/src/framework/mlt_tractor.c index 147c45d..d818fb5 100644 --- a/src/framework/mlt_tractor.c +++ b/src/framework/mlt_tractor.c @@ -135,7 +135,6 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra mlt_producer target = mlt_multitrack_producer( multitrack ); mlt_producer_seek( target, mlt_producer_frame( parent ) ); mlt_producer_set_speed( target, mlt_producer_get_speed( parent ) ); - //mlt_producer_set_in_and_out( parent, mlt_producer_get_in( target ), mlt_producer_get_out( target ) ); } else { @@ -176,6 +175,8 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra mlt_properties frame_properties = mlt_frame_properties( *frame ); char label[ 30 ]; sprintf( label, "tractor_%d", count ); + while ( mlt_properties_get_data( frame_properties, label, NULL ) != NULL ) + strcat( label, "+" ); mlt_properties_set_data( frame_properties, label, store[ count ], 0, ( mlt_destructor )mlt_frame_close, NULL ); } diff --git a/src/modules/inigo/producer_inigo.c b/src/modules/inigo/producer_inigo.c index 5c60e29..3150ae6 100644 --- a/src/modules/inigo/producer_inigo.c +++ b/src/modules/inigo/producer_inigo.c @@ -48,9 +48,7 @@ static mlt_producer parse_inigo( char *file ) if ( result != NULL ) { mlt_properties properties = mlt_producer_properties( result ); - mlt_field field = mlt_properties_get_data( properties, "field", NULL ); mlt_properties_set( properties, "resource", file ); - mlt_properties_set( mlt_field_properties( field ), "resource", file ); } while( count -- ) -- 1.7.4.4