VWindowGUI::~VWindowGUI()
{
- vwindow->playback_engine->interrupt_playback(1);
+ vwindow->stop_playback(1);
sources.remove_all_objects();
labels.remove_all_objects();
delete canvas;
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)
break;
case 'f':
unlock_window();
- if(mwindow->session->vwindow_fullscreen)
+ if( canvas->get_fullscreen() )
canvas->stop_fullscreen();
else
canvas->start_fullscreen();
break;
case ESC:
unlock_window();
- if(mwindow->session->vwindow_fullscreen)
+ if( canvas->get_fullscreen() )
canvas->stop_fullscreen();
lock_window("VWindowGUI::keypress_event 2");
break;
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()
if( highlighted &&
mwindow->session->current_operation == DRAG_ASSET ) {
highlighted = 0;
- canvas->draw_refresh();
+ canvas->refresh(1);
unlock_window();
Indexable *indexable =
{
if( !transport->is_stopped() ) {
unlock_window();
- transport->handle_transport(STOP, 1, 0, 0);
+ transport->handle_transport(STOP, 1);
lock_window("VWindowGUI::panel_stop_transport");
}
}
if( position < 0 ) position = 0;
edl->local_session->set_selectionstart(position);
edl->local_session->set_selectionend(position);
- vwindow->update_position(CHANGE_NONE, 0, 1);
+ vwindow->update_position();
}
}
void VWindowEditing::panel_next_label(int cut)
{
if( !vwindow->get_edl() ) return;
- vwindow->gui->unlock_window();
- vwindow->playback_engine->interrupt_playback(1);
- vwindow->gui->lock_window("VWindowEditing::next_label");
+ vwindow->interrupt_playback(1);
EDL *edl = vwindow->get_edl();
Label *current = edl->labels->next_label(
edl->tracks->total_length();
edl->local_session->set_selectionstart(position);
edl->local_session->set_selectionend(position);
- vwindow->update_position(CHANGE_NONE, 0, 1, 0);
+ vwindow->update_position();
vwindow->gui->timebar->update(1);
}
void VWindowEditing::panel_prev_label(int cut)
{
if( !vwindow->get_edl() ) return;
- vwindow->gui->unlock_window();
- vwindow->playback_engine->interrupt_playback(1);
- vwindow->gui->lock_window("VWindowEditing::prev_label");
+ vwindow->interrupt_playback(1);
EDL *edl = vwindow->get_edl();
Label *current = edl->labels->prev_label(
double position = !current ? 0 : current->position;
edl->local_session->set_selectionstart(position);
edl->local_session->set_selectionend(position);
- vwindow->update_position(CHANGE_NONE, 0, 1, 0);
+ vwindow->update_position();
vwindow->gui->timebar->update(1);
}
void VWindowCanvas::close_source()
{
- gui->unlock_window();
- gui->vwindow->playback_engine->interrupt_playback(1);
- gui->lock_window("VWindowCanvas::close_source");
+ gui->vwindow->interrupt_playback(1);
gui->vwindow->delete_source(1, 1);
}
{
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);
}
}
}
-int VWindowCanvas::get_fullscreen()
-{
- return mwindow->session->vwindow_fullscreen;
-}
-
-void VWindowCanvas::set_fullscreen(int value)
-{
- mwindow->session->vwindow_fullscreen = value;
-}
-