From 23571c330fd1644833dcb73661ac987eda177200 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Sun, 21 Mar 2004 11:59:55 +0000 Subject: [PATCH] in point fix, low latency sdl, minor fixes git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@223 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/mlt_producer.c | 7 ++++--- src/framework/mlt_properties.c | 2 +- src/modules/fezzik.dict | 2 ++ src/modules/fezzik/producer_fezzik.c | 3 +++ src/modules/sdl/consumer_sdl.c | 2 +- src/tests/hello.c | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index 430aab3..74441f9 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -123,18 +123,19 @@ int mlt_producer_seek( mlt_producer this, mlt_position position ) { // Determine eof handling char *eof = mlt_properties_get( mlt_producer_properties( this ), "eof" ); + int use_points = 1 - mlt_properties_get_int( mlt_producer_properties( this ), "ignore_points" ); // Check bounds if ( position < 0 ) { position = 0; } - else if ( !strcmp( eof, "pause" ) && position >= mlt_producer_get_playtime( this ) ) + else if ( use_points && !strcmp( eof, "pause" ) && position >= mlt_producer_get_playtime( this ) ) { mlt_producer_set_speed( this, 0 ); position = mlt_producer_get_playtime( this ) - 1; } - else if ( !strcmp( eof, "loop" ) && position >= mlt_producer_get_playtime( this ) ) + else if ( use_points && !strcmp( eof, "loop" ) && position >= mlt_producer_get_playtime( this ) ) { position = position % mlt_producer_get_playtime( this ); } @@ -143,7 +144,7 @@ int mlt_producer_seek( mlt_producer this, mlt_position position ) mlt_properties_set_position( mlt_producer_properties( this ), "_position", position ); // Calculate the absolute frame - mlt_properties_set_position( mlt_producer_properties( this ), "_frame", mlt_producer_get_in( this ) + position ); + mlt_properties_set_position( mlt_producer_properties( this ), "_frame", use_points * mlt_producer_get_in( this ) + position ); return 0; } diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index d4d14cf..7a7010e 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -100,7 +100,7 @@ mlt_properties mlt_properties_load( char *filename ) temp[ strlen( temp ) - 1 ] = '\0'; // Parse and set the property - if ( strcmp( temp, "" ) ) + if ( strcmp( temp, "" ) && temp[ 0 ] != '#' ) mlt_properties_parse( this, temp ); } diff --git a/src/modules/fezzik.dict b/src/modules/fezzik.dict index 012ecea..d299d3c 100644 --- a/src/modules/fezzik.dict +++ b/src/modules/fezzik.dict @@ -5,6 +5,7 @@ http://*=avformat *.avi=avformat *.dv=mcdv,libdv,avformat *.dif=mcdv,libdv +*.gif=pixbuf *.jpg=pixbuf *.jpeg=pixbuf *.mp3=avformat @@ -13,6 +14,7 @@ http://*=avformat *.ogg=vorbis *.png=pixbuf *.svg=pixbuf +*.tga=pixbuf *.txt=pango *.wav=avformat *.wmv=avformat diff --git a/src/modules/fezzik/producer_fezzik.c b/src/modules/fezzik/producer_fezzik.c index ea63282..2976557 100644 --- a/src/modules/fezzik/producer_fezzik.c +++ b/src/modules/fezzik/producer_fezzik.c @@ -179,6 +179,9 @@ mlt_producer producer_fezzik_init( char *arg ) // We need to ensure that all further properties are mirrored in the producer mlt_properties_mirror( properties, mlt_producer_properties( producer ) ); + // Ensure that the inner producer ignores the in point + mlt_properties_set_int( mlt_producer_properties( producer ), "ignore_points", 1 ); + // Now, we return the producer of the tractor producer = mlt_tractor_producer( tractor ); } diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c index 589194a..1d1e959 100644 --- a/src/modules/sdl/consumer_sdl.c +++ b/src/modules/sdl/consumer_sdl.c @@ -103,7 +103,7 @@ mlt_consumer consumer_sdl_init( char *arg ) mlt_properties_set( this->properties, "rescale", "nearest" ); // Default buffer for low latency - mlt_properties_set_int( this->properties, "buffer", 8 ); + mlt_properties_set_int( this->properties, "buffer", 2 ); // Default progressive true mlt_properties_set_int( this->properties, "progressive", 0 ); diff --git a/src/tests/hello.c b/src/tests/hello.c index cc3ef32..4914304 100644 --- a/src/tests/hello.c +++ b/src/tests/hello.c @@ -55,7 +55,7 @@ mlt_producer create_tracks( int argc, char **argv ) mlt_position length = mlt_producer_get_playtime( track0 ); // Create the watermark track - mlt_producer track1 = mlt_factory_producer( "fezzik", "pango" ); + mlt_producer track1 = mlt_factory_producer( "fezzik", "pango:" ); // Get the properties of track1 mlt_properties properties = mlt_producer_properties( track1 ); -- 1.7.4.4