diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-10 22:38:43 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-10 22:38:43 +0100 |
commit | bbd7b2aeea5d8c1a260ce4b43b5c360e793d369a (patch) | |
tree | d6f3f9e5cff2d41465e57183050775545c015e52 /gtk2_ardour/ardour_ui.cc | |
parent | 9ddf80225b02bd7c9659c60e22301547fd27ec88 (diff) |
Prepare for windows video support on all drive-letters.
* add harvid version detection (>= 0.8.2 is needed)
* special case empty docroot (for windows, pass drive-letter)
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 55b4a103af..7ec4d6def7 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -174,6 +174,7 @@ typedef uint64_t microseconds_t; #include "time_info_box.h" #include "timers.h" #include "utils.h" +#include "utils_videotl.h" #include "video_server_dialog.h" #include "add_video_dialog.h" #include "transcode_video_dialog.h" @@ -4379,15 +4380,18 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg) std::string icsd_exec = video_server_dialog->get_exec_path(); std::string icsd_docroot = video_server_dialog->get_docroot(); - if (icsd_docroot.empty()) { #ifndef PLATFORM_WINDOWS - icsd_docroot = X_("/"); -#else - icsd_docroot = X_("C:\\"); -#endif + if (icsd_docroot.empty()) { + icsd_docroot = VideoUtils::video_get_docroot (Config); } +#endif GStatBuf sb; +#ifdef PLATFORM_WINDOWS + if (VideoUtils::harvid_version >= 0x000802 && icsd_docroot.empty()) { + /* OK, allow all drive letters */ + } else +#endif if (g_lstat (icsd_docroot.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode)) { warning << _("Specified docroot is not an existing directory.") << endmsg; continue; |