aspect_ratio = ( double )codec_context->width / ( double )codec_context->height;
mlt_properties_set_double( properties, "aspect_ratio", aspect_ratio );
- fprintf( stderr, "avformat: %dx%d (%f)\n", codec_context->width, codec_context->height, av_q2d( codec_context->sample_aspect_ratio ) );
// Now store the codec with its destructor
mlt_properties_set_data( properties, "video_codec", codec_context, 0, producer_codec_close, NULL );
// Default fps
mlt_properties_set_double( this->properties, "fps", 25 );
+ // Default scaler (for now we'll use nearest)
+ mlt_properties_set( this->properties, "rescale", "nearest" );
+
// process actual param
if ( arg == NULL || !strcmp( arg, "PAL" ) )
{
}
this->queue[ this->count ++ ] = frame;
+ if ( mlt_properties_get( properties, "rescale" ) != NULL )
+ mlt_properties_set( mlt_frame_properties( frame ), "rescale.interp", mlt_properties_get( properties, "rescale" ) );
+
if ( this->playing )
{
// We're working on the oldest frame now
mlt_service service = context_pop_service( context );
// Append the producer to the playlist
+ // TODO: THIS IS NOT CORRECT - an entry SHOULD have in/out points of its own
mlt_playlist_append_io( MLT_PLAYLIST( service ),
- MLT_PRODUCER( producer ),
- mlt_properties_get_position( mlt_service_properties( producer ), "in" ),
- mlt_properties_get_position( mlt_service_properties( producer ), "out" ) );
+ MLT_PRODUCER( producer ), 0,
+ mlt_properties_get_position( mlt_service_properties( producer ), "out" ) - mlt_properties_get_position( mlt_service_properties( producer ), "in" ) + 1 );
// Push the playlist back onto the stack
context_push_service( context, service );