diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-13 23:00:24 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-13 23:00:24 -0400 |
commit | f00b3b7f111e36537d773daef0ae77b03d11f82f (patch) | |
tree | 4bfdd432199a7d4a4cbfc7769493e6bedaa5e51f /gtk2_ardour/ardour_ui.cc | |
parent | 31d234b48c36bddb4d5228a3abee9c4419403879 (diff) | |
parent | 80a13145f398e1c4ea22b3f8a25a5b38d3c5e328 (diff) |
merge with master
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 8e29094cc6..ad727d00d6 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3423,9 +3423,28 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg) Config->set_video_advanced_setup(true); } + if (video_server_process) { + delete video_server_process; + } + video_server_process = new SystemExec(icsd_exec, argp); - video_server_process->start(); - sleep(1); + 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()) { + 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; + } else { + if (!ARDOUR_UI::instance()->video_timeline->check_server_docroot()) { + delete video_server_process; + video_server_process = 0; + } + } } return true; } |