vedl->set_outpoint(end);
vedl->local_session->set_selectionstart(start);
vedl->local_session->set_selectionend(end);
- vwindow->update_position(CHANGE_NONE, 0, 1, 0);
+ vwindow->update_position();
return 1;
}
else {
gui->channel_picker->save_scan_defaults(&gui->thread->scan_params);
if(!result)
{
- get_gui()->hide_window();
gui->lock_window("ConfirmScanThread::handle_done_event");
gui->scan();
gui->unlock_window();
#define panel_btn(fn, args, s) \
panel_fn(panel_##fn, args, mwindow->gui->mbuttons->edit_panel->panel_##s)
+
double CWindowEditing::get_position()
{
relock_cm("get_position");
void CWindowEditing::set_position(double position)
{
relock_cm("set_position");
- set_position(position);
+ mwindow->gui->mbuttons->edit_panel->set_position(position);
relock_mc("set_position");
}
void CWindowEditing::set_click_to_play(int v)
{
- relock_cm("set_click_to_play");
+ relock_cm("set_position");
mwindow->edl->session->cwindow_click2play = v;
+ relock_mc("set_position");
click2play->update(v);
- relock_mc("set_click_to_play");
}
+
void panel_btn(stop_transport,(), stop_transport())
void panel_btn(toggle_label,(), toggle_label())
void panel_btn(next_label,(int cut), next_label(cut))
void KeyFrameThread::close_window()
{
- lock_window("KeyFrameThread::close_window");
+ lock_dialog("KeyFrameThread::close_window");
if( get_gui() ) {
get_gui()->lock_window("KeyFrameThread::close_window");
get_gui()->set_done(1);
get_gui()->unlock_window();
}
- unlock_window();
+ unlock_dialog();
}
update_values();
mwindow->gui->unlock_window();
- lock_window("KeyFrameThread::update_gui");
+ lock_dialog("KeyFrameThread::update_gui");
KeyFrameWindow *window = (KeyFrameWindow*)get_gui();
if( window ) {
window->lock_window("KeyFrameThread::update_gui");
}
window->unlock_window();
}
- unlock_window();
+ unlock_dialog();
}
#endif
}
void MainError::show_error_local(const char *string)
{
// assume user won't get to closing the GUI here
- lock_window("MainError::show_error_local");
+ lock_dialog("MainError::show_error_local");
if( get_gui() ) {
MainErrorGUI *gui = (MainErrorGUI*)get_gui();
gui->lock_window("MainError::show_error_local");
append_error(string);
start();
}
- unlock_window();
+ unlock_dialog();
}
case '-': new_position = current_position - new_position; break;
default: break;
}
+ panel->subwindow->lock_window("ManualGoto::handle_done_event");
panel->set_position(new_position);
+ panel->subwindow->unlock_window();
}
void ManualGotoWindow::reset_data(double position)
{
- lock_window();
+ lock_window("ManualGotoWindow::reset_data");
update_position(position);
signtitle->update("=");
unlock_window();
{
if(thread_running)
{
- lock_gui("PreferencesThread::update_framerate");
+ lock_dialog("PreferencesThread::update_framerate");
PreferencesWindow *window = (PreferencesWindow*)get_gui();
if(window) window->update_framerate();
- unlock_gui();
+ unlock_dialog();
}
return 0;
}
{
if(thread_running)
{
- lock_gui("PreferencesThread::update_framerate");
+ lock_dialog("PreferencesThread::update_framerate");
PreferencesWindow *window = (PreferencesWindow*)get_gui();
if(window) window->update_rates();
- unlock_gui();
+ unlock_dialog();
}
}
}
// Que the CWindow
- gui->vwindow->update_position(CHANGE_NONE,
- 0,
- 1,
- 0);
+ gui->vwindow->update_position();
update(1);
}
}
this->edl = mwindow->edl->get_vwindow_edl(edl_number);
this->edl->Garbage::add_user();
gui->change_source(get_edl(), get_edl()->local_session->clip_title);
- update_position(CHANGE_ALL, 1, 1, 1);
+ update_position(CHANGE_ALL);
}
else
{
// Update GUI
gui->change_source(this->edl, title);
- update_position(CHANGE_ALL, 1, 1, 1);
-
+ update_position(CHANGE_ALL);
gui->unlock_window();
}
// Update GUI
gui->change_source(edl, edl->local_session->clip_title);
- update_position(CHANGE_ALL, 1, 1, 1);
+ update_position(CHANGE_ALL);
}
else
gui->change_source(edl, _("Viewer"));
void VWindow::goto_start()
{
- if(get_edl())
- {
+ if( get_edl() ) {
get_edl()->local_session->set_selectionstart(0);
get_edl()->local_session->set_selectionend(0);
- update_position(CHANGE_NONE,
- 0,
- 1,
- 0);
+ update_position();
}
}
void VWindow::goto_end()
{
- if(get_edl())
- {
+ if( get_edl() ) {
double position = get_edl()->tracks->total_length();
get_edl()->local_session->set_selectionstart(position);
get_edl()->local_session->set_selectionend(position);
- update_position(CHANGE_NONE,
- 0,
- 1,
- 0);
+ update_position();
}
}
gui->edit_panel->update();
}
-void VWindow::update_position(int change_type,
- int use_slider,
- int update_slider,
- int lock_window)
+void VWindow::update_position(int change_type)
{
EDL *edl = get_edl();
- if(edl)
- {
-//printf("VWindow::update_position %d\n", __LINE__);
-//edl->dump();
+ if(edl) {
+ gui->unlock_window();
playback_engine->refresh_frame(change_type, edl);
-
+ gui->lock_window("VWindow::update_position");
double position = edl->local_session->get_selectionstart(1);
- if(lock_window) gui->lock_window("VWindow::update_position");
gui->clock->update(position);
gui->timebar->update(1);
- if(lock_window) gui->unlock_window();
}
}
playback_engine->stop_playback(wait);
}
+void VWindow::interrupt_playback(int wait)
+{
+ gui->unlock_window();
+ playback_engine->interrupt_playback(wait);
+ gui->lock_window("VWindow::interrupt_playback");
+}
+
int VWindow::update_position(double position)
{
EDL *edl = get_edl();
- if(edl)
- {
- gui->unlock_window();
-
- playback_engine->interrupt_playback(1);
-
+ if(edl) {
+ interrupt_playback(1);
position = mwindow->edl->align_to_frame(position, 0);
position = MAX(0, position);
-
edl->local_session->set_selectionstart(position);
edl->local_session->set_selectionend(position);
-
- gui->lock_window("VWindow::update_position 1");
- update_position(CHANGE_NONE, 0, 1, 0);
+ update_position();
}
return 1;
void VWindow::set_inpoint()
{
EDL *edl = get_edl();
- if(edl)
- {
+ if(edl) {
edl->set_inpoint(edl->local_session->get_selectionstart(1));
gui->timebar->update(1);
}
Indexable* get_source();
void update(int do_timebar);
- void update_position(int change_type = CHANGE_NONE,
- int use_slider = 1,
- int update_slider = 0,
- int lock_window = 0);
+ void update_position(int change_type = CHANGE_NONE);
int update_position(double position);
void set_inpoint();
void set_outpoint();
void goto_start();
void goto_end();
void stop_playback(int wait);
+ void interrupt_playback(int wait);
VTracking *playback_cursor;
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);
}
delete window_lock;
}
-void BC_DialogThread::lock_window(const char *location)
+void BC_DialogThread::lock_dialog(const char *location)
{
window_lock->lock(location);
}
-void BC_DialogThread::unlock_window()
+void BC_DialogThread::unlock_dialog()
{
window_lock->unlock();
}
handle_close_event(result);
}
-void BC_DialogThread::lock_gui(const char *location)
-{
- window_lock->lock(location);
-}
-
-void BC_DialogThread::unlock_gui()
-{
- window_lock->unlock();
-}
-
-
BC_Window* BC_DialogThread::new_gui()
{
printf("BC_DialogThread::new_gui called\n");
void BC_DialogThread::close_window()
{
- lock_window("BC_DialogThread::close_window");
+ lock_dialog("BC_DialogThread::close_window");
if(gui)
{
gui->lock_window("BC_DialogThread::close_window");
gui->set_done(1);
gui->unlock_window();
}
- unlock_window();
+ unlock_dialog();
join();
}
BC_Window* get_gui();
// Called by user to access the gui pointer
- void lock_window(const char *location);
- void unlock_window();
+ void lock_dialog(const char *location);
+ void unlock_dialog();
// Called by user to close the GUI from outside the thread
void close_window();
{
if( count <= 0 ) {
printf("Mutex::unlock not locked: %s\n", title);
+ booby();
return 0;
}
// Remove from recursive status
# uncomment to enable diagnostics
#DEBUG
-# uncommet to use direct usb
+# uncomment to use direct usb
#USB_DIRECT
# redefine default, use
# Most useful functions have to be on K5-K9 because Xpress only has 5 keys
K5 XK_Home # Beginning
- K6 XK_KP_3 # Play, or if playing Stop
+ K6 XK_KP_6 # Reverse, or if playing Stop
K7 XK_KP_0 # Stop
- K8 XK_KP_6 # Reverse, or if playing Stop
+ K8 XK_KP_3 # Play, or if playing Stop
K9 XK_End # End
-# K10 "[" # Switch if K14 not working
-# K11 "]" # Switch if K15 not working
- K10 Alt-XK_Left
- K11 Alt-XK_Right
- K12 XK_Home # Beginning
- K13 XK_End # End
+ K10 Alt-XK_Left # Go to previous edit
+ K11 Alt-XK_Right # Go to next edit
+ K12 Ctrl-XK_Left # Go to previous label
+ K13 Ctrl-XK_Right # Go to next label
K14 "[" # Toggle in
K15 "]" # Toggle out
# Most useful functions have to be on K5-K9 because Xpress only has 5 keys
K5 XK_Home # Beginning
- K6 XK_KP_3 # Play, or if playing Stop
+ K6 XK_KP_6 # Reverse, or if playing Stop
K7 "f" # Go in or out of Fullscreen mode
- K8 XK_KP_6 # Reverse, of if playing Stop
+ K8 XK_KP_3 # Play, of if playing Stop
K9 XK_End # End
- K10 "[" # Temporary until K14 Pro fixed
- K11 "]" # Temporary until K15 Pro fixed
- K12 XK_Home # Beginning
- K13 XK_End # End
+ K10 Alt-XK_Left # Go to previous edit
+ K11 Alt-XK_Right # Go to next edit
+ K12 Ctrl-XK_Left # Go to previous label
+ K13 Ctrl-XK_Right # Go to next label
K14 "[" # Toggle in
K15 "]" # Toggle out
-
+
K1 "i" # Clip
K2 "x" # Cut
K3 "c" # Copy
# Most useful functions have to be on K6-K9 because Xpress only has 5 keys
K5 XK_Home # Beginning
- K6 XK_KP_3 # Play, or if playing Stop
+ K6 XK_KP_6 # Reverse, or if playing Stop
K7 "f" # Go in or out of Fullscreen mode
- K8 XK_KP_6 # Reverse, or if playing Stop
+ K8 XK_KP_3 # Play, or if playing Stop
K9 XK_End # End
- K10 "[" # Temporary until K14 Pro fixed
- K11 "]" # Temporary until K15 Pro fixed
- K12 XK_Home # Beginning
- K13 XK_End # End
+ K10 "[" # Toggle in if no K14
+ K11 "]" # Toggle in if no K15
+ K12 Alt-XK_Left # Go to previous edit
+ K13 Alt-XK_Right # Go to next edit
K14 "[" # Toggle in
K15 "]" # Toggle out
-
+
K1 "i" # Clip
K2 "v" # Splice
K3 "c" # Copy