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
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
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
Jonathon Jongsma
0e7617e51f
worker: Move is_opaque_item() to tree.h
...
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-11 11:59:58 +00:00
Marc-André Lureau
a7fc621750
worker: move drawable to display
...
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-11 09:53:40 +00:00
Marc-André Lureau
7b3f277a72
worker: move current to display
...
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:48 +00:00
Marc-André Lureau
4a1668a755
worker: move red_destroy_surface_item()
...
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:48 +00:00
Marc-André Lureau
4987df8e67
worker: move stream to display channel
...
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:39 +00:00
Marc-André Lureau
5a216d2eb1
worker: move DisplayChannel/DisplayChannelClient functions together
...
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-10 17:18:45 +00:00
Marc-André Lureau
921ec344bc
worker: rename functions that handle DisplayChannelClient
...
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>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 16:10:07 +00:00
Marc-André Lureau
885557f117
worker: move stream functions to a new stream.c file
...
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>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 16:09:28 +00:00
Marc-André Lureau
1e4abdc15d
worker: move stream definitions to a new stream.h file
...
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-10 16:06:08 +00:00
Marc-André Lureau
ab2e8a9cc0
worker: fix RED_STREAM_TIMOUT macro spelling
...
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 15:43:22 +00:00
Frediano Ziglio
1763e7ebf2
remove server/stream.h file added by mistake in previous commit
...
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-10 15:42:08 +00:00
Marc-André Lureau
face40e19e
worker: move image cache to display
...
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-10 10:02:08 +00:00
Marc-André Lureau
1b9d767ca7
worker s/surfaces_dest/surface_deps
...
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 09:35:42 +00:00
Pavel Grunt
0426524546
syntax-check: Add missing #include <config.h>
2015-11-09 19:41:28 +01:00
Pavel Grunt
1eb94c0fb0
red_dispatcher: Remove unused signal.h include
2015-11-09 19:41:22 +01:00
Marc-André Lureau
9c57505849
worker: group add_memslot
...
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-09 17:03:34 +00:00