image = new ArdourCanvas::Image (_parent, Cairo::FORMAT_ARGB32, clip_width, clip_height);
img = image->get_image();
- fill_sample(0, 0, 0);
+ fill_frame (0, 0, 0);
draw_line();
draw_x();
image->put_image(img);
rightend = re;
img = image->get_image();
- fill_sample(0, 0, 0);
+ fill_frame (0, 0, 0);
draw_x();
draw_line();
cut_rightend();
exposeimg();
/* request video-frame from decoder in background thread */
- http_get(video_frame_number);
+ http_get (video_frame_number);
}
void
}
void
-VideoImageFrame::fill_sample (const uint8_t r, const uint8_t g, const uint8_t b)
+VideoImageFrame::fill_frame (const uint8_t r, const uint8_t g, const uint8_t b)
{
const int rowstride = img->stride;
const int clip_height = img->height;
char url[2048];
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
- snprintf(url, sizeof(url), "%s?sample=%li&w=%d&h=%d&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_sample(), vif->get_width(), vif->get_height(),
+ (long int) vif->get_req_frame(), vif->get_width(), vif->get_height(),
vif->get_video_filename().c_str()
);
int status = 0;
int timeout = 1000; // * 5ms -> 5sec
char *res = NULL;
do {
- res = ArdourCurl::http_get (url, &status);
+ res = ArdourCurl::http_get (url, &status, false);
if (status == 503) Glib::usleep(5000); // try-again
} while (status == 503 && --timeout > 0);
if (!data) {
/* Image request failed (HTTP error or timeout) */
img = image->get_image();
- fill_sample(128, 0, 0);
+ fill_frame (128, 0, 0);
draw_x();
cut_rightend();
draw_line();
}
exposeimg();
- /* don't request samples too quickly, wait after user has zoomed */
+ /* don't request frames too quickly, wait after user has zoomed */
Glib::usleep(40000);
if (queued_request) {
void
-VideoImageFrame::http_get(samplepos_t fn) {
+VideoImageFrame::http_get (samplepos_t fn) {
if (pthread_mutex_trylock(&request_lock)) {
pthread_mutex_lock(&queue_lock);
queued_request=true;