Commit Graph

2200 Commits

Author SHA1 Message Date
Marc-André Lureau
8ef5be6cd9 worker: move dcc_pixmap_cache_add
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 10:20:38 +00:00
Marc-André Lureau
036451cce9 worker: move dcc_freeze_glz
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 10:17:36 +00:00
Marc-André Lureau
44b2d00246 worker: few function renames
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-20 09:49:49 +00:00
Marc-André Lureau
30a963d53a worker: add display_channel_free_glz_drawables_to_free()
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 09:49:49 +00:00
Marc-André Lureau
aa8f2a1a95 worker: move dcc_free_glz_drawable_instance
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-20 09:49:49 +00:00
Marc-André Lureau
920f857c2d worker: move display_channel_flush_all_surfaces
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 09:49:49 +00:00
Frediano Ziglio
422d67dde4 worker: move compress to dcc_compress_image()
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-20 09:49:49 +00:00
Frediano Ziglio
5229613d51 worker: move glz_drawable_count to DisplayChannel
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-20 09:49:49 +00:00
Christophe Fergeau
1f41c295d9 manual: Document path to vdagent logs on Windows 2015-11-19 18:57:25 +01:00
Christophe Fergeau
0050ab7a4e manual: Small formatting fixes
The XML namespace to use with libvirt when adding custom QEMU arguments
looks better in a monospace font.
asciidoc will also replace the '->' in '<->' with an arrow character,
which looks bad. This commit reformulates the sentence to avoid the use
of <->
2015-11-19 18:57:25 +01:00
Marc-André Lureau
1cbf6b3ab6 worker: move display_channel_wait_for_migrate_data
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-19 12:43:33 +00:00
Marc-André Lureau
0e224d04fb worker: move dcc_start()
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-19 12:43:33 +00:00
Marc-André Lureau
85920bb2e9 worker: start a DisplayChannelClient unit
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-19 12:43:02 +00:00
Pavel Grunt
806433a3bd Fix spice-common submodule
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-19 12:19:45 +00:00
Marc-André Lureau
501c5ed8ca worker: simplify GlzDrawableInstanceItem fields name
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-19 11:33:42 +00:00
Marc-André Lureau
e8d8ff458b worker: move encoders to dcc-encoders
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-19 10:26:45 +00:00
Marc-André Lureau
d9a488a62f worker: painfully move display_channel_add_drawable
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-18 15:34:01 +00:00
Marc-André Lureau
960e0321b6 worker: add compression parameters to dcc
This allow different dcc to have different settings from default one.
The parameters are copied initially from default settings but then they
can change independently for each client.
Even having a single client a future client is not affected by a
previous setting on the old dcc.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
[updated for the preferred compression]
Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-18 15:32:50 +00:00
Jonathon Jongsma
9b36936a31 Rename red_display_free_* to dcc_free_*
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-18 14:36:14 +00:00
Marc-André Lureau
92d9b782bd worker: simplify RedCompressBuf
Make sure an allocated buffer is correctly referenced by the marshaller,
and can't be free and reused by mistake. Simplify the code by using
GSlice

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-18 14:30:32 +00:00
Marc-André Lureau
3941d03d11 worker: move surfaces to DisplayChannel
Ok. this one was painful.Note that in some cases, DCC_TO_DC should be
made safer (there used to be a if !dcc guard in some places, although
that looks wrong anyway)...

Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-18 14:27:45 +00:00
Jonathon Jongsma
b12b248cae Move stream creation and maintenance functions to stream.[ch]
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-18 14:21:45 +00:00
Marc-André Lureau
8c750746f3 worker: move stream_agent_stop and friends
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-18 14:10:45 +00:00
Pavel Grunt
39e1cbe321 worker: Remove unused red_show_tree
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-18 13:53:39 +00:00
Marc-André Lureau
c66c9e6669 display-channel: Keep macro definition in one line
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-18 13:53:22 +00:00
Frediano Ziglio
3fc8d6ab9a worker: simplify red_marshall_image
Remove some nested blocks using else if.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-18 10:13:20 +00:00
Jonathon Jongsma
ac2a854fbf worker: Move stream functions to stream.c
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-18 08:37:21 +00:00
Jonathon Jongsma
5897952f46 Move some tree item functions to tree.[ch]
Also rename some functions slightly:
     __find_shadow -> tree_item_find_shadow()
     __contained_by -> tree_item_contained_by()
     ring_of -> tree_item_container_items();

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-17 17:22:05 +00:00
Francois Gouget
f6106afa4f build-sys: Use SPICE_WARNING() to issue the architecture warning
Note that spice-deps.m4 now provides the AS_VAR_APPEND() fallback.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-11-16 16:33:58 +01:00
Jonathon Jongsma
a26b4daf98 Move some more drawable functions to display channel
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-16 13:36:08 +00:00
Jonathon Jongsma
1e8b2fe324 worker: Rename current_clear() to current_remove_all()
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-16 12:45:03 +00:00
Jonathon Jongsma
e49072492a Move dcc_push_stream_agent_clip() to display channel
rename to dcc_add_stream_agent_clip()

Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-16 12:44:32 +00:00
Francois Gouget
37763930cd server: Duplicate typedef definitions are not allowed in C99
This fixes some compilation errors with gcc 4.4.7 on RHEL 6.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-16 10:21:32 +00:00
Francois Gouget
bd2bbe2fdd server: Include stdint.h for int64_t
This fixes a compilation error with gcc 4.4 on RHEL 6.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-16 10:21:14 +00:00
Francois Gouget
dc169cea90 server: Remove the display_channel_attach_stream() prototype
It is unused.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-13 17:36:30 +00:00
Francois Gouget
6e12003bde build-sys: Use AC_MSG_NOTICE()
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-13 17:11:04 +00:00
Marc-André Lureau
105fad7e87 worker: don't use weird RedCompressedBuf nbytes shifting
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-13 13:43:35 +00:00
Victor Toso
08230ee171 spicevmc: set state of DeviceInstance to NULL
After spice_char_device_state_destroy is called spicevmc should not keep
reference to that memory. state->chardev_st and sin->st point to the
same SpiceCharDeviceState and both should be set to NULL when it is
destroyed.
2015-11-13 12:01:26 +01:00
Victor Toso
c429574bb6 char-device: set to NULL freed pointers on destroy
As SpiceCharDeviceState is only unref'ed on
spice_char_device_state_destroy the same device could be destroyed more
then once so the pointers that are freed should be set to NULL.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1281455
2015-11-13 12:01:26 +01:00
Pavel Grunt
57fe8ce268 reds: Do not abort due to wrong header
Just prevent the buggy client from connecting.

 #0  0x00007fffe83b2a98 in raise () at /lib64/libc.so.6
 #1  0x00007fffe83b469a in abort () at /lib64/libc.so.6
 #2  0x00007ffff7b1533d in spice_logv (log_domain=0x7ffff7b87226 "Spice", log_level=SPICE_LOG_LEVEL_ERROR, strloc=0x7ffff7b92aba "reds.c:1373", function=0x7ffff7b94f40 <__FUNCTION__.31775> "reds_send_link_ack", format=0x7ffff7b871fe "assertion `%s' failed", args=args@entry=0x7fffffffcb68) at log.c:109
 #3  0x00007ffff7b15468 in spice_log (log_domain=log_domain@entry=0x7ffff7b87226 "Spice", log_level=log_level@entry=SPICE_LOG_LEVEL_ERROR, strloc=strloc@entry=0x7ffff7b92aba "reds.c:1373", function=function@entry=0x7ffff7b94f40 <__FUNCTION__.31775> "reds_send_link_ack", format=format@entry=0x7ffff7b871fe "assertion `%s' failed") at log.c:123
 #4  0x00007ffff7aee335 in reds_handle_read_link_done (link=0x555556b27c70)
     at reds.c:1373
 #5  0x00007ffff7aee335 in reds_handle_read_link_done (opaque=0x555556b27c70)
     at reds.c:2139
 #6  0x000055555588acc6 in qemu_iohandler_poll ()
 #7  0x000055555588a8e1 in main_loop_wait ()
 #8  0x0000555555614064 in main ()

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1281442

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-13 09:15:02 +00:00
Victor Toso
a263c651e1 char-device: free all memory pool when no clients
When no client is connect we should not need to keep the memory pool
used by char-device. In most situations this is not significant but
when using webdav this could mean freeing MAX_POOL_SIZE bytes

Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350
2015-11-13 08:15:38 +01:00
Victor Toso
2832fdf25a char-device: Define a memory pool limit
Otherwise the amount of unused memory could grow while transfering big
chunks of data. This change only means that once the memory was used it
will not be stored again after the limit was reached.

Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350
2015-11-13 08:15:38 +01:00
Victor Toso
d7bee1bc56 char-device: fix usage of free/unref on WriteBuffer
There are places were the could should definetly free the
SpiceCharDeviceWriteBuffer and places that it should only unref it. The
current use of spice_char_device_write_buffer_free was missleading.

This patch creates the spice_char_device_write_buffer_unref and properly
call these two functions.

Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350
2015-11-13 08:14:31 +01:00
Frediano Ziglio
1ab8df03ce worker: fix compiling with COMPRESS_STAT enabled
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-12 13:25:09 +00:00
Pavel Grunt
f4810b0065 worker: Remove usage of streaming_video global in DisplayChannel
Avoid creating streams for every image due to not properly initialized
DisplayChannel->stream_video field.

Regression since: 4987df8e67

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-12 12:32:27 +00:00
Marc-André Lureau
120c9ae38b worker: move some tree container functions
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-12 12:26:47 +00:00
Marc-André Lureau
cc8107c830 worker: rename a bit current_add functions
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-12 12:09:34 +00:00
Jonathon Jongsma
6380c43258 worker: Remove duplicate DISPLAY_CLIENT_TIMEOUT define
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-11 15:48:56 +00:00
Marc-André Lureau
7b1d03508d worker: move RED_WORKER_STAT, make it compile again
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-11 15:42:10 +00:00
Jonathon Jongsma
892feff458 worker: Move drawable utility functions to display channel
Functions that check the equality of a path, brush, etc are moved the
display channel source file to prepare for moving the surfaces to the
display channel.

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-11 12:01:29 +00:00