From 3942eec0e9a30ce9422b4a46ccc2ab70cc88be8a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 9 Jun 2013 15:51:31 +0200 Subject: [PATCH] improve video-server start-up sequence * don't wait if launching the app failed * lower timeout and check interval * print warnings.. --- gtk2_ardour/ardour_ui.cc | 14 ++++++++++---- 1 file 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;