13
0

Windows/Videotimeline: support all drives (no fixed docroot/drive-letter)

This commit is contained in:
Robin Gareus 2017-01-11 03:55:04 +01:00
parent bbd7b2aeea
commit d1e7a5bd1c
4 changed files with 20 additions and 11 deletions

View File

@ -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 */

View File

@ -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 {

View File

@ -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);

View File

@ -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());