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 1f70b17..d5e6c7e 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 7ee177d..3d4f531 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 ad21f93..8873ca9 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 );