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;
+ }
}
}