Revision 84a23f25

b/qemu-config.c
415 415
        },{
416 416
            .name = "zlib-glz-wan-compression",
417 417
            .type = QEMU_OPT_STRING,
418
        },{
419
            .name = "streaming-video",
420
            .type = QEMU_OPT_STRING,
421
        },{
422
            .name = "agent-mouse",
423
            .type = QEMU_OPT_BOOL,
424
        },{
425
            .name = "playback-compression",
426
            .type = QEMU_OPT_BOOL,
418 427
        },
419 428
        { /* end if list */ }
420 429
    },
b/qemu-options.hx
728 728
Configure wan image compression (lossy for slow links).
729 729
Default is auto.
730 730

  
731
@item streaming-video=[off|all|filter]
732
Configure video stream detection.  Default is filter.
733

  
734
@item agent-mouse=[on|off]
735
Enable/disable passing mouse events via vdagent.  Default is on.
736

  
737
@item playback-compression=[on|off]
738
Enable/disable audio stream compression (using celt 0.5.1).  Default is on.
739

  
731 740
@end table
732 741
ETEXI
733 742

  
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