summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-01-11 03:55:04 +0100
committerRobin Gareus <robin@gareus.org>2017-01-11 03:55:04 +0100
commitd1e7a5bd1cff938caf2bef27685a8e839aa83ee7 (patch)
treeebc88271b976ff275c24258bb6c718f51e60ec5d /gtk2_ardour
parentbbd7b2aeea5d8c1a260ce4b43b5c360e793d369a (diff)
Windows/Videotimeline: support all drives (no fixed docroot/drive-letter)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/add_video_dialog.cc15
-rw-r--r--gtk2_ardour/ardour_ui.cc5
-rw-r--r--gtk2_ardour/video_server_dialog.cc7
-rw-r--r--gtk2_ardour/video_timeline.cc4
4 files changed, 20 insertions, 11 deletions
diff --git a/gtk2_ardour/add_video_dialog.cc b/gtk2_ardour/add_video_dialog.cc
index bd94c370ba..98825381e8 100644
--- a/gtk2_ardour/add_video_dialog.cc
+++ b/gtk2_ardour/add_video_dialog.cc
@@ -193,8 +193,11 @@ AddVideoDialog::AddVideoDialog (Session* s)
/* xjadeo checkbox */
if (ARDOUR_UI::instance()->video_timeline->found_xjadeo()
+#ifndef PLATFORM_WINDOWS
/* TODO xjadeo setup w/ xjremote */
- && video_get_docroot(Config).size() > 0) {
+ && video_get_docroot(Config).size() > 0
+#endif
+ ) {
xjadeo_checkbox.set_active(true); /* set in ardour_ui.cpp ?! */
} else {
printf("xjadeo was not found or video-server docroot is unset (remote video-server)\n");
@@ -323,8 +326,14 @@ AddVideoDialog::file_name (bool &local_file)
std::string video_server_url = video_get_server_url(Config);
/* check if video server is running locally */
- if (video_get_docroot(Config).size() > 0 &&
- (0 == video_server_url.compare (0, 16, "http://127.0.0.1") || 0 == video_server_url.compare (0, 16, "http://localhost"))
+ if (
+#ifdef PLATFORM_WINDOWS
+ (video_get_docroot(Config).size() > 0 || !show_advanced)
+#else
+ video_get_docroot(Config).size() > 0
+#endif
+ &&
+ (0 == video_server_url.compare (0, 16, "http://127.0.0.1") || 0 == video_server_url.compare (0, 16, "http://localhost"))
)
{
/* check if the file can be accessed */
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 7ec4d6def7..9e63c6cb76 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -4423,6 +4423,11 @@ ARDOUR_UI::start_video_server (Gtk::Window* float_window, bool popup_msg)
argp[8] = 0;
stop_video_server();
+#ifdef PLATFORM_WINDOWS
+ if (VideoUtils::harvid_version >= 0x000802 && icsd_docroot.empty()) {
+ /* OK, allow all drive letters */
+ } else
+#endif
if (icsd_docroot == X_("/") || icsd_docroot == X_("C:\\")) {
Config->set_video_advanced_setup(false);
} else {
diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc
index a8c2bd3ea3..5bd9f7e772 100644
--- a/gtk2_ardour/video_server_dialog.cc
+++ b/gtk2_ardour/video_server_dialog.cc
@@ -76,7 +76,7 @@ VideoServerDialog::VideoServerDialog (Session* s)
path_entry.set_width_chars(38);
path_entry.set_text("/usr/bin/harvid");
docroot_entry.set_width_chars(38);
- docroot_entry.set_text(Config->get_video_server_docroot());
+ docroot_entry.set_text(video_get_docroot (Config));
#ifndef __APPLE__
/* Note: on OSX icsd is not able to bind to IPv4 localhost */
@@ -153,11 +153,6 @@ VideoServerDialog::VideoServerDialog (Session* s)
if (Config->get_video_advanced_setup()){
vbox->pack_start (*docroot_hbox, false, false);
} else {
-#ifndef PLATFORM_WINDOWS
- docroot_entry.set_text(X_("/"));
-#else
- docroot_entry.set_text(X_("C:\\"));
-#endif
listenport_spinner.set_sensitive(false);
}
vbox->pack_start (*options_box, false, true);
diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc
index f876f6d9fd..95952c52a5 100644
--- a/gtk2_ardour/video_timeline.cc
+++ b/gtk2_ardour/video_timeline.cc
@@ -59,8 +59,6 @@ VideoTimeLine::VideoTimeLine (PublicEditor *ed, ArdourCanvas::Container *vbg, in
video_offset_lock = false;
video_aspect_ratio = 4.0/3.0;
Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&VideoTimeLine::parameter_changed, this, _1), gui_context());
- video_server_url = video_get_server_url(Config);
- server_docroot = video_get_docroot(Config);
video_filename = "";
local_file = true;
video_file_fps = 25.0;
@@ -69,6 +67,8 @@ VideoTimeLine::VideoTimeLine (PublicEditor *ed, ArdourCanvas::Container *vbg, in
reopen_vmonitor=false;
find_xjadeo();
find_harvid();
+ video_server_url = video_get_server_url(Config);
+ server_docroot = video_get_docroot(Config);
VtlUpdate.connect (*this, invalidator (*this), boost::bind (&PublicEditor::queue_visual_videotimeline_update, editor), gui_context());
GuiUpdate.connect (*this, invalidator (*this), boost::bind (&VideoTimeLine::gui_update, this, _1), gui_context());