// Update multitrack properties now - we'll not destroy the in point here
mlt_properties_set_position( properties, "length", length );
- mlt_properties_set_position( properties, "out", length );
+ mlt_properties_set_position( properties, "out", length - 1 );
mlt_properties_set_double( properties, "fps", fps );
}
mlt_producer producer = this->list[ index ];
// Obtain the current position
- uint64_t position = mlt_producer_frame( parent );
+ mlt_position position = mlt_producer_frame( parent );
// Make sure we're at the same point
mlt_producer_seek( producer, position );
mlt_properties_set_double( mlt_playlist_properties( this ), "first_fps", fps );
mlt_properties_set_double( mlt_playlist_properties( this ), "fps", fps == 0 ? 25 : fps );
mlt_properties_set_position( mlt_playlist_properties( this ), "length", frame_count );
- mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count );
+ mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count - 1 );
return 0;
}
mlt_properties_set_double( properties, "frame", 0 );
mlt_properties_set_double( properties, "fps", 25.0 );
mlt_properties_set_double( properties, "speed", 1.0 );
- mlt_properties_set_position( properties, "in", 0.0 );
- mlt_properties_set_position( properties, "out", 179999 );
- mlt_properties_set_position( properties, "length", 180000 );
+ mlt_properties_set_position( properties, "in", 0 );
+ mlt_properties_set_position( properties, "out", 1799999 );
+ mlt_properties_set_position( properties, "length", 1800000 );
mlt_properties_set_double( properties, "aspect_ratio", 4.0 / 3.0 );
mlt_properties_set( properties, "log_id", "multitrack" );
return mlt_service_properties( &this->parent );
}
-/** Convert frame position to position.
-*/
-
-/*
-mlt_position mlt_producer_time( mlt_producer this, int64_t frame )
-{
- if ( frame < 0 )
- return -1;
- else
- return ( mlt_position )frame / mlt_producer_get_fps( this );
-}
-*/
-
-/** Convert position to frame position.
-*/
-
-/*
-int64_t mlt_producer_frame_position( mlt_producer this, mlt_position position )
-{
- if ( position < 0 )
- return -1;
- else
- return ( int64_t )( floor( position * mlt_producer_get_fps( this ) + 0.5 ) );
-}
-*/
-
/** Seek to a specified position.
*/
mlt_properties_set( properties, "log_id", file );
mlt_properties_set( properties, "resource", file );
+ mlt_properties_set_position( properties, "length", 36000 );
+ mlt_properties_set_position( properties, "out", 36000 );
this->buffer = malloc( 1024 * 1024 * 2 );
// Update multitrack properties now - we'll not destroy the in point here
mlt_properties_set_position( properties, "length", length );
- mlt_properties_set_position( properties, "out", length );
+ mlt_properties_set_position( properties, "out", length - 1 );
mlt_properties_set_double( properties, "fps", fps );
}
mlt_producer producer = this->list[ index ];
// Obtain the current position
- uint64_t position = mlt_producer_frame( parent );
+ mlt_position position = mlt_producer_frame( parent );
// Make sure we're at the same point
mlt_producer_seek( producer, position );
mlt_properties_set_double( mlt_playlist_properties( this ), "first_fps", fps );
mlt_properties_set_double( mlt_playlist_properties( this ), "fps", fps == 0 ? 25 : fps );
mlt_properties_set_position( mlt_playlist_properties( this ), "length", frame_count );
- mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count );
+ mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count - 1 );
return 0;
}
mlt_properties_set_double( properties, "frame", 0 );
mlt_properties_set_double( properties, "fps", 25.0 );
mlt_properties_set_double( properties, "speed", 1.0 );
- mlt_properties_set_position( properties, "in", 0.0 );
- mlt_properties_set_position( properties, "out", 179999 );
- mlt_properties_set_position( properties, "length", 180000 );
+ mlt_properties_set_position( properties, "in", 0 );
+ mlt_properties_set_position( properties, "out", 1799999 );
+ mlt_properties_set_position( properties, "length", 1800000 );
mlt_properties_set_double( properties, "aspect_ratio", 4.0 / 3.0 );
mlt_properties_set( properties, "log_id", "multitrack" );
return mlt_service_properties( &this->parent );
}
-/** Convert frame position to position.
-*/
-
-/*
-mlt_position mlt_producer_time( mlt_producer this, int64_t frame )
-{
- if ( frame < 0 )
- return -1;
- else
- return ( mlt_position )frame / mlt_producer_get_fps( this );
-}
-*/
-
-/** Convert position to frame position.
-*/
-
-/*
-int64_t mlt_producer_frame_position( mlt_producer this, mlt_position position )
-{
- if ( position < 0 )
- return -1;
- else
- return ( int64_t )( floor( position * mlt_producer_get_fps( this ) + 0.5 ) );
-}
-*/
-
/** Seek to a specified position.
*/
mlt_properties_set( properties, "log_id", file );
mlt_properties_set( properties, "resource", file );
+ mlt_properties_set_position( properties, "length", 36000 );
+ mlt_properties_set_position( properties, "out", 36000 );
this->buffer = malloc( 1024 * 1024 * 2 );