: Thread(1, 0, 0)
{
this->mwindow = mwindow;
+ this->playback_engine = 0;
+ this->playback_cursor = 0;
+ this->mask_track_id = -1;
+ this->gui = 0;
}
void CWindow::create_objects()
{
- destination = mwindow->defaults->get("CWINDOW_DESTINATION", 0);
-
-
gui = new CWindowGUI(mwindow, this);
-
gui->create_objects();
-
-
playback_engine = new CPlayback(mwindow, this, gui->canvas);
-
-
// Start command loop
playback_engine->create_objects();
-
gui->transport->set_engine(playback_engine);
-
playback_cursor = new CTracking(mwindow, this);
-
playback_cursor->create_objects();
-
}
Track* CWindow::calculate_affected_track()
{
- Track* affected_track = 0;
- for(Track *track = mwindow->edl->tracks->first;
- track;
- track = track->next)
- {
- if(track->data_type == TRACK_VIDEO &&
- track->record)
- {
- affected_track = track;
- break;
- }
+ Track *track = mwindow->edl->tracks->first;
+ for( ; track; track=track->next ) {
+ if( track->data_type != TRACK_VIDEO ) continue;
+ if( track->record ) break;
}
- return affected_track;
+ return track;
}
+Track* CWindow::calculate_mask_track()
+{
+ Track *track = mwindow->edl->tracks->first;
+ for( ; track; track=track->next ) {
+ if( track->data_type != TRACK_VIDEO ) continue;
+ if( track->record && track->get_id() == mask_track_id ) break;
+ }
+ return track;
+}
+
+
Auto* CWindow::calculate_affected_auto(Autos *autos,
int create, int *created, int redraw)
{
void CWindow::update(int dir, int overlays, int tool_window, int operation, int timebar)
{
- if(dir)
+ if( dir )
refresh_frame(CHANGE_NONE, dir);
gui->lock_window("CWindow::update 2");
// Create tool window
- if(operation)
+ if( operation )
gui->set_operation(mwindow->edl->session->cwindow_operation);
// Updated by video device.
- if(overlays && !dir)
- gui->canvas->draw_refresh();
+ if( overlays && !dir )
+ gui->canvas->refresh(1);
// Update tool parameters
// Never updated by someone else
- if(tool_window || dir)
+ if( tool_window || dir )
gui->update_tool();
- if(timebar)
+ if( timebar )
gui->timebar->update(1);
double zoom = !mwindow->edl->session->cwindow_scrollbars ?