+ Alternative between track mixing mechanism (using a low pass filter)
[melted] / src / framework / mlt_tractor.c
index e545839..fae6c2e 100644 (file)
@@ -205,6 +205,7 @@ static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_forma
        mlt_frame frame = mlt_frame_pop_service( this );
        mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
        mlt_properties_set( frame_properties, "rescale.interp", mlt_properties_get( properties, "rescale.interp" ) );
+       mlt_properties_set_int( frame_properties, "rescale_alpha", mlt_properties_get_int( properties, "resize_alpha" ) );
        mlt_properties_set_int( frame_properties, "distort", mlt_properties_get_int( properties, "distort" ) );
        mlt_properties_set_double( frame_properties, "consumer_aspect_ratio", mlt_properties_get_double( properties, "consumer_aspect_ratio" ) );
        mlt_properties_set_int( frame_properties, "consumer_deinterlace", mlt_properties_get_int( properties, "consumer_deinterlace" ) );
@@ -215,6 +216,7 @@ static int producer_get_image( mlt_frame this, uint8_t **buffer, mlt_image_forma
        mlt_properties_set_data( properties, "image", *buffer, *width * *height * 2, NULL, NULL );
        mlt_properties_set_int( properties, "width", *width );
        mlt_properties_set_int( properties, "height", *height );
+       mlt_properties_set_int( properties, "format", *format );
        mlt_properties_set_double( properties, "aspect_ratio", mlt_frame_get_aspect_ratio( frame ) );
        mlt_properties_set_int( properties, "progressive", mlt_properties_get_int( frame_properties, "progressive" ) );
        mlt_properties_set_int( properties, "distort", mlt_properties_get_int( frame_properties, "distort" ) );
@@ -388,6 +390,11 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra
                                        video = temp;
                                        if ( first_video == NULL )
                                                first_video = temp;
+
+                                       // Ensure that all frames know the aspect ratio of the background
+                                       mlt_properties_set_double( temp_properties, "output_ratio", 
+                                                                                          mlt_properties_get_double( MLT_FRAME_PROPERTIES( first_video ), "aspect_ratio" ) );
+
                                        mlt_properties_set_int( MLT_FRAME_PROPERTIES( temp ), "image_count", ++ image_count );
                                        image_count = 1;
                                }