if ( this != NULL )
{
// Get properties from the consumer
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
// Assign close callback
this->close = consumer_close;
static int consumer_start( mlt_consumer this )
{
// Get the properties
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
// Check that we're not already running
if ( !mlt_properties_get_int( properties, "running" ) )
static int consumer_stop( mlt_consumer this )
{
// Get the properties
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
// Check that we're running
if ( mlt_properties_get_int( properties, "running" ) )
static int consumer_is_stopped( mlt_consumer this )
{
// Get the properties
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
return !mlt_properties_get_int( properties, "running" );
}
static AVStream *add_audio_stream( mlt_consumer this, AVFormatContext *oc, int codec_id )
{
// Get the properties
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
// Create a new stream
AVStream *st = av_new_stream( oc, 1 );
static AVStream *add_video_stream( mlt_consumer this, AVFormatContext *oc, int codec_id )
{
// Get the properties
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
// Create a new stream
AVStream *st = av_new_stream( oc, 0 );
mlt_consumer this = arg;
// Get the properties
- mlt_properties properties = mlt_consumer_properties( this );
+ mlt_properties properties = MLT_CONSUMER_PROPERTIES( this );
// Get the terminate on pause property
int terminate_on_pause = mlt_properties_get_int( properties, "terminate_on_pause" );
frames ++;
// Default audio args
- frame_properties = mlt_frame_properties( frame );
+ frame_properties = MLT_FRAME_PROPERTIES( frame );
// Check for the terminated condition
terminated = terminate_on_pause && mlt_properties_get_double( frame_properties, "_speed" ) == 0.0;
mlt_properties_set_data( properties, "sample_fifo", fifo, 0, ( mlt_destructor )sample_fifo_close, NULL );
}
+ if ( mlt_properties_get_double( frame_properties, "_speed" ) != 1.0 )
+ memset( pcm, 0, samples * channels * 2 );
+
// Append the samples
sample_fifo_append( fifo, pcm, samples * channels );
total_time += ( samples * 1000000 ) / frequency;
AVCodecContext *c;
frame = mlt_deque_pop_front( queue );
- frame_properties = mlt_frame_properties( frame );
+ frame_properties = MLT_FRAME_PROPERTIES( frame );
c = &video_st->codec;
// This will cause some fx to go awry....
if ( mlt_properties_get_int( properties, "transcode" ) )
{
- mlt_properties_set_int( mlt_frame_properties( frame ), "normalised_width", img_height * 4.0 / 3.0 );
- mlt_properties_set_int( mlt_frame_properties( frame ), "normalised_height", img_height );
+ mlt_properties_set_int( MLT_FRAME_PROPERTIES( frame ), "normalised_width", img_height * 4.0 / 3.0 );
+ mlt_properties_set_int( MLT_FRAME_PROPERTIES( frame ), "normalised_height", img_height );
}
mlt_frame_get_image( frame, &image, &img_fmt, &img_width, &img_height, 0 );
}
}
- if ( real_time_output && frames % 25 == 0 )
+ if ( real_time_output && frames % 12 == 0 )
{
long passed = time_difference( &ante );
if ( fifo != NULL )