X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fsdl%2Fconsumer_sdl.c;h=0de719e7f4235e97f95c0a05b279a2c11d024e4d;hb=e4f02fbdb9f02fefcd2a178be08cca9963449815;hp=b06ca484fc9fdc459c59bd935dac949f2f340a0d;hpb=5c299d1ae6f3535df35b3f30bae0476a1ca50aa6;p=melted diff --git a/src/modules/sdl/consumer_sdl.c b/src/modules/sdl/consumer_sdl.c index b06ca48..0de719e 100644 --- a/src/modules/sdl/consumer_sdl.c +++ b/src/modules/sdl/consumer_sdl.c @@ -103,6 +103,9 @@ mlt_consumer consumer_sdl_init( char *arg ) // Default scaler (for now we'll use nearest) mlt_properties_set( this->properties, "rescale", "nearest" ); + // Default buffer for low latency + mlt_properties_set_int( this->properties, "buffer", 8 ); + // Default progressive true mlt_properties_set_int( this->properties, "progressive", 1 ); @@ -347,7 +350,7 @@ static int consumer_play_video( consumer_sdl this, mlt_frame frame, int64_t elap // Get the image, width and height mlt_frame_get_image( frame, &image, &vfmt, &width, &height, 0 ); - if ( playtime > elapsed + 20000 ) + if ( playtime > elapsed + 25000 ) { struct timespec tm = { ( playtime - elapsed ) / 1000000, ( ( playtime - elapsed ) % 1000000 ) * 1000 }; nanosleep( &tm, NULL ); @@ -498,7 +501,7 @@ static void *consumer_thread( void *arg ) while( this->running ) { // Get a frame from the attached producer - mlt_frame frame = mlt_consumer_rt_frame( consumer, mlt_image_yuv422 ); + mlt_frame frame = mlt_consumer_rt_frame( consumer ); // Ensure that we have a frame if ( frame != NULL )