X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=bec67dc89c7c9b888678f71d8c51c6908541360e;hp=44a9948c28c755c1c3a74b93a0495a0c02f5c57b;hb=8e67d840c5a93f77de021102a4f0bfc4e07504f4;hpb=e8453fdab4d5ed7b384279a5b37c92010ac13295 diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 44a9948c..bec67dc8 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -86,7 +86,7 @@ VWindowGUI::VWindowGUI(MWindow *mwindow, VWindow *vwindow) VWindowGUI::~VWindowGUI() { - vwindow->playback_engine->interrupt_playback(1); + vwindow->stop_playback(1); sources.remove_all_objects(); labels.remove_all_objects(); delete canvas; @@ -135,7 +135,7 @@ void VWindowGUI::draw_wave() delete cache; delete canvas->refresh_frame; canvas->refresh_frame = vframe; - canvas->draw_refresh(1); + canvas->refresh(1); } void VWindowGUI::change_source(EDL *edl, const char *title) @@ -457,7 +457,7 @@ void VWindowGUI::drag_motion() int need_highlight = cursor_above() && get_cursor_over_window() ? 1 : 0; if( highlighted == need_highlight ) return; highlighted = need_highlight; - canvas->draw_refresh(); + canvas->refresh(1); } int VWindowGUI::drag_stop() @@ -467,7 +467,7 @@ int VWindowGUI::drag_stop() if( highlighted && mwindow->session->current_operation == DRAG_ASSET ) { highlighted = 0; - canvas->draw_refresh(); + canvas->refresh(1); unlock_window(); Indexable *indexable = @@ -701,6 +701,7 @@ void VWindowEditing::panel_fit_selection() {} void VWindowEditing::panel_fit_autos(int all) {} void VWindowEditing::panel_set_editing_mode(int mode) {} void VWindowEditing::panel_set_auto_keyframes(int v) {} +void VWindowEditing::panel_set_span_keyframes(int v) {} void VWindowEditing::panel_set_labels_follow_edits(int v) {} @@ -823,37 +824,30 @@ void VWindowCanvas::draw_refresh(int flush) { EDL *edl = gui->vwindow->get_edl(); - if(!get_canvas()->get_video_on()) get_canvas()->clear_box(0, 0, get_canvas()->get_w(), get_canvas()->get_h()); - if(!get_canvas()->get_video_on() && refresh_frame && edl) - { - float in_x1, in_y1, in_x2, in_y2; - float out_x1, out_y1, out_x2, out_y2; - get_transfers(edl, - in_x1, in_y1, in_x2, in_y2, - out_x1, out_y1, out_x2, out_y2); + if( !get_canvas()->get_video_on() ) { + int cw = get_canvas()->get_w(), ch = get_canvas()->get_h(); + get_canvas()->clear_box(0, 0, cw, ch); + int ow = get_output_w(edl), oh = get_output_h(edl); + if( ow > 0 && oh > 0 && refresh_frame && edl ) { + float in_x1, in_y1, in_x2, in_y2; + float out_x1, out_y1, out_x2, out_y2; + get_transfers(edl, + in_x1, in_y1, in_x2, in_y2, + out_x1, out_y1, out_x2, out_y2); // input scaled from session to refresh frame coordinates - int ow = get_output_w(edl); - int oh = get_output_h(edl); - int rw = refresh_frame->get_w(); - int rh = refresh_frame->get_h(); - float xs = (float)rw / ow; - float ys = (float)rh / oh; - in_x1 *= xs; in_x2 *= xs; - in_y1 *= ys; in_y2 *= ys; - get_canvas()->draw_vframe(refresh_frame, - (int)out_x1, - (int)out_y1, - (int)(out_x2 - out_x1), - (int)(out_y2 - out_y1), - (int)in_x1, - (int)in_y1, - (int)(in_x2 - in_x1), - (int)(in_y2 - in_y1), + int rw = refresh_frame->get_w(); + int rh = refresh_frame->get_h(); + float xs = (float)rw / ow; + float ys = (float)rh / oh; + in_x1 *= xs; in_x2 *= xs; + in_y1 *= ys; in_y2 *= ys; + get_canvas()->draw_vframe(refresh_frame, + (int)out_x1, (int)out_y1, + (int)(out_x2 - out_x1), (int)(out_y2 - out_y1), + (int)in_x1, (int)in_y1, + (int)(in_x2 - in_x1), (int)(in_y2 - in_y1), 0); - } - - if(!get_canvas()->get_video_on()) - { + } draw_overlays(); get_canvas()->flash(flush); }