tm.tv_nsec = now.tv_usec * 1000;
pthread_cond_timedwait( &this->put_cond, &this->put_mutex, &tm );
}
- if ( this->put == NULL )
+ if ( !mlt_consumer_is_stopped( this ) && this->put == NULL )
this->put = frame;
else
mlt_frame_close( frame );
shot.filter[0].composite.key[5]=0%,0%:100%x100%:100
shot.filter[1]=watermark
shot.filter[1].resource=pango:
-shot.filter[1].producer.markup=Live
-shot.filter[1].producer.font=San 24
-shot.filter[1].composite.start=1%,1%:99%x99%:10
+shot.filter[1].producer.markup=File Shot
+shot.filter[1].producer.font=San 20
+shot.filter[1].composite.start=1%,1%:99%x99%:15
shot.filter[1].composite.key[8]=1%,1%:99%x99%:100
-shot.filter[1].composite.titles=1
+shot.filter[1].composite.titles=0
#shot.filter[1].composite.halign=centre
special=region
// internal intialization
int first = 1;
mlt_frame frame = NULL;
+ int last_position = -1;
// properties
mlt_properties properties = MLT_CONSUMER_PROPERTIES( consumer );
// Make sure the recipient knows that this frame isn't really rendered
mlt_properties_set_int( MLT_FRAME_PROPERTIES( frame ), "rendered", 0 );
+ // Optimisation to reduce latency
+ if ( speed == 1.0 )
+ {
+ if ( last_position != -1 && last_position + 1 != mlt_frame_get_position( frame ) )
+ mlt_consumer_purge( this->play );
+ last_position = mlt_frame_get_position( frame );
+ }
+ else
+ {
+ last_position = -1;
+ }
+
// If we're not the first frame and both consumers are stopped, then stop ourselves
if ( !first && mlt_consumer_is_stopped( this->play ) && mlt_consumer_is_stopped( this->still ) )
{
this->window_height = this->height;
// Set the sdl flags
- this->sdl_flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_RESIZABLE | SDL_DOUBLEBUF;
+ //this->sdl_flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_RESIZABLE | SDL_DOUBLEBUF;
+ // Experimental settings
+ this->sdl_flags = SDL_RESIZABLE | SDL_DOUBLEBUF;
// Allow thread to be started/stopped
parent->start = consumer_start;
mlt_properties_set_int( this->properties, "rect_h", this->rect.h );
}
- if ( !mlt_consumer_is_stopped( &this->parent ) && this->sdl_screen != NULL && this->sdl_screen->pixels != NULL )
+ if ( !mlt_consumer_is_stopped( &this->parent ) && SDL_GetVideoSurface( ) != NULL && this->sdl_screen != NULL && this->sdl_screen->pixels != NULL )
{
memset( this->sdl_screen->pixels, 0, this->window_width * this->window_height * this->sdl_screen->format->BytesPerPixel );
// internal intialization
mlt_frame frame = NULL;
- struct timespec tm = { 0, 99999999 };
+ struct timespec tm = { 0, 10000000 };
if ( mlt_properties_get_int( MLT_CONSUMER_PROPERTIES( consumer ), "sdl_started" ) == 0 )
{