This is needed to get GPU processing working on Shotcut for Windows and
probably other Qt 5 apps. However, that causes some bad behavior with
Movit on Linux. So, this change is only on Windows for now.
{
int real_time;
int ahead;
{
int real_time;
int ahead;
mlt_image_format format;
mlt_deque queue;
void *ahead_thread;
mlt_image_format format;
mlt_deque queue;
void *ahead_thread;
static void mlt_thread_create( mlt_consumer self, thread_function_t function );
static void transmit_thread_join( mlt_listener listener, mlt_properties owner, mlt_service self, void **args );
static void mlt_thread_join( mlt_consumer self );
static void mlt_thread_create( mlt_consumer self, thread_function_t function );
static void transmit_thread_join( mlt_listener listener, mlt_properties owner, mlt_service self, void **args );
static void mlt_thread_join( mlt_consumer self );
+static void consumer_read_ahead_start( mlt_consumer self );
/** Initialize a consumer service.
*
/** Initialize a consumer service.
*
priv->format = mlt_image_yuv422;
}
priv->format = mlt_image_yuv422;
}
+ priv->preroll = 1;
+#ifdef WIN32
+ if ( priv->real_time == 1 || priv->real_time == -1 )
+ consumer_read_ahead_start( self );
+#endif
+
// Start the service
if ( self->start != NULL )
return self->start( self );
// Start the service
if ( self->start != NULL )
return self->start( self );
- // Is the read ahead running?
- if ( priv->ahead == 0 )
{
int buffer = mlt_properties_get_int( properties, "buffer" );
int prefill = mlt_properties_get_int( properties, "prefill" );
{
int buffer = mlt_properties_get_int( properties, "buffer" );
int prefill = mlt_properties_get_int( properties, "prefill" );
consumer_read_ahead_start( self );
consumer_read_ahead_start( self );
if ( buffer > 1 )
size = prefill > 0 && prefill < buffer ? prefill : buffer;
if ( buffer > 1 )
size = prefill > 0 && prefill < buffer ? prefill : buffer;
}
// Get frame from queue
}
// Get frame from queue