Commit Graph

1325 Commits

Author SHA1 Message Date
Francois Gouget
f2c8609985 server: Hide the MJPEG encoder internals from red_worker.c
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 15:35:47 +01:00
Francois Gouget
3708bf9cf0 server: Move the MJPEG encoder functions to mjpeg_encoder.c
Note that this requires some adjustments to the encode_frame()
parameters to avoid red_worker-specific types.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 15:35:47 +01:00
Francois Gouget
fd451860df server: Move mjpeg_encoder_new() to the end of mjpeg_encoder.c
This also allows getting rid of a couple of forward definitions.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 15:35:47 +01:00
Francois Gouget
c93d9fc1a2 server: Remove an unnecessary cast in encode_frame()
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 11:17:29 +00:00
Marc-André Lureau
7b39f818b8 Remove a couple single-use static functions
red_cursor_marshall_inval(), red_migrate_cursor() and
on_new_cursor_channel() were short functions that were each only called
from a single location, so there's no need for them to be separate
functions.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:48:00 +00:00
Marc-André Lureau
30c9ff7a8f CursorChannel* arg in cursor_channel_client_new()
Instead of passing a CommonChannel* argument, use CursorChannel* since
this function is only valid for CursorChannels.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:56 +00:00
Marc-André Lureau
591f39e7cc common_channel_client_create -> common_channel_new_client
Rename and re-order the initial arguments to make this function look and
act more like a method of the CommonChannel class.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:53 +00:00
Marc-André Lureau
8f5a5582c0 Change red_marshall_verb() to accept a VerbItem
Instead of passing a verb enumeration value, pass the verb pipe item

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:50 +00:00
Marc-André Lureau
26005ddb04 Remove unused parameter from cursor_channel_new()
cursor_channel_new() is only called from one location, and always passes
FALSE as the value for the 'migrate' paramater. In addition, this
parameter is not used within the function. Remove it.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:45 +00:00
Frediano Ziglio
46d9c51f73 server: remove undefined declaration
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 20:06:07 +00:00
Marc-André Lureau
39b7e55ec7 Replace now() with get_mononotonic_time()
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 18:22:19 +00:00
Marc-André Lureau
93414b23fa utils: add red_get_monotonic_time() 2015-10-29 17:59:02 +00:00
Frediano Ziglio
1b2c3e4067 worker: avoid to use constant directly for capabilities size
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-29 17:46:27 +00:00
Marc-André Lureau
3c1ab4a5fa Move red_bitmap_utils.h->tmpl.c
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 11:27:09 +00:00
Marc-André Lureau
070e0fcd63 worker: move some cursor code to cursor-channel.c
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-10-29 09:58:25 +00:00
Marc-André Lureau
266d344b7f worker: rename some cursor functions
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-10-29 09:44:29 +00:00
Marc-André Lureau
5872d0a09c worker: change CursorItem memory allocation
Do not use static allocate space but handle dynamically

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 09:35:28 +00:00
Marc-André Lureau
788c9d4790 worker: remove unused type field from AddBufInfo
value was always BUF_TYPE_RAW

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <ulublin@redhat.com>
2015-10-28 15:31:48 +00:00
Frediano Ziglio
0b386603cb worker: fix timer queue creation
Timer queue is attached to current thread when created so it must be
created from the proper thread.
After worker initialization is moved in a following patch to main
thread the queue was created in the wrong thread causing program to
fail saying that the queue is NULL.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <ulublin@redhat.com>
2015-10-28 15:28:29 +00:00
Marc-André Lureau
f55032ecba server: group worker channel related stuff
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-26 09:17:07 +00:00
Marc-André Lureau
f7b48981e3 worker: remove need for WorkerInitData
Move code around to declare and place it where it fits better.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-26 09:12:55 +00:00
Marc-André Lureau
579d65454c worker: access dispatcher pending field using helper functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-26 08:47:02 +00:00
Marc-André Lureau
e87b09a510 server: split cache-item.h
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 16:32:57 +01:00
Marc-André Lureau
f99fac0f42 server: start separate display/cursor channel headers
Just move some declarations around

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 16:32:47 +01:00
Marc-André Lureau
b9defad7d9 server: remove worker->id
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 14:46:22 +01:00
Christophe Fergeau
d88b1fee74 build-sys: Adjust to new spice-common spice-deps.m4
This commit also updates the spice-common submodule

Christophe Fergeau (7):
      Add marshaller test case
      build-sys: Use ${PKG_CONFIG} rather than pkg-config
      build-sys: Rework SPICE_CHECK_* m4 macros
      build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2
      build-sys: Fix error in SPICE_CHECK_LZ4 description
      build-sys: Set automake conditional in SPICE_CHECK_SMARTCARD
      build-sys: Rename SUPPORT_GL to HAVE_GL

Javier Celaya (1):
      Fix linearization of several marshallers with one item

Lukas Venhoda (3):
      ssl-verify: Only check addr length when using IP addr
      m4: Require glib version >= 2.22
      ssl-verify: Changed IPv4 hostname to IPv6
2015-10-23 14:35:14 +02:00
Frediano Ziglio
90a08ebae8 remove small leak in MJPEG code
cinfo.dest is allocated in spice_jpeg_mem_dest but never freed.
Note that jpeg_destroy_compress does not free this field as is
supposed to be a buffer provided by jpeg caller.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 12:10:23 +01:00
Frediano Ziglio
a2ebe610c1 reduce locking time in async_command_alloc
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 12:08:38 +01:00
Frediano Ziglio
78c8203f16 removed unused recv_core field
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 12:08:09 +01:00
Marc-André Lureau
d3153f8610 worker: remove useless MESSAGE_READY
Now that worker is created before running, and run() returns success,
there is no point in using MESSAGE_READY.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 11:11:18 +01:00
Marc-André Lureau
ef89187eff dispatcher: style update
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 11:02:22 +01:00
Marc-André Lureau
bba1bf180a server: remove worker thread creation from dispatcher
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-22 17:06:44 +01:00
Marc-André Lureau
15da68dbde server/dispatcher: move worker enums to dispatcher header
Group enums with their respective struct location.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-10-22 10:05:22 +01:00
Marc-André Lureau
31292412c9 worker: use a single clockid
The stat functions in worker are not generic enough to deserve to be
"non-worker", so just pass the worker instance.
2015-10-21 14:12:30 +01:00
Marc-André Lureau
0facd6fc9e server: rename red_client_cache.h to cache_item.tmpl.c
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-20 14:00:25 +01:00
Christophe Fergeau
e5e3e9eefe Add missing license headers 2015-10-19 14:25:36 +02:00
Christophe Fergeau
c61a37603a syntax-check: Remove unused #include <strings.h> 2015-10-19 14:25:36 +02:00
Christophe Fergeau
c0b2b1fc49 syntax-check: Add missing #include <config.h> 2015-10-19 14:25:36 +02:00
Christophe Fergeau
31eb8eeecb syntax-check: Don't use tabs for indentation 2015-10-19 14:25:36 +02:00
Marc-André Lureau
314dfefca3 worker: use GOnce to surround some global init in dispatcher
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-19 13:11:13 +01:00
Marc-André Lureau
b15527e063 server: move some pixmap cache code in own file
Remove that hideous template header that should really be regular code
since it's specialized and instanciated only for pixmap.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-19 13:08:21 +01:00
snir sheriber
c749853d08 fix spelling mistakes in comments (reseting to resetting & dummym to dummy)
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-19 12:59:12 +01:00
Jeremy White
df0eab862c Update the .gitignore files for the new manual,
for a few newly generated tests, and for the spice-server.h.
2015-10-16 15:48:23 -05:00
Marc-André Lureau
1d7b3ad93b Remove DRAW_ALL
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-16 14:11:01 +01:00
Marc-André Lureau
f93bf94c5c Remove PIPE_DEBUG
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-15 18:30:45 +01:00
Marc-André Lureau
dc1e589916 Remove ACYCLIC_SURFACE_DEBUG
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-15 18:30:41 +01:00
Marc-André Lureau
3dffeb25ed Remove unfinished UPDATE_AREA_BY_TREE
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-15 18:30:38 +01:00
Marc-André Lureau
c1d5181396 server: small move to red_channel
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-15 18:30:34 +01:00
Marc-André Lureau
c61404f102 worker: replace init with red_worker_new
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-15 18:30:30 +01:00
Marc-André Lureau
31a66ae6e7 red_worker: replace some abort()
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-15 18:29:47 +01:00