mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-29 08:47:13 +00:00
Move jpeg_state to RedsState struct
Also required adding reds_get_jpeg_state() for external access. Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
f23c03e37b
commit
da6618681c
@ -1507,7 +1507,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher)
|
||||
}
|
||||
|
||||
worker->image_compression = spice_server_get_image_compression(reds);
|
||||
worker->jpeg_state = jpeg_state;
|
||||
worker->jpeg_state = reds_get_jpeg_state(reds);
|
||||
worker->zlib_glz_state = zlib_glz_state;
|
||||
worker->driver_cap_monitors_config = 0;
|
||||
#ifdef RED_STATISTICS
|
||||
|
||||
@ -215,6 +215,7 @@ struct RedsState {
|
||||
uint8_t spice_uuid[16];
|
||||
|
||||
SpiceImageCompression image_compression;
|
||||
spice_wan_compression_t jpeg_state;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -148,7 +148,6 @@ static int ticketing_enabled = 1; //Ticketing is enabled by default
|
||||
static pthread_mutex_t *lock_cs;
|
||||
static long *lock_count;
|
||||
uint32_t streaming_video = SPICE_STREAM_VIDEO_FILTER;
|
||||
spice_wan_compression_t jpeg_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
int agent_mouse = TRUE;
|
||||
int agent_copypaste = TRUE;
|
||||
@ -3422,6 +3421,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
|
||||
reds->spice_uuid_is_set = FALSE;
|
||||
memset(reds->spice_uuid, 0, sizeof(reds->spice_uuid));
|
||||
reds->image_compression = SPICE_IMAGE_COMPRESSION_AUTO_GLZ;
|
||||
reds->jpeg_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
return reds;
|
||||
}
|
||||
|
||||
@ -3686,7 +3686,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_jpeg_compression(SpiceServer *s, spice_w
|
||||
return -1;
|
||||
}
|
||||
// todo: support dynamically changing the state
|
||||
jpeg_state = comp;
|
||||
s->jpeg_state = comp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4008,3 +4008,8 @@ SPICE_GNUC_VISIBLE void spice_server_set_keepalive_timeout(SpiceServer *s, int t
|
||||
reds->keepalive_timeout = timeout;
|
||||
spice_debug("keepalive timeout=%d", timeout);
|
||||
}
|
||||
|
||||
spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds)
|
||||
{
|
||||
return reds->jpeg_state;
|
||||
}
|
||||
|
||||
@ -75,7 +75,6 @@ extern uint32_t num_renderers;
|
||||
|
||||
extern struct SpiceCoreInterfaceInternal *core;
|
||||
extern uint32_t streaming_video;
|
||||
extern spice_wan_compression_t jpeg_state;
|
||||
extern spice_wan_compression_t zlib_glz_state;
|
||||
|
||||
// Temporary measures to make splitting reds.c to inputs-channel.c easier
|
||||
@ -113,5 +112,6 @@ void reds_on_main_channel_migrate(RedsState *reds, MainChannelClient *mcc);
|
||||
void reds_on_char_device_state_destroy(RedsState *reds, SpiceCharDeviceState *dev);
|
||||
|
||||
void reds_set_client_mm_time_latency(RedsState *reds, RedClient *client, uint32_t latency);
|
||||
spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user