mlt_properties_set_int( properties, "width", 720 );
mlt_properties_set_int( properties, "height", 576 );
mlt_properties_set_int( properties, "progressive", 0 );
+ mlt_properties_set_double( properties, "aspect_ratio", 128.0 / 117.0 );
}
else
{
mlt_properties_set_int( properties, "width", 720 );
mlt_properties_set_int( properties, "height", 480 );
mlt_properties_set_int( properties, "progressive", 0 );
+ mlt_properties_set_double( properties, "aspect_ratio", 72.0 / 79.0 );
}
- // Default aspect ratio
- mlt_properties_set_double( properties, "aspect_ratio", 4.0 / 3.0 );
-
// Default rescaler for all consumers
mlt_properties_set( properties, "rescale", "bilinear" );
return error;
}
+/** Create a new consumer.
+*/
+
+mlt_consumer mlt_consumer_new( )
+{
+ // Create the memory for the structure
+ mlt_consumer this = malloc( sizeof( struct mlt_consumer_s ) );
+
+ // Initialise it
+ if ( this != NULL )
+ mlt_consumer_init( this, NULL );
+
+ // Return it
+ return this;
+}
+
/** Get the parent service object.
*/
// Average time for get_frame and get_image
int count = 1;
+ int skipped = 0;
int64_t time_wait = 0;
int64_t time_frame = 0;
int64_t time_image = 0;
mlt_frame_get_image( frame, &image, &this->format, &width, &height, 0 );
mlt_properties_set_int( mlt_frame_properties( frame ), "rendered", 1 );
time_image += time_difference( &ante );
+
+ // Reset the skipped count
+ skipped = 0;
+ }
+ else
+ {
+ // Increment the number of sequentially skipped frames
+ skipped ++;
+
+ // If we've reached an unacceptable level, reset everything
+ if ( skipped > 10 )
+ {
+ skipped = 0;
+ time_frame = 0;
+ time_image = 0;
+ time_wait = 0;
+ count = 0;
+ }
}
}
else
mlt_service_close( &this->parent );
}
-