#include "mwindowgui.h"
#include "patchbay.h"
#include "tracking.h"
+#include "tracks.h"
#include "playbackengine.h"
#include "playtransport.h"
#include "preferences.h"
#include "mainsession.h"
#include "trackcanvas.h"
#include "transportque.h"
+#include "videodevice.h"
+#include "vdevicex11.h"
#include "vrender.h"
// Start tracking after arming so the tracking position doesn't change.
// The tracking for a single frame command occurs during PAUSE
init_tracking();
- if( !command->single_frame() )
- clear_output();
+ clear_borders();
// Dispatch the command
start_render_engine();
break;
}
}
-void PlaybackEngine::clear_output()
+void PlaybackEngine::clear_borders()
{
- BC_WindowBase *cwdw = output->get_canvas();
- if( !cwdw ) return;
- cwdw->lock_window("PlaybackEngine::clear_output");
- output->clear();
- cwdw->unlock_window();
+ EDL *edl = command->get_edl();
+ PlaybackConfig *config = edl->session->playback_config;
+ if( config->vconfig->driver == PLAYBACK_X11_GL ) {
+ if( render_engine && render_engine->video ) {
+ VDeviceBase *vdriver = render_engine->video->get_output_base();
+ ((VDeviceX11*)vdriver)->clear_output();
+ return;
+ }
+ }
+ BC_WindowBase *window = output->get_canvas();
+ if( !window ) return;
+ window->lock_window("PlaybackEngine::clear_output");
+ output->clear_borders(edl);
+ window->unlock_window();
}
void PlaybackEngine::stop_playback(int wait_tracking)
// Just change the EDL if the change requires it because renderengine
// structures won't point to the new EDL otherwise and because copying the
// EDL for every cursor movement is slow.
- if( change_type & CHANGE_EDL )
+ if( change_type == CHANGE_EDL || change_type == CHANGE_ALL )
next_command->get_edl()->copy_all(new_edl);
- else if( change_type & CHANGE_PARAMS )
+ else if( change_type == CHANGE_PARAMS )
next_command->get_edl()->synchronize_params(new_edl);
next_command->set_playback_range(new_edl, use_inout,
preferences->forward_render_displacement);