diff options
author | Robin Gareus <robin@gareus.org> | 2013-06-09 15:51:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-06-09 15:51:31 +0200 |
commit | 3942eec0e9a30ce9422b4a46ccc2ab70cc88be8a (patch) | |
tree | 0340ad3a7dda78eb78fca9f0c65541a7315f5041 | |
parent | 844436d3c6fcc9c1c66293a79dee24a66aa1b2ab (diff) |
improve video-server start-up sequence
* don't wait if launching the app failed
* lower timeout and check interval
* print warnings..
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 6456cdd74f..882e764d6a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3428,11 +3428,17 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg) } video_server_process = new SystemExec(icsd_exec, argp); - video_server_process->start(); - int timeout = 10; + if (video_server_process->start()) { + warning << _("Cannot launch the video-server") << endmsg; + continue; + } + int timeout = 120; // 6 sec while (!ARDOUR_UI::instance()->video_timeline->check_server()) { - sleep(1); - if (--timeout <= 0) break; + usleep (50000); + if (--timeout <= 0 || !video_server_process->is_running()) break; + } + if (timeout <= 0) { + warning << _("Video-server was started but does not respond to requests...") << endmsg; } } return true; |