#include "video_image_frame.h"
#include "utils_videotl.h"
+#ifdef WAF_BUILD
+#include "gtk2ardour-version.h"
+#endif
+
+#ifndef ARDOUR_CURL_TIMEOUT
+#define ARDOUR_CURL_TIMEOUT (60)
+#endif
#include "i18n.h"
using namespace Gtk;
if (config->get_video_advanced_setup()) {
return config->get_video_server_docroot();
}
+#ifndef PLATFORM_WINDOWS
return X_("/");
+#else
+ return X_("C:\\");
+#endif
}
std::string
std::string
VideoUtils::video_dest_file (const std::string dir, const std::string infile)
{
- return dir + "a3_" + strip_file_extension(Glib::path_get_basename(infile)) + ".avi";
+ return Glib::build_filename(dir, strip_file_extension(Glib::path_get_basename(infile)) + ".avi");
}
std::string
{
std::string rv = filepath;
+ /* strip docroot */
+ if (server_docroot.length() > 0) {
+ if (rv.compare(0, server_docroot.length(), server_docroot) == 0 ) {
+ rv = rv.substr(server_docroot.length());
+ }
+ }
+
/* replace all G_DIR_SEPARATOR with '/' */
size_t look_here = 0;
size_t found_here;
look_here = found_here + 1;
}
- /* strip docroot */
- if (server_docroot.length() > 0) {
- if (rv.compare(0, server_docroot.length(), server_docroot) == 0 ) {
- rv = rv.substr(server_docroot.length());
- }
- }
-
CURL *curl;
char *ue;
curl = curl_easy_init();
struct A3MemoryStruct chunk;
long int httpstatus;
if (status) *status = 0;
- //usleep(500000); return NULL; // TEST & DEBUG
+ //Glib::usleep(500000); return NULL; // TEST & DEBUG
if (strncmp("http://", u, 7)) return NULL;
chunk.data=NULL;
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
- curl_easy_setopt(curl, CURLOPT_USERAGENT, ARDOUR_USER_AGENT);
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, PROGRAM_NAME VERSIONSTRING);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, ARDOUR_CURL_TIMEOUT);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
#ifdef CURLERRORDEBUG