]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_tractor.c
Fix and cleanup profile and preset dirs.
[mlt] / src / framework / mlt_tractor.c
index 235bbe016f9dcf0ae7ff7828633247c6fb7b29bb..17b0a47d1fa6a16c9491c467f95e0180d4e1478a 100644 (file)
@@ -272,8 +272,9 @@ static int producer_get_image( mlt_frame self, uint8_t **buffer, mlt_image_forma
        mlt_properties_set( frame_properties, "deinterlace_method", mlt_properties_get( properties, "deinterlace_method" ) );
        mlt_properties_set_int( frame_properties, "normalised_width", mlt_properties_get_int( properties, "normalised_width" ) );
        mlt_properties_set_int( frame_properties, "normalised_height", mlt_properties_get_int( properties, "normalised_height" ) );
+       mlt_properties_set_int( frame_properties, "consumer_tff", mlt_properties_get_int( properties, "consumer_tff" ) );
        mlt_frame_get_image( frame, buffer, format, width, height, writable );
-       mlt_properties_set_data( properties, "image", *buffer, 0, NULL, NULL );
+       mlt_frame_set_image( self, *buffer, 0, NULL );
        mlt_properties_set_int( properties, "width", *width );
        mlt_properties_set_int( properties, "height", *height );
        mlt_properties_set_int( properties, "format", *format );
@@ -282,9 +283,10 @@ static int producer_get_image( mlt_frame self, uint8_t **buffer, mlt_image_forma
        mlt_properties_set_int( properties, "distort", mlt_properties_get_int( frame_properties, "distort" ) );
        mlt_properties_set_int( properties, "colorspace", mlt_properties_get_int( frame_properties, "colorspace" ) );
        mlt_properties_set_int( properties, "force_full_luma", mlt_properties_get_int( frame_properties, "force_full_luma" ) );
+       mlt_properties_set_int( properties, "top_field_first", mlt_properties_get_int( frame_properties, "top_field_first" ) );
        data = mlt_frame_get_alpha_mask( frame );
        mlt_properties_get_data( frame_properties, "alpha", &size );
-       mlt_properties_set_data( properties, "alpha", data, size, NULL, NULL );
+       mlt_frame_set_alpha( self, data, size, NULL );
        self->convert_image = frame->convert_image;
        self->convert_audio = frame->convert_audio;
        return 0;
@@ -295,9 +297,10 @@ static int producer_get_audio( mlt_frame self, void **buffer, mlt_audio_format *
        mlt_properties properties = MLT_FRAME_PROPERTIES( self );
        mlt_frame frame = mlt_frame_pop_audio( self );
        mlt_frame_get_audio( frame, buffer, format, frequency, channels, samples );
-       mlt_properties_set_data( properties, "audio", *buffer, 0, NULL, NULL );
-       mlt_properties_set_int( properties, "frequency", *frequency );
-       mlt_properties_set_int( properties, "channels", *channels );
+       mlt_frame_set_audio( self, *buffer, *format, mlt_audio_format_size( *format, *samples, *channels ), NULL );
+       mlt_properties_set_int( properties, "audio_frequency", *frequency );
+       mlt_properties_set_int( properties, "audio_channels", *channels );
+       mlt_properties_set_int( properties, "audio_samples", *samples );
        return 0;
 }
 
@@ -395,14 +398,16 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra
                                temp_properties = MLT_FRAME_PROPERTIES( temp );
 
                                // Pass all unique meta properties from the producer's frame to the new frame
+                               mlt_properties_lock( temp_properties );
                                int props_count = mlt_properties_count( temp_properties );
                                int j;
                                for ( j = 0; j < props_count; j ++ )
                                {
                                        char *name = mlt_properties_get_name( temp_properties, j );
                                        if ( !strncmp( name, "meta.", 5 ) && !mlt_properties_get( frame_properties, name ) )
-                                               mlt_properties_set( frame_properties, name, mlt_properties_get( temp_properties, name ) );
+                                               mlt_properties_set( frame_properties, name, mlt_properties_get_value( temp_properties, j ) );
                                }
+                               mlt_properties_unlock( temp_properties );
 
                                // Copy the format conversion virtual functions
                                if ( ! (*frame)->convert_image && temp->convert_image )