]> git.sesse.net Git - mlt/commitdiff
Minor corrections, rescale=nearest for sdl
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sat, 7 Feb 2004 11:10:42 +0000 (11:10 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sat, 7 Feb 2004 11:10:42 +0000 (11:10 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@121 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/producer_avformat.c
src/modules/sdl/consumer_sdl.c
src/modules/westley/producer_westley.c

index 1f70b171356574bc8278bc973d1ba8c2c02fc281..d5e6c7e7af86762cc5fc5277059ce2627c8c518e 100644 (file)
@@ -507,7 +507,6 @@ static void producer_set_up_video( mlt_producer this, mlt_frame frame )
                                        aspect_ratio = ( double )codec_context->width / ( double )codec_context->height;
 
                                mlt_properties_set_double( properties, "aspect_ratio", aspect_ratio );
-                               fprintf( stderr, "avformat: %dx%d (%f)\n", codec_context->width, codec_context->height, av_q2d( codec_context->sample_aspect_ratio ) );
 
                                // Now store the codec with its destructor
                                mlt_properties_set_data( properties, "video_codec", codec_context, 0, producer_codec_close, NULL );
index 7ee177dd31111222071c7848ea23472baec6f3d5..3d4f53146de07a12156e911e9f3177ad8ac16e8e 100644 (file)
@@ -101,6 +101,9 @@ mlt_consumer consumer_sdl_init( char *arg )
                // Default fps
                mlt_properties_set_double( this->properties, "fps", 25 );
 
+               // Default scaler (for now we'll use nearest)
+               mlt_properties_set( this->properties, "rescale", "nearest" );
+
                // process actual param
                if ( arg == NULL || !strcmp( arg, "PAL" ) )
                {
@@ -342,6 +345,9 @@ static int consumer_play_video( consumer_sdl this, mlt_frame frame )
        }
        this->queue[ this->count ++ ] = frame;
 
+       if ( mlt_properties_get( properties, "rescale" ) != NULL )
+               mlt_properties_set( mlt_frame_properties( frame ), "rescale.interp", mlt_properties_get( properties, "rescale" ) );
+
        if ( this->playing )
        {
                // We're working on the oldest frame now
index ad21f93c46734ddd7bb375ae58edea485dd4e4a5..8873ca936a9cb45b82fde012728ab04f51784f2c 100644 (file)
@@ -291,10 +291,10 @@ static void on_end_entry( deserialise_context context, const xmlChar *name )
        mlt_service service = context_pop_service( context );
 
        // Append the producer to the playlist
+       // TODO: THIS IS NOT CORRECT - an entry SHOULD have in/out points of its own
        mlt_playlist_append_io( MLT_PLAYLIST( service ),
-               MLT_PRODUCER( producer ),
-               mlt_properties_get_position( mlt_service_properties( producer ), "in" ),
-               mlt_properties_get_position( mlt_service_properties( producer ), "out" ) );
+               MLT_PRODUCER( producer ), 0, 
+               mlt_properties_get_position( mlt_service_properties( producer ), "out" ) - mlt_properties_get_position( mlt_service_properties( producer ), "in" ) + 1 );
 
        // Push the playlist back onto the stack
        context_push_service( context, service );