From: lilo_booter Date: Mon, 7 Jun 2004 18:48:47 +0000 (+0000) Subject: Minor tweaks X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=9596911e0c624a73e354ecabfa9a565503d0ddf0;p=melted Minor tweaks git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@321 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 2837c4c..edea67e 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -327,9 +327,6 @@ static void *consumer_read_ahead_thread( void *arg ) if ( !video_off ) mlt_frame_get_image( frame, &image, &this->format, &width, &height, 0 ); mlt_properties_set_int( mlt_frame_properties( frame ), "rendered", 1 ); - - // Reset the skipped count - skipped = 0; } else { @@ -338,7 +335,7 @@ static void *consumer_read_ahead_thread( void *arg ) skip_next = 0; // If we've reached an unacceptable level, reset everything - if ( skipped > 10 ) + if ( skipped > 5 ) { skipped = 0; time_frame = 0; diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c index bee525a..ecd9a3f 100644 --- a/src/modules/core/producer_colour.c +++ b/src/modules/core/producer_colour.c @@ -185,6 +185,9 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i // Obtain properties of producer mlt_properties producer_props = mlt_producer_properties( producer ); + // Determine if we're producing PAL or NTSC + int is_pal = mlt_properties_get_double( producer_props, "fps" ) == 25.0; + // Set the producer on the frame properties mlt_properties_set_data( properties, "producer_colour", producer, 0, NULL, NULL ); @@ -193,10 +196,9 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i // Set producer-specific frame properties mlt_properties_set_int( properties, "progressive", 1 ); - mlt_properties_set_int( properties, "aspect_ratio", 1 ); + mlt_properties_set_double( properties, "aspect_ratio", is_pal ? 128.0/117.0 : 72.0/79.0 ); // colour is an alias for resource - // CY: Do we really need this? if ( mlt_properties_get( producer_props, "colour" ) != NULL ) mlt_properties_set( producer_props, "resource", mlt_properties_get( producer_props, "colour" ) ); diff --git a/src/modules/core/producer_noise.c b/src/modules/core/producer_noise.c index f4c63a4..fe86075 100644 --- a/src/modules/core/producer_noise.c +++ b/src/modules/core/producer_noise.c @@ -149,8 +149,14 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index // Obtain properties of frame mlt_properties properties = mlt_frame_properties( *frame ); + // Obtain properties of producer + mlt_properties producer_props = mlt_producer_properties( this ); + + // Determine if we're producing PAL or NTSC + int is_pal = mlt_properties_get_double( producer_props, "fps" ) == 25.0; + // Aspect ratio is 1? - mlt_properties_set_double( properties, "aspect_ratio", 1.0 ); + mlt_properties_set_double( properties, "aspect_ratio", is_pal ? 128.0/117.0 : 72.0/79.0 ); // Set producer-specific frame properties mlt_properties_set_int( properties, "progressive", 1 ); diff --git a/src/modules/fezzik.ini b/src/modules/fezzik.ini index 554285c..51bf74e 100644 --- a/src/modules/fezzik.ini +++ b/src/modules/fezzik.ini @@ -6,7 +6,7 @@ # The names of the services on the right dictate the preference used (if unavailable # the second and third are applied as applicable). -deinterlace=avdeinterlace +deinterlace=deinterlace,avdeinterlace rescaler=mcrescale,gtkrescale,rescale resizer=resize resampler=soxresample,avresample,resample diff --git a/src/modules/gtk2/producer_pixbuf.c b/src/modules/gtk2/producer_pixbuf.c index 2345145..95cae13 100644 --- a/src/modules/gtk2/producer_pixbuf.c +++ b/src/modules/gtk2/producer_pixbuf.c @@ -164,7 +164,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) // Note - the original pixbuf is already safe and ready for destruction pixbuf = gdk_pixbuf_scale_simple( pixbuf, width, height, interp ); - + // Store width and height this->width = width; this->height = height; diff --git a/src/tests/charlie.c b/src/tests/charlie.c index f4086e4..7130b1d 100644 --- a/src/tests/charlie.c +++ b/src/tests/charlie.c @@ -20,6 +20,8 @@ mlt_producer create_producer( char *file ) result = mlt_factory_producer( "mcmpeg", file ); else if ( strstr( file, ".mpeg" ) ) result = mlt_factory_producer( "mcmpeg", file ); + else if ( strstr( file, ".dat" ) ) + result = mlt_factory_producer( "mcmpeg", file ); else if ( strstr( file, ".dv" ) ) result = mlt_factory_producer( "mcdv", file ); else if ( strstr( file, ".dif" ) )