mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-04 15:33:09 +00:00
spice: server: avoid video streaming of small images
I added a lower limit to the size of images that are being streamed. The limit is only active in "filter" video streaming mode. This will prevent blurry animated icons.
This commit is contained in:
parent
fa3dddc0db
commit
d2edac47cd
@ -76,6 +76,7 @@
|
||||
#define RED_STREAM_FRAMES_START_CONDITION 20
|
||||
#define RED_STREAM_GRADUAL_FRAMES_START_CONDITION 0.2
|
||||
#define RED_STREAM_FRAMES_RESET_CONDITION 100
|
||||
#define RED_STREAM_MIN_SIZE (96 * 96)
|
||||
|
||||
#define FPS_TEST_INTERVAL 1
|
||||
#define MAX_FPS 30
|
||||
@ -3460,6 +3461,17 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
|
||||
return;
|
||||
}
|
||||
|
||||
if (worker->streaming_video == STREAM_VIDEO_FILTER) {
|
||||
SpiceRect* rect;
|
||||
int size;
|
||||
|
||||
rect = &drawable->qxl_drawable->u.copy.src_area;
|
||||
size = (rect->right - rect->left) * (rect->bottom - rect->top);
|
||||
if (size < RED_STREAM_MIN_SIZE) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
drawable->streamable = TRUE;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user