using namespace std;
using namespace PBD;
using namespace ARDOUR;
+using namespace VideoUtils;
#define PREVIEW_WIDTH (240)
#define PREVIEW_HEIGHT (180)
harvid_list->clear();
- char *res = curl_http_get(url, &status);
+ char *res = a3_curl_http_get(url, &status);
if (status != 200) {
printf("request failed\n"); // XXX
harvid_path.set_text(" - request failed -");
, (long long) (video_duration * seek_slider.get_value() / 1000.0)
, clip_width, clip_height, u.c_str());
- char *data = curl_http_get(url, NULL);
+ char *data = a3_curl_http_get(url, NULL);
if (!data) {
printf("image preview request failed %s\n", url);
imgbuf->fill(RGBA_TO_UINT(0,0,0,255));
using namespace std;
using namespace PBD;
using namespace ARDOUR;
+using namespace VideoUtils;
bool
-confirm_video_outfn (std::string outfn, std::string docroot)
+VideoUtils::confirm_video_outfn (std::string outfn, std::string docroot)
{
/* replace docroot's '/' to G_DIR_SEPARATOR for the comparison */
size_t look_here = 0;
}
std::string
-video_dest_dir (const std::string sessiondir, const std::string docroot)
+VideoUtils::video_dest_dir (const std::string sessiondir, const std::string docroot)
{
std::string dir = docroot;
if (dir.empty() || !dir.compare(0, dir.length(), sessiondir, 0, dir.length())) {
}
std::string
-video_get_docroot (ARDOUR::RCConfiguration* config)
+VideoUtils::video_get_docroot (ARDOUR::RCConfiguration* config)
{
if (config->get_video_advanced_setup()) {
return config->get_video_server_docroot();
}
std::string
-video_get_server_url (ARDOUR::RCConfiguration* config)
+VideoUtils::video_get_server_url (ARDOUR::RCConfiguration* config)
{
if (config->get_video_advanced_setup()) {
return config->get_video_server_url();
std::string
-strip_file_extension (const std::string infile)
+VideoUtils::strip_file_extension (const std::string infile)
{
std::string rv;
char *ext, *bn = strdup(infile.c_str());
}
std::string
-get_file_extension (const std::string infile)
+VideoUtils::get_file_extension (const std::string infile)
{
std::string rv = "";
char *ext, *bn = strdup(infile.c_str());
}
std::string
-video_dest_file (const std::string dir, const std::string infile)
+VideoUtils::video_dest_file (const std::string dir, const std::string infile)
{
return dir + "a3_" + strip_file_extension(Glib::path_get_basename(infile)) + ".avi";
}
std::string
-video_map_path (std::string server_docroot, std::string filepath)
+VideoUtils::video_map_path (std::string server_docroot, std::string filepath)
{
std::string rv = filepath;
}
void
-ParseCSV (const std::string &csv, std::vector<std::vector<std::string> > &lines)
+VideoUtils::ParseCSV (const std::string &csv, std::vector<std::vector<std::string> > &lines)
{
bool inQuote(false);
bool newLine(false);
}
bool
-video_query_info (
+VideoUtils::video_query_info (
std::string video_server_url,
std::string filepath,
double &video_file_fps,
, video_server_url.c_str()
, (video_server_url.length()>0 && video_server_url.at(video_server_url.length()-1) == '/')?"":"/"
, filepath.c_str());
- char *res = curl_http_get(url, NULL);
+ char *res = a3_curl_http_get(url, NULL);
if (!res) {
return false;
}
}
void
-video_draw_cross (Glib::RefPtr<Gdk::Pixbuf> img)
+VideoUtils::video_draw_cross (Glib::RefPtr<Gdk::Pixbuf> img)
{
int rowstride = img->get_rowstride();
extern "C" {
#include <curl/curl.h>
- struct MemoryStruct {
+ struct A3MemoryStruct {
char *data;
size_t size;
};
static size_t
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) {
size_t realsize = size * nmemb;
- struct MemoryStruct *mem = (struct MemoryStruct *)data;
+ struct A3MemoryStruct *mem = (struct A3MemoryStruct *)data;
mem->data = (char *)realloc(mem->data, mem->size + realsize + 1);
if (mem->data) {
return realsize;
}
- char *curl_http_get (const char *u, int *status) {
+ char *a3_curl_http_get (const char *u, int *status) {
CURL *curl;
CURLcode res;
- struct MemoryStruct chunk;
+ struct A3MemoryStruct chunk;
long int httpstatus;
if (status) *status = 0;
//usleep(500000); return NULL; // TEST & DEBUG
if (status) *status = httpstatus;
if (res) {
#ifdef CURLERRORDEBUG
- printf("curl_http_get() failed: %s\n", curlerror);
+ printf("a3_curl_http_get() failed: %s\n", curlerror);
#endif
return NULL;
}
using namespace ARDOUR;
using namespace PBD;
using namespace Timecode;
+using namespace VideoUtils;
VideoTimeLine::VideoTimeLine (PublicEditor *ed, ArdourCanvas::Group *vbg, int initial_height)
: editor (ed)
, video_server_url.c_str()
, (video_server_url.length()>0 && video_server_url.at(video_server_url.length()-1) == '/')?"":"/"
);
- char *res=curl_http_get(url, NULL);
+ char *res=a3_curl_http_get(url, NULL);
if (res) {
if (strstr(res, "status: ok, online.")) { ok = true; }
free(res);
, video_server_url.c_str()
, (video_server_url.length()>0 && video_server_url.at(video_server_url.length()-1) == '/')?"":"/"
);
- char *res=curl_http_get(url, NULL);
+ char *res=a3_curl_http_get(url, NULL);
if (!res) {
return false;
}
, video_server_url.c_str()
, (video_server_url.length()>0 && video_server_url.at(video_server_url.length()-1) == '/')?"":"/"
);
- char *res=curl_http_get(url, NULL);
+ char *res=a3_curl_http_get(url, NULL);
if (res) {
free (res);
}