X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fvideo_image_frame.cc;h=093f2351077ed32ef52222f5b28cc36020370fe0;hb=05149f9bc54d0cfb8b162ba7cfac975b5eb79971;hp=ebcb9e6f96c8b9aabc52806b18b20075b404cdfe;hpb=cf806123ca5faaef483f898daba3f7bd38ec62eb;p=ardour.git diff --git a/gtk2_ardour/video_image_frame.cc b/gtk2_ardour/video_image_frame.cc index ebcb9e6f96..093f235107 100644 --- a/gtk2_ardour/video_image_frame.cc +++ b/gtk2_ardour/video_image_frame.cc @@ -20,17 +20,17 @@ #include #include "ardour/tempo.h" -#include "ardour_ui.h" -#include "video_image_frame.h" -#include "public_editor.h" -#include "utils.h" -#include "canvas/group.h" -#include "utils_videotl.h" - #include #include -#include "i18n.h" +#include "canvas/container.h" + +#include "ardour_http.h" +#include "public_editor.h" +#include "utils_videotl.h" +#include "video_image_frame.h" + +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -43,7 +43,7 @@ static void freedata_cb (uint8_t *d, void* /*arg*/) { free (d); } -VideoImageFrame::VideoImageFrame (PublicEditor& ed, ArdourCanvas::Group& parent, int w, int h, std::string vsurl, std::string vfn) +VideoImageFrame::VideoImageFrame (PublicEditor& ed, ArdourCanvas::Container& parent, int w, int h, std::string vsurl, std::string vfn) : editor (ed) , _parent(&parent) , clip_width(w) @@ -195,13 +195,13 @@ VideoImageFrame::cut_rightend () } } -void * +static void * http_get_thread (void *arg) { VideoImageFrame *vif = static_cast(arg); char url[2048]; pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - snprintf(url, sizeof(url), "%s?frame=%li&w=%d&h=%di&file=%s&format=bgra", + snprintf(url, sizeof(url), "%s?frame=%li&w=%d&h=%d&file=%s&format=bgra", vif->get_video_server_url().c_str(), (long int) vif->get_req_frame(), vif->get_width(), vif->get_height(), vif->get_video_filename().c_str() @@ -210,7 +210,7 @@ http_get_thread (void *arg) { int timeout = 1000; // * 5ms -> 5sec char *res = NULL; do { - res=a3_curl_http_get(url, &status); + res = ArdourCurl::http_get (url, &status); if (status == 503) Glib::usleep(5000); // try-again } while (status == 503 && --timeout > 0);