Thread::join();
delete preferences;
delete_render_engine();
- delete audio_cache;
- delete video_cache;
+ if( audio_cache )
+ audio_cache->remove_user();
+ if( video_cache )
+ video_cache->remove_user();
delete tracking_lock;
delete tracking_done;
delete pause_lock;
void PlaybackEngine::create_cache()
{
- if(audio_cache) { delete audio_cache; audio_cache = 0; }
- if(video_cache) { delete video_cache; video_cache = 0; }
- if(!audio_cache) audio_cache = new CICache(preferences);
- if(!video_cache) video_cache = new CICache(preferences);
+ if( audio_cache )
+ audio_cache->remove_user();
+ if( video_cache )
+ video_cache->remove_user();
+ audio_cache = new CICache(preferences);
+ video_cache = new CICache(preferences);
}
init_meters();
}
-void PlaybackEngine::stop_tracking()
+void PlaybackEngine::stop_tracking(double position)
{
+ tracking_position = position;
tracking_active = 0;
stop_cursor();
tracking_done->unlock();
int single_frame = TransportCommand::single_frame(command);
int next_audio = next_command->toggle_audio ? !single_frame : single_frame;
float next_speed = next_command->speed;
- int cmd = -1;
// Dispatch command
switch( command ) {
case STOP:
break;
}
next_command->realtime = 1;
- cmd = command;
+ transport_command(command, CHANGE_NONE, edl, use_inout);
break;
case REWIND:
case GOTO_END:
transport_stop(1);
next_command->realtime = 1;
- cmd = command;
+ transport_command(command, CHANGE_NONE, edl, use_inout);
+ stop_tracking(this->command->playbackstart);
break;
}
- if( cmd >= 0 )
- transport_command(cmd, CHANGE_NONE, edl, use_inout);
}
int PlaybackEngine::put_command(TransportCommand *command, int reset)