Commit Graph

1481 Commits

Author SHA1 Message Date
Marc-André Lureau
180b9f27df worker: use spice_return_if_fail() instead of spice_assert() in release_item
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-26 13:25:42 +00:00
Marc-André Lureau
7ae663ad69 worker: changed some spice_assert in display_channel_draw_till
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-26 13:17:38 +00:00
Marc-André Lureau
7d38c28a0a display: Remove extra parameters from create_canvas_for_surface
Get them from the surface

Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-25 14:14:50 +00:00
Marc-André Lureau
4e35645fb0 worker: move display_channel_create_surface
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-25 14:14:50 +00:00
Marc-André Lureau
fd9c97a833 worker: move display_channel_update
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-25 14:14:50 +00:00
Marc-André Lureau
0ebb539f48 worker: move destroy_surface() familly
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-25 14:14:50 +00:00
Marc-André Lureau
9c828e8553 worker: move display_channel_new
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-25 14:14:36 +00:00
Marc-André Lureau
00526f0733 display: factor out current_find_intersects_rect
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-25 14:54:32 +01:00
Marc-André Lureau
3d0f4e3642 display: factor out draw_until
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-25 14:54:13 +01:00
Marc-André Lureau
b61bd286bc worker: move display_channel_draw
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-25 11:51:18 +00:00
Marc-André Lureau
30e0aabace worker: simplify surface_update_dest()
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-25 11:51:18 +00:00
Francois Gouget
9e5363d483 server: Remove MJPEG's video callback assert
A NULL get_roundtrip_ms() callback simply disables rate control so
that mjpeg_encoder_get_source_fps() will not be called.
Should it be called despite this, simply return the highest allowed
framerate (get_source_fps()'s value is only an estimate anyway).
Finally update_client_playback_delay() is always checked before use.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-11-25 09:51:23 +01:00
Francois Gouget
751576b173 server: Encapsulate the get_source_fps() video encoder callback
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-11-25 09:51:23 +01:00
Frediano Ziglio
790707b9ee worker: simplify handle_dev_oom
Do not check if worker->display_channel is NULL as we are already using
to get some field so must be not NULL.
Reuse display_red_channel variable.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2015-11-24 17:30:45 +00:00
Frediano Ziglio
ca41ff2be0 dcc: remove possible dandling pointers
Set pointers to NULL after releasing encoders.
This to make sure no further access will occurs.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-24 17:00:18 +00:00
Marc-André Lureau
fcb57e686a worker: Change validate_area to surface_update_dest
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-24 15:05:52 +00:00
Marc-André Lureau
58e14915d8 worker: rename red_connect_cursor and tidy up a bit
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>
2015-11-24 13:21:39 +00:00
Frediano Ziglio
2efb507adb worker: fix constant
Use mnemonic instead of constant to return enumeration value

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-24 09:04:47 +00:00
Marc-André Lureau
4e8f24e351 worker: move drawable_draw
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-24 09:04:16 +00:00
Marc-André Lureau
56e0ef7c33 worker: remove display_channel prefix from channel callbacks
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-24 09:03:55 +00:00
Marc-André Lureau
742e3666ab worker: move dcc_release_item
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-24 09:03:39 +00:00
Marc-André Lureau
956600cbc5 worker: simplify handle_migrate_data functions
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-24 09:03:18 +00:00
Marc-André Lureau
5bd0fd9fe4 worker: move dcc_handle_migrate_data
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-11-24 09:03:07 +00:00
Marc-André Lureau
acba59bb9b worker: move attach_stream
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-24 08:57:01 +00:00
Marc-André Lureau
6df1558523 worker: move dcc_add_drawable*
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-24 08:56:33 +00:00
Marc-André Lureau
1549f751b8 worker: move dcc_handle_message
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-24 08:55:59 +00:00
Marc-André Lureau
1b6881c83b worker: do not set worker image compression on client request
Display client can ask to change the preferred compression.
Previously this setting change the entire worker setting
so every future client created would have this setting.
Remove the setting in the worker make the change only to the
current client.

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-24 08:55:16 +00:00
Marc-André Lureau
81da00bf09 worker: rename update_area
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-11-23 14:38:11 +00:00
Marc-André Lureau
4acf97cae1 worker: move display_channel_free_some
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-11-23 14:21:09 +00:00
Marc-André Lureau
b9ea3c9145 worker: replace some precondition checks
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-11-23 14:03:57 +00:00
Marc-André Lureau
e624a6169b worker: generalize surface_dirty_region_to_rects
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-11-23 14:01:48 +00:00
Marc-André Lureau
029b4beb73 worker: move dcc_add_surface_area_image
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-23 13:50:44 +00:00
Pavel Grunt
cfa022c656 main channel: Remove unused main_channel_client_get_link_id
It was introduced in 9cece23ba3
but never used.

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:52:04 +00:00
Pavel Grunt
e20b44bf51 main channel: Remove unused main_channel_push_notify
It is not needed since 8d44aa0328

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:51:05 +00:00
Pavel Grunt
70971e9923 red channel: Remove unused red_channel_apply_clients_data
It was introduced in 7e8e13593e
but never used.

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:50:13 +00:00
Pavel Grunt
96049b7c3a red channel: Remove unused declaration of red_channel_pipes_remove
It was introduced in 09ae4700d2
but never used.

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:49:07 +00:00
Pavel Grunt
380b9f6aff red channel: Remove unused red_channel_push_set_ack
It is not needed since 8e7b22b786

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:48:14 +00:00
Pavel Grunt
2d79b39d96 red dispatcher: Remove unused declaration of red_dispatcher_set_mm_time
It is not used since c541d7e29d

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:46:22 +00:00
Pavel Grunt
fd1eff352d dispatcher: Remove unused dispatcher_read_message
It is not needed since d3153f8610

Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-23 11:45:20 +00:00
Frediano Ziglio
6bc1aa90c6 worker: move red_drawable_count to DisplayChannel
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-23 11:29:03 +00:00
Frediano Ziglio
454e521b17 reuse red_get_monotonic_time function
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-23 11:07:33 +00:00
Marc-André Lureau
c5c176a5c7 server: remove OpenGL
This is really not supported, requires X11, so better to remove it for
now. Some day it might be revived, using DRM, ..

Note for later, this could be removed too (not used by client):
- spice-common/common/ogl_ctx

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-21 13:50:46 +00:00
Marc-André Lureau
1f27043b82 stream: remove red_stream_ prefix from mjpeg callbacks
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-21 13:41:35 +00:00
Marc-André Lureau
f5c109573f stream: rename {red_stream_, }get_initial_bit_rate
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-21 13:41:32 +00:00
Marc-André Lureau
d78b44ec26 stream: remove dcc parameter from stream_agent_stop()
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-21 13:41:12 +00:00
Marc-André Lureau
75ab0c6817 worker: move more free_glz_drawable
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-20 14:35:20 +00:00
Pavel Grunt
25203e9a6e worker: Free encoders when client disconnects
Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-20 14:30:55 +01:00
Pavel Grunt
2c2e26579f dcc: Fix unused display_channel variable
Avoid problem when compiling with lz4 and without COMPRESS_STAT

dcc.c: In function 'dcc_compress_image_lz4':
dcc.c:657:21: error: unused variable 'display_channel' [-Werror=unused-variable]
     DisplayChannel *display_channel = DCC_TO_DC(dcc);

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-20 11:26:12 +00:00
Marc-André Lureau
ff070be68f worker: move stream_clip_item_unref()
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 10:22:00 +00:00
Marc-André Lureau
f06ce6c1c4 worker: merge red_draw_qxl_drawable in drawable_draw
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 10:20:52 +00:00