Revision 84a23f25 ui/spice-core.c
b/ui/spice-core.c | ||
---|---|---|
169 | 169 |
exit(1); |
170 | 170 |
} |
171 | 171 |
|
172 |
#if SPICE_SERVER_VERSION >= 0x000600 /* 0.6.0 */ |
|
173 |
|
|
174 |
static const char *stream_video_names[] = { |
|
175 |
[ SPICE_STREAM_VIDEO_OFF ] = "off", |
|
176 |
[ SPICE_STREAM_VIDEO_ALL ] = "all", |
|
177 |
[ SPICE_STREAM_VIDEO_FILTER ] = "filter", |
|
178 |
}; |
|
179 |
#define parse_stream_video(_name) \ |
|
180 |
name2enum(_name, stream_video_names, ARRAY_SIZE(stream_video_names)) |
|
181 |
|
|
182 |
#endif /* >= 0.6.0 */ |
|
183 |
|
|
172 | 184 |
static const char *compression_names[] = { |
173 | 185 |
[ SPICE_IMAGE_COMPRESS_OFF ] = "off", |
174 | 186 |
[ SPICE_IMAGE_COMPRESS_AUTO_GLZ ] = "auto_glz", |
... | ... | |
228 | 240 |
char *x509_key_file = NULL, |
229 | 241 |
*x509_cert_file = NULL, |
230 | 242 |
*x509_cacert_file = NULL; |
231 |
int port, tls_port, len, addr_flags; |
|
243 |
int port, tls_port, len, addr_flags, streaming_video;
|
|
232 | 244 |
spice_image_compression_t compression; |
233 | 245 |
spice_wan_compression_t wan_compr; |
234 | 246 |
|
... | ... | |
328 | 340 |
} |
329 | 341 |
spice_server_set_zlib_glz_compression(spice_server, wan_compr); |
330 | 342 |
|
343 |
#if SPICE_SERVER_VERSION >= 0x000600 /* 0.6.0 */ |
|
344 |
|
|
345 |
str = qemu_opt_get(opts, "streaming-video"); |
|
346 |
if (str) { |
|
347 |
streaming_video = parse_stream_video(str); |
|
348 |
spice_server_set_streaming_video(spice_server, streaming_video); |
|
349 |
} |
|
350 |
|
|
351 |
spice_server_set_agent_mouse |
|
352 |
(spice_server, qemu_opt_get_bool(opts, "agent-mouse", 1)); |
|
353 |
spice_server_set_playback_compression |
|
354 |
(spice_server, qemu_opt_get_bool(opts, "playback-compression", 1)); |
|
355 |
|
|
356 |
#endif /* >= 0.6.0 */ |
|
357 |
|
|
331 | 358 |
qemu_opt_foreach(opts, add_channel, NULL, 0); |
332 | 359 |
|
333 | 360 |
spice_server_init(spice_server, &core_interface); |
Also available in: Unified diff