From: lilo_booter Date: Sat, 28 May 2005 13:46:29 +0000 (+0000) Subject: Frame rate properites and factory initialisation X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=390e1559353efa011b371b66fcd2c8d3ffb84ab8;hp=8fe450eddce6d6e81cf063af5b471b7ef750efe9;p=melted Frame rate properites and factory initialisation git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@727 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index c653355..e9c8a34 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -53,6 +53,8 @@ int mlt_consumer_init( mlt_consumer this, void *child ) { mlt_properties_set( properties, "normalisation", "PAL" ); mlt_properties_set_double( properties, "fps", 25.0 ); + mlt_properties_set_int( properties, "frame_rate_den", 25 ); + mlt_properties_set_int( properties, "frame_rate_num", 1 ); mlt_properties_set_int( properties, "width", 720 ); mlt_properties_set_int( properties, "height", 576 ); mlt_properties_set_int( properties, "progressive", 0 ); @@ -62,6 +64,8 @@ int mlt_consumer_init( mlt_consumer this, void *child ) { mlt_properties_set( properties, "normalisation", "NTSC" ); mlt_properties_set_double( properties, "fps", 30000.0 / 1001.0 ); + mlt_properties_set_int( properties, "frame_rate_den", 30000 ); + mlt_properties_set_int( properties, "frame_rate_num", 1001 ); mlt_properties_set_int( properties, "width", 720 ); mlt_properties_set_int( properties, "height", 480 ); mlt_properties_set_int( properties, "progressive", 0 ); diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index 1272a8e..3045e96 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -90,10 +90,6 @@ int mlt_factory_init( const char *prefix ) // Create the global properties global_properties = mlt_properties_new( ); - mlt_properties_set_or_default( global_properties, "MLT_NORMALISATION", getenv( "MLT_NORMALISATION" ), "PAL" ); - mlt_properties_set_or_default( global_properties, "MLT_PRODUCER", getenv( "MLT_PRODUCER" ), "fezzik" ); - mlt_properties_set_or_default( global_properties, "MLT_CONSUMER", getenv( "MLT_CONSUMER" ), "sdl" ); - mlt_properties_set( global_properties, "MLT_TEST_CARD", getenv( "MLT_TEST_CARD" ) ); // Create the object list. object_list = mlt_properties_new( ); @@ -108,6 +104,15 @@ int mlt_factory_init( const char *prefix ) atexit( mlt_factory_close ); } + // Allow property refresh on a subsequent initialisation + if ( global_properties != NULL ) + { + mlt_properties_set_or_default( global_properties, "MLT_NORMALISATION", getenv( "MLT_NORMALISATION" ), "PAL" ); + mlt_properties_set_or_default( global_properties, "MLT_PRODUCER", getenv( "MLT_PRODUCER" ), "fezzik" ); + mlt_properties_set_or_default( global_properties, "MLT_CONSUMER", getenv( "MLT_CONSUMER" ), "sdl" ); + mlt_properties_set( global_properties, "MLT_TEST_CARD", getenv( "MLT_TEST_CARD" ) ); + } + return 0; } diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index d6c27e3..4963baa 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -89,11 +89,15 @@ int mlt_producer_init( mlt_producer this, void *child ) if ( normalisation == NULL || strcmp( normalisation, "NTSC" ) ) { mlt_properties_set_double( properties, "fps", 25.0 ); + mlt_properties_set_int( properties, "frame_rate_den", 25 ); + mlt_properties_set_int( properties, "frame_rate_num", 1 ); mlt_properties_set_double( properties, "aspect_ratio", 59.0 / 54.0 ); } else { mlt_properties_set_double( properties, "fps", 30000.0 / 1001.0 ); + mlt_properties_set_int( properties, "frame_rate_den", 30000 ); + mlt_properties_set_int( properties, "frame_rate_num", 1001 ); mlt_properties_set_double( properties, "aspect_ratio", 10.0 / 11.0 ); } mlt_properties_set_double( properties, "_speed", 1.0 );