summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-08-20Remove use of INLINEHEADmasterAlon Levy5-20/+18
It's #define'd to 'inline', and only used in the GLZ encoder.
2015-08-20build-sys: Remove spice-protocol submoduleChristophe Fergeau4-1/+6
It's seeing regular releases and is API stable, so we don't need to bundle it with spice-server
2015-08-20mjpeg and jpeg encoder: fix alignment warningsVictor Toso2-12/+14
As the input line could be uint8_t*, uint16_t* or uint32_t*, changing the default from uint8_t* to void* seems the correct choice to deal with upcasting warnings. Regarding chunks->data allocation, I quote Frediano explantion: "Lines came from spice_bitmap_get_line. This function assume that bitmap data is split among chunks each containing some lines (always full lines). If chunk->data is allocated using malloc or similar SHOULD (not 100% sure) be 4 bytes aligned so in our cases (8, 16, 24 or 32 bit images) should be aligned enough. All the casts unfortunately came from the fact we compute based on pixel bytes to make it generic so we use uint8_t*." and "Looking at code looks like these chunks came from the virtual machine. So the question is... why should the virtual machine give use some not-pixel align data? I would put a large comment to state that we assume VM send aligned data, would be stupid for the VM to not align it!" clang output: jpeg_encoder.c:109:26: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint16_t *' (aka 'unsigned short *') increases required alignment from 1 to 2 [-Werror,-Wcast-align] uint16_t *src_line = (uint16_t *)line; ^~~~~~~~~~~~~~~~ jpeg_encoder.c:144:26: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align] uint32_t *src_line = (uint32_t *)line; ^~~~~~~~~~~~~~~~ mjpeg_encoder.c:260:23: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint16_t *' (aka 'unsigned short *') increases required alignment from 1 to 2 [-Werror,-Wcast-align] uint16_t pixel = *(uint16_t *)src; ^~~~~~~~~~~~~~~
2015-08-20glz: WindowImageSegment lines lines_end as void*Victor Toso1-2/+2
Instead of using uint8_t* which can cause several warnings on casting as the example below: ./glz_encode_tmpl.c:321:29: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'rgb16_pixel_t *' (aka 'unsigned short *') increases required alignment from 1 to 2 [-Werror,-Wcast-align] ref_limit = (PIXEL *)(seg->lines_end); ^~~~~~~~~~~~~~~~~~~~~~~~~
2015-08-20migration_protocol: use SPICE_MAGIC_CONSTVictor Toso1-5/+6
spice-protocol has a new define to create the magic constants, let's use that.
2015-08-12red_parse_qxl: Do not compute abs unsigned intVictor Toso1-1/+1
SpiceBitmap's stride is uint32_t. from clang: red_parse_qxl.c:452:41: error: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect bitmap_size = red->u.bitmap.y * abs(red->u.bitmap.stride); ^
2015-08-12server/inputs_channel: Cope with NULL keyboard in release_keys()Alon Levy1-1/+6
This fixes a test_display_no_ssl segfault on client disconnect when the keyboard was never initialized.
2015-08-11red_parse_qxl: remove unused variableVictor Toso1-4/+0
2015-08-11Remove unused struct RedsOutItemJonathon Jongsma1-5/+0
2015-08-11RedChannel: remove unused BufDescriptor structJonathon Jongsma1-5/+0
2015-08-11Remove unused snd_get_playback_compression() methodChristophe Fergeau2-6/+0
2015-08-11Fix typo in comment in char_device.hChristophe Fergeau1-1/+1
2015-08-11Fix typo in commentsJonathon Jongsma1-2/+2
2015-08-11Move RedsMigSpice to main-channel.hJonathon Jongsma2-8/+8
This is the place that needs the complete type definition. If it is defined in reds.h, it can create circular references.
2015-08-11Cleanup: move static function declarations out of headerJonathon Jongsma2-4/+4
It doesn't make much sense to have static function declarations in a header, even a private header. So move them down into the source file.
2015-08-11worker: remove unused preload_group_idMarc-André Lureau1-4/+0
2015-08-11channel: minor simplificationMarc-André Lureau1-6/+1
2015-08-11server: remove unused CursorDataMarc-André Lureau1-9/+0
2015-08-11server: use more const CoreInterfaceMarc-André Lureau2-5/+5
2015-08-11worker: move red_init_*() functionsMarc-André Lureau1-8/+10
There is a red_init() methods, we can group all the red_init_*() calls in it rather than calling red_init() followed by all these calls in our main function.
2015-08-04spice-common: codegen: ptypes.py: keep attribute names in setsUri Lublin1-0/+0
This fixes the build on RHEL-6
2015-07-29Adjust to new SpiceImageCompress nameChristophe Fergeau11-57/+65
This has been renamed to SpiceImageCompression in order to avoid clashes with older spice-server in the SPICE_IMAGE_COMPRESS_ namespace. This commit is a straight rename of SpiceImageCompress to SpiceImageCompression and SPICE_IMAGE_COMPRESS_ to SPICE_IMAGE_COMPRESSION_
2015-07-28Add libraries such as -lm and -lpthread to the tests build line.Jeremy White1-0/+1
This prevents a compile error on Debian Jessie, from git, such as this: /usr/bin/ld: test_playback.o: undefined reference to symbol 'sin@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line This is fairly subtle, and Debian specific. It only happens when you use autoreconf to generate a new libtool script. Debian patches that script to require an explicit setting to link with all dependent libraries. It should be harmless on other distros, and it does save us Debian guys some hassle.
2015-07-20reds: Assure we don't have stale statistic files before trying to create a ↵Frediano Ziglio1-0/+1
new one If a previous Qemu executable is not able to delete the statistic file on the next creation with same name (statitics file are based on pid numbers so if pid get reused for another Qemu process you get the same name) it fails as you can't open a file with 0444 permissions (these are the permission used to create these files). This patch assure there are no stale file trying to remove it before the creation of the new one. As file is based on pid and name used for spice you are not deleting another file. Fixes: rhbz#1177326 Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-07-20server: spice_debug() messages don't need a trailing '\n'.Francois Gouget2-3/+3
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-07-20server: Weakly try to get a better latency value for the bandwidth test.Francois Gouget1-1/+2
NET_TEST_WARMUP_BYTES is 0 so the warmup ping is the same as the one we use to measure the latency. Even if it was not, the actual latency would be the MIN() of both anyway so we might as well use both roundtrip times to ward off latency jitter a bit. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-07-20server: Don't reset the latency before showing it in the invalid net test ↵Francois Gouget1-3/+3
error message. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-07-13Use desired image compression for the first imagePavel Grunt1-7/+7
red_marshall_image() allows to use other than QUIC compression only when auto_lz or auto_glz image compression is set. Other images don't have the problem because they are compressed using red_compress_image()
2015-06-30Handle preferred image compression messagesJavier Celaya1-0/+25
2015-06-30Use image compress constants from spice-protocolJavier Celaya7-23/+15
2015-06-29server: Remove the rate_control_is_active field from MJpegEncoder.Francois Gouget3-12/+16
It is redundant with the corresponding callbacks.
2015-06-29server: Fix an incorrect time calculation.Francois Gouget1-1/+1
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-06-29HAVE_CLOCK_GETTIME is not used so remove it.Francois Gouget1-4/+1
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-06-29Lock the pixmap image cache for the entire fill_bits callSandy Stutsman2-20/+27
Locking the individual calls that access the pixmap cache in fill_bits is not adequately thread safe. Often a windows guest with multiple monitors will be sending the same image via different threads. Both threads can be in fill_bits at the same time making changes to the cache for the same image. This can result in images being deleted before all the client channels are finished with them or with the same image being send multiple times. Here's what can happen with out the lock in fill_bits On the server in red_worker.c:fill_bits Thread 1 calls pixmap_cache_hit for Image A and finds it isn't in cache Thread 2 calls pixmap_cache_hit for Image A and finds it isn't in cache Thread 1 adds Image 1 to pixmap_cache (1x) Thread 2 adds Image 1 to pixmap_cache (2x) On the client Channel 1 adds Image A to image_cache (1x) Channel 2 replaces Image A in image_cache (1x) On server Thread 1 sends Image A rendering commands Thread N removes Image A from pixmap_cache (image remains - 1x) Thread 2 sends Image A rendering commands On client Channe1 renders from Image A Channel N removes Image a from image_cache (image is completely removed) Channel2 render command hangs waiting for Image A
2015-06-26server: allows to set maximum monitorsFrediano Ziglio5-5/+26
spice-server will attempt to limit number of monitors. Guest machine can send monitor list it accepts. Limiting the number sent by guest will limit the number of monitors client will try to enable. The guest usually see client monitors enabled and start using it so not seeing client monitor won't try to enable more monitor. In this case the additional monitor guest can support will always be seen as heads with no attached monitors. This allows limiting monitors number without changing guest drivers. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-26build-sys: Fix build with automake < 1.13Christophe Fergeau1-1/+2
AC_CONFIG_MACRO_DIRS is not available with older automake versions, which causes autogen.sh failures on RHEL6. m4_include() can be used instead.
2015-06-22mjpeg: Convert rate control checks to asserts in encoderFrancois Gouget1-6/+3
The checks would lead the reader to think these functions can be called when bit rate control is off when in fact they are only called when it is active. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-06-22server: Refresh the input fps every 5 second, without a timer.Francois Gouget1-30/+15
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-06-22build-sys: Use spice-common m4 macro for lz4Christophe Fergeau2-11/+1
This will allow to share this detection code with spice-gtk.
2015-06-22build-sys: Use spice-common m4 macro for openglChristophe Fergeau1-29/+4
This factorizes a bit of configure.ac m4 code.
2015-06-22build-sys: Use spice-common m4 macro for smartcardChristophe Fergeau1-18/+6
Besides the code factorization, this will allow smartcard support to be automatically enabled if libcacard is present and --disable-smartcard is not used.
2015-06-17reds: increase listening socket backlogMarc-André Lureau1-1/+1
With a TCP socket, the backlog doesn't seem to matter much, perhaps because of latency or underlying protocol behaviour. However, on UNIX socket, it is fairly easy to reach the backlog limit and the client will get an EAGAIN error (but not ECONNREFUSED as stated in listen(7)) that is not easy to deal with: attempting to reconnect in a loop might busy-loop forever as there are no guarantee the server will accept new connections, so it will be inherently racy. Typically, Spice server can easily have up to 15 concurrent incoming connections that are established during initialization of the session. To improve the situation, raise the backlog limit to the default maximum system value, which is 128 on Linux.
2015-06-16Add password length checkCédric Bosdonnat1-0/+2
Don't allow setting a too long password.
2015-06-16Use spice_malloc instead of mallocFrediano Ziglio1-4/+2
Do not just check and give warning before crashing the program accessing a NULL pointer but use spice_malloc which exits with a proper message. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-15Remove duplicate streaming enumerationJonathon Jongsma4-17/+10
There is already a enumeration in a public header that defines the different streaming options, so there's no need to duplicate that enumeration internally. Just use the public enum values.
2015-06-15Use AS_HELP_STRING for configure optionsJonathon Jongsma1-15/+16
2015-06-11Fix typo in commentFrediano Ziglio1-1/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-11Use MIN macro to compute a minimumFrediano Ziglio1-1/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-06-11LZ4: warn if trying to set lz4 but not supportedJavier Celaya1-0/+8
2015-06-09server: Remove an unused structure.Francois Gouget1-10/+0