// Get the properties of the filter
mlt_properties properties = MLT_FILTER_PROPERTIES( this );
+ mlt_service_lock( MLT_FILTER_SERVICE( this ) );
+
// Get the producer from the filter
mlt_producer producer = mlt_properties_get_data( properties, "producer", NULL );
mlt_properties_pass( producer_properties, properties, "producer." );
}
+ mlt_service_unlock( MLT_FILTER_SERVICE( this ) );
+
// Only continue if we have both producer and composite
if ( composite != NULL && producer != NULL )
{
// We will get the 'b frame' from the producer
mlt_frame b_frame = NULL;
- // Get the unique id of the filter (used to reacquire the producer position)
- char *name = mlt_properties_get( properties, "_unique_id" );
-
// Get the original producer position
- mlt_position position = mlt_properties_get_position( MLT_FRAME_PROPERTIES( frame ), name );
+ mlt_position position = mlt_filter_get_position( this, frame );
// Make sure the producer is in the correct position
mlt_producer_seek( producer, position );
if ( mlt_frame_get_aspect_ratio( frame ) == 0 )
mlt_properties_set_double( a_props, "aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
- mlt_properties_set_int( b_props, "normalised_width", mlt_properties_get_int( a_props, "normalised_width" ) );
- mlt_properties_set_int( b_props, "normalised_height", mlt_properties_get_int( a_props, "normalised_height" ) );
-
if ( mlt_properties_get_int( properties, "distort" ) )
{
mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( composite ), "distort", 1 );
mlt_properties_set_int( b_props, "distort", 1 );
}
+ *format = mlt_image_yuv422;
if ( mlt_properties_get_int( properties, "reverse" ) == 0 )
{
// Apply all filters that are attached to this filter to the b frame
mlt_service_apply_filters( MLT_FILTER_SERVICE( this ), b_frame, 0 );
error = mlt_frame_get_image( b_frame, image, format, width, height, 1 );
alpha = mlt_frame_get_alpha_mask( b_frame );
- mlt_properties_set_data( a_props, "image", *image, *width * *height * 2, NULL, NULL );
- mlt_properties_set_data( a_props, "alpha", alpha, *width * *height, NULL, NULL );
+ mlt_frame_set_image( frame, *image, *width * *height * 2, NULL );
+ mlt_frame_set_alpha( frame, alpha, *width * *height, NULL );
mlt_properties_set_int( a_props, "width", *width );
mlt_properties_set_int( a_props, "height", *height );
mlt_properties_set_int( a_props, "progressive", 1 );
// Get the properties of the frame
mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
- // Get a unique name to store the frame position
- char *name = mlt_properties_get( MLT_FILTER_PROPERTIES( this ), "_unique_id" );
-
// Assign the frame out point to the filter (just in case we need it later)
mlt_properties_set_int( MLT_FILTER_PROPERTIES( this ), "_out", mlt_properties_get_int( properties, "out" ) );
- // Assign the current position to the name
- mlt_properties_set_position( properties, name, mlt_frame_get_position( frame ) - mlt_filter_get_in( this ) );
-
// Push the filter on to the stack
mlt_frame_push_service( frame, this );
{
mlt_properties properties = MLT_FILTER_PROPERTIES( this );
this->process = filter_process;
- mlt_properties_set( properties, "factory", "fezzik" );
+ mlt_properties_set( properties, "factory", mlt_environment( "MLT_PRODUCER" ) );
if ( arg != NULL )
mlt_properties_set( properties, "resource", arg );
// Ensure that attached filters are handled privately