X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fadd_video_dialog.cc;h=98825381e832bfe388c607bbbaf81dbeae680307;hb=6e09e72f1112bbd49a174223b82513b78d4093b6;hp=4cb7f7668bf81e37a2d3e090ff5a4eca98dd9776;hpb=8c56770593d0644ce7201032b66062b5cd77b1d8;p=ardour.git diff --git a/gtk2_ardour/add_video_dialog.cc b/gtk2_ardour/add_video_dialog.cc index 4cb7f7668b..98825381e8 100644 --- a/gtk2_ardour/add_video_dialog.cc +++ b/gtk2_ardour/add_video_dialog.cc @@ -34,8 +34,9 @@ #include "ardour_ui.h" #include "add_video_dialog.h" +#include "ardour_http.h" #include "utils_videotl.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace Gtk; using namespace std; @@ -108,7 +109,7 @@ AddVideoDialog::AddVideoDialog (Session* s) /* file chooser */ chooser.set_border_width (4); -#ifdef GTKOSX +#ifdef __APPLE__ /* some broken redraw behaviour - this is a bandaid */ chooser.signal_selection_changed().connect (mem_fun (chooser, &Widget::queue_draw)); #endif @@ -192,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"); @@ -322,8 +326,15 @@ 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 - && !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 */ int plen; @@ -332,7 +343,7 @@ AddVideoDialog::file_name (bool &local_file) char *ue = curl_easy_unescape(curl, uri.c_str(), uri.length(), &plen); #ifdef PLATFORM_WINDOWS char *tmp; - while (tmp = strchr(ue, '/')) *tmp = '\\'; + while ((tmp = strchr(ue, '/'))) *tmp = '\\'; #endif std::string path = video_get_docroot(Config) + ue; if (!::access(path.c_str(), R_OK)) { @@ -503,7 +514,7 @@ AddVideoDialog::harvid_request(std::string u) harvid_list->clear(); - char *res = a3_curl_http_get(url, &status); + char* res = ArdourCurl::http_get (url, &status); if (status != 200) { printf("request failed\n"); // XXX harvid_path.set_text(" - request failed -"); @@ -683,7 +694,7 @@ AddVideoDialog::request_preview(std::string u) , (long long) (video_duration * seek_slider.get_value() / 1000.0) , clip_width, clip_height, u.c_str()); - char *data = a3_curl_http_get(url, NULL); + char* data = ArdourCurl::http_get (url, NULL); if (!data) { printf("image preview request failed %s\n", url); imgbuf->fill(RGBA_TO_UINT(0,0,0,255));