mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Use "Frames" for video-frames (NO-OP)
This commit is contained in:
parent
032bbae748
commit
c6e53e7785
2 changed files with 11 additions and 11 deletions
|
|
@ -63,7 +63,7 @@ VideoImageFrame::VideoImageFrame (PublicEditor& ed, ArdourCanvas::Container& par
|
||||||
image = new ArdourCanvas::Image (_parent, Cairo::FORMAT_ARGB32, clip_width, clip_height);
|
image = new ArdourCanvas::Image (_parent, Cairo::FORMAT_ARGB32, clip_width, clip_height);
|
||||||
|
|
||||||
img = image->get_image();
|
img = image->get_image();
|
||||||
fill_sample(0, 0, 0);
|
fill_frame (0, 0, 0);
|
||||||
draw_line();
|
draw_line();
|
||||||
draw_x();
|
draw_x();
|
||||||
image->put_image(img);
|
image->put_image(img);
|
||||||
|
|
@ -108,7 +108,7 @@ VideoImageFrame::set_videoframe (samplepos_t videoframenumber, int re)
|
||||||
rightend = re;
|
rightend = re;
|
||||||
|
|
||||||
img = image->get_image();
|
img = image->get_image();
|
||||||
fill_sample(0, 0, 0);
|
fill_frame (0, 0, 0);
|
||||||
draw_x();
|
draw_x();
|
||||||
draw_line();
|
draw_line();
|
||||||
cut_rightend();
|
cut_rightend();
|
||||||
|
|
@ -116,7 +116,7 @@ VideoImageFrame::set_videoframe (samplepos_t videoframenumber, int re)
|
||||||
exposeimg();
|
exposeimg();
|
||||||
|
|
||||||
/* request video-frame from decoder in background thread */
|
/* request video-frame from decoder in background thread */
|
||||||
http_get(video_frame_number);
|
http_get (video_frame_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -135,7 +135,7 @@ VideoImageFrame::draw_line ()
|
||||||
}
|
}
|
||||||
|
|
||||||
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 rowstride = img->stride;
|
||||||
const int clip_height = img->height;
|
const int clip_height = img->height;
|
||||||
|
|
@ -203,7 +203,7 @@ http_get_thread (void *arg) {
|
||||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 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?sample=%li&w=%d&h=%d&file=%s&format=bgra",
|
||||||
vif->get_video_server_url().c_str(),
|
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()
|
vif->get_video_filename().c_str()
|
||||||
);
|
);
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
@ -234,7 +234,7 @@ VideoImageFrame::http_download_done (char *data){
|
||||||
if (!data) {
|
if (!data) {
|
||||||
/* Image request failed (HTTP error or timeout) */
|
/* Image request failed (HTTP error or timeout) */
|
||||||
img = image->get_image();
|
img = image->get_image();
|
||||||
fill_sample(128, 0, 0);
|
fill_frame (128, 0, 0);
|
||||||
draw_x();
|
draw_x();
|
||||||
cut_rightend();
|
cut_rightend();
|
||||||
draw_line();
|
draw_line();
|
||||||
|
|
@ -261,7 +261,7 @@ VideoImageFrame::http_download_done (char *data){
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
VideoImageFrame::http_get(samplepos_t fn) {
|
VideoImageFrame::http_get (samplepos_t fn) {
|
||||||
if (pthread_mutex_trylock(&request_lock)) {
|
if (pthread_mutex_trylock(&request_lock)) {
|
||||||
pthread_mutex_lock(&queue_lock);
|
pthread_mutex_lock(&queue_lock);
|
||||||
queued_request=true;
|
queued_request=true;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ class VideoImageFrame : public sigc::trackable
|
||||||
int get_height () {return clip_height;}
|
int get_height () {return clip_height;}
|
||||||
int get_width () {return clip_width;}
|
int get_width () {return clip_width;}
|
||||||
int get_rightend() { return rightend;}
|
int get_rightend() { return rightend;}
|
||||||
samplepos_t get_req_sample () {return req_video_frame_number;}
|
samplepos_t get_req_frame () {return req_video_frame_number;}
|
||||||
std::string get_video_server_url () {return video_server_url;}
|
std::string get_video_server_url () {return video_server_url;}
|
||||||
std::string get_video_filename () {return video_filename;}
|
std::string get_video_filename () {return video_filename;}
|
||||||
|
|
||||||
|
|
@ -84,14 +84,14 @@ class VideoImageFrame : public sigc::trackable
|
||||||
void reposition ();
|
void reposition ();
|
||||||
void exposeimg ();
|
void exposeimg ();
|
||||||
|
|
||||||
void fill_sample (const uint8_t r, const uint8_t g, const uint8_t b);
|
void fill_frame (const uint8_t r, const uint8_t g, const uint8_t b);
|
||||||
void draw_line ();
|
void draw_line ();
|
||||||
void draw_x ();
|
void draw_x ();
|
||||||
void cut_rightend ();
|
void cut_rightend ();
|
||||||
|
|
||||||
|
|
||||||
void http_get(samplepos_t fn);
|
void http_get (samplepos_t fn);
|
||||||
void http_get_again(samplepos_t fn);
|
void http_get_again (samplepos_t fn);
|
||||||
|
|
||||||
samplepos_t req_video_frame_number;
|
samplepos_t req_video_frame_number;
|
||||||
samplepos_t want_video_frame_number;
|
samplepos_t want_video_frame_number;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue