mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
// Obtain the frame number of this frame
- mlt_position position = mlt_properties_get_position( frame_properties, "avformat_position" );
+ mlt_position position = mlt_frame_original_position( frame );
// Get the producer properties
mlt_properties properties = MLT_PRODUCER_PROPERTIES( producer );
}
if ( self->image_cache )
{
- mlt_frame original = mlt_cache_get_frame( self->image_cache, mlt_frame_get_position( frame ) );
+ mlt_frame original = mlt_cache_get_frame( self->image_cache, position );
if ( original )
{
mlt_properties orig_props = MLT_FRAME_PROPERTIES( original );
pthread_mutex_lock( &self->audio_mutex );
// Obtain the frame number of this frame
- mlt_position position = mlt_properties_get_position( MLT_FRAME_PROPERTIES( frame ), "avformat_position" );
+ mlt_position position = mlt_frame_original_position( frame );
// Calculate the real time code
double real_timecode = producer_time_of_frame( self->parent, position );
// Set the position of this producer
mlt_position position = self->seekable ? mlt_producer_frame( producer ) : self->nonseek_position++;
- mlt_properties_set_position( MLT_FRAME_PROPERTIES( *frame ), "avformat_position", position );
+ mlt_properties_set_position( MLT_FRAME_PROPERTIES( *frame ), "original_position", position );
// Calculate the next timecode
mlt_producer_prepare_next( producer );
if ( pixbuf == NULL )
{
// Check for file support
- int position = mlt_properties_get_position( properties, "pango_position" );
mlt_properties contents = mlt_properties_get_data( producer_props, "contents", NULL );
mlt_geometry key_frames = mlt_properties_get_data( producer_props, "key_frames", NULL );
struct mlt_geometry_item_s item;
if ( contents != NULL )
{
char temp[ 20 ];
- mlt_geometry_prev_key( key_frames, &item, position );
+ mlt_geometry_prev_key( key_frames, &item, mlt_frame_original_position( frame ) );
sprintf( temp, "%d", item.frame );
markup = mlt_properties_get( contents, temp );
}
// Update timecode on the frame we're creating
mlt_frame_set_position( *frame, mlt_producer_position( producer ) );
- mlt_properties_set_position( properties, "pango_position", mlt_producer_frame( producer ) );
// Refresh the pango image
pthread_mutex_lock( &pango_mutex );
mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
mlt_properties_set_data( frame_properties, "producer_pixbuf", self, 0, NULL, NULL );
mlt_frame_set_position( frame, mlt_producer_position( producer ) );
- mlt_properties_set_position( frame_properties, "pixbuf_position", mlt_producer_position( producer ) );
refresh_pixbuf( self, frame );
mlt_cache_item_close( self->pixbuf_cache );
mlt_frame_close( frame );
double ttl = mlt_properties_get_int( producer_props, "ttl" );
// Get the original position of this frame
- mlt_position position = mlt_properties_get_position( properties, "pixbuf_position" );
+ mlt_position position = mlt_frame_original_position( frame );
position += mlt_producer_get_in( producer );
// Image index
// Update timecode on the frame we're creating
mlt_frame_set_position( *frame, mlt_producer_position( producer ) );
- // Ensure that we have a way to obtain the position in the get_image
- mlt_properties_set_position( properties, "pixbuf_position", mlt_producer_position( producer ) );
-
// Refresh the pixbuf
self->pixbuf_cache = mlt_service_cache_get( MLT_PRODUCER_SERVICE( producer ), "pixbuf.pixbuf" );
self->pixbuf = mlt_cache_item_data( self->pixbuf_cache, NULL );
mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
mlt_properties_set_data( frame_properties, "producer_qimage", self, 0, NULL, NULL );
mlt_frame_set_position( frame, mlt_producer_position( producer ) );
- mlt_properties_set_position( frame_properties, "qimage_position", mlt_producer_position( producer ) );
refresh_qimage( self, frame );
mlt_cache_item_close( self->qimage_cache );
mlt_frame_close( frame );
// Update timecode on the frame we're creating
mlt_frame_set_position( *frame, mlt_producer_position( producer ) );
- // Ensure that we have a way to obtain the position in the get_image
- mlt_properties_set_position( properties, "qimage_position", mlt_producer_position( producer ) );
-
// Refresh the image
self->qimage_cache = mlt_service_cache_get( MLT_PRODUCER_SERVICE( producer ), "qimage.qimage" );
self->qimage = mlt_cache_item_data( self->qimage_cache, NULL );
double ttl = mlt_properties_get_int( producer_props, "ttl" );
// Get the original position of this frame
- mlt_position position = mlt_properties_get_position( properties, "qimage_position" );
+ mlt_position position = mlt_frame_original_position( frame );
position += mlt_producer_get_in( producer );
// Image index
producer_swfdec swfdec = mlt_frame_pop_service( frame );
mlt_service service = MLT_PRODUCER_SERVICE( &swfdec->parent );
mlt_profile profile = mlt_service_profile( service );
- mlt_properties properties = MLT_FRAME_PROPERTIES( frame );
mlt_service_lock( service );
mlt_frame_set_image( frame, *buffer, *width * ( *height + 1 ) * 4, mlt_pool_release );
// Seek
- mlt_position pos = mlt_properties_get_position( properties, "swfdec.position" );
+ mlt_position pos = mlt_frame_original_position( frame );
if ( pos > swfdec->last_position )
{
gulong msec = 1000UL * ( pos - swfdec->last_position ) * profile->frame_rate_den / profile->frame_rate_num;
mlt_properties_set_int( properties, "height", swfdec->height );
mlt_properties_set_int( properties, "progressive", 1 );
mlt_properties_set_double( properties, "aspect_ratio", 1.0 );
- mlt_properties_set_position( properties, "swfdec.position", mlt_producer_frame( producer ) );
// Push the get_image method on to the stack
mlt_frame_push_service( *frame, swfdec );
static int producer_get_audio( mlt_frame frame, void **buffer, mlt_audio_format *format, int *frequency, int *channels, int *samples )
{
- // Get the properties from the frame
- mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame );
-
// Obtain the frame number of this frame
- mlt_position position = mlt_properties_get_position( frame_properties, "vorbis_position" );
+ mlt_position position = mlt_frame_original_position( frame );
// Get the producer
mlt_producer this = mlt_frame_pop_audio( frame );
// Update timecode on the frame we're creating
mlt_frame_set_position( *frame, mlt_producer_position( this ) );
- // Set the position of this producer
- mlt_properties frame_properties = MLT_FRAME_PROPERTIES( *frame );
- mlt_properties_set_position( frame_properties, "vorbis_position", mlt_producer_frame( this ) );
-
// Set up the audio
mlt_frame_push_audio( *frame, this );
mlt_frame_push_audio( *frame, producer_get_audio );
// Pass audio properties to the frame
- mlt_properties_pass_list( frame_properties, MLT_PRODUCER_PROPERTIES( this ), "frequency, channels" );
+ mlt_properties_pass_list( MLT_FRAME_PROPERTIES(*frame), MLT_PRODUCER_PROPERTIES( this ), "frequency, channels" );
// Calculate the next timecode
mlt_producer_prepare_next( this );