summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "server/red_worker: fix possible leak of self_bitmap"Alon Levy2012-05-151-7/+5
| | | | | | | This reverts commit 35dbf3ccc4b852f9dbb29eb8a53c94f26d2e3a6e. accidentally pushed v1 of patches, reverting in preperation of pushing v2.
* server/red_worker: fix possible leak of self_bitmapAlon Levy2012-05-141-5/+7
| | | | | | | | | | | | | | | After the previous patch moving self_bitmap freeing inside red_drawable ref count, we have a possible self_bitmap leak: red_process_commands red_get_drawable | red_drawable #1, red_drawable->self_bitmap == 1 red_process_drawable | rd #2, d #1, d->self_bitmap != NULL release_drawable | rd #1, d# = 0, try to release self_bitmap, but blocked by rd #1 put_red_drawable | rd #0 This patch moves the call to release_drawable after the call to put_red_drawable, thereby fixing the above situation.
* server/red_worker/red_process_commands: rename drawable to red_drawable ↵Alon Levy2012-05-141-4/+4
| | | | (later add a local drawable)
* server/red_worker: red_process_drawable: have single point of exitAlon Levy2012-05-141-8/+5
|
* server/red_worker: don't release self_bitmap unless refcount is 0Yonit Halperin2012-05-141-4/+3
| | | | RHBZ: 808936
* server/mjpeg_encoder: fix wrong size assigned to dest_lenYonit Halperin2012-05-101-1/+1
| | | | | It should have been the allocated size and not the occupied one. This led to a lot of unnecessary allocations and deallocations.
* server/mjpeg_encoder: Fix memory leak for the inital output buffer given for ↵Yonit Halperin2012-05-102-8/+8
| | | | each frame
* server/reds: add "usbredir" to recognized channel namesAlon Levy2012-05-071-0/+1
| | | | | | RHBZ: 819484 Signed-off-by: Alon Levy <alevy@redhat.com>
* cleanup x11 library detection for building clientNahum Shalman2012-05-041-12/+9
| | | | | | | | | | Consolidate two separate chunks of library hunting that depend on the same check. Check if we're actually building the client before looking for client only libraries. Hide some of the final output if we're not building the client.
* server/tests/test_display_streaming: include tests for clip and sized framesYonit Halperin2012-05-031-16/+181
| | | | CC: Alon Levy <alevy@redhat.com>
* server/tests: use the correct dimensions in SIMPLE_UPDATEYonit Halperin2012-05-031-2/+2
|
* server/tests: add SLEEP command to test_display_baseYonit Halperin2012-05-032-0/+10
|
* server/tests: add clip to SIMPLE_DRAW_BITMAPYonit Halperin2012-05-032-6/+30
|
* server/tests/test_display_streaming: update to create sized framesAlon Levy2012-05-031-7/+37
|
* server/tests: add SIMPLE_DRAW_SOLID and SIMPLE_DRAW_BITMAPAlon Levy2012-05-032-6/+39
|
* server/tests: refactor CommandAlon Levy2012-05-033-16/+37
|
* server/tests: add test_get_width/test_get_heightAlon Levy2012-05-032-0/+19
|
* server/tests: refactor test_display_baseAlon Levy2012-05-031-34/+45
|
* server/red_worker/video: don't override the clip in areas that belong only ↵Yonit Halperin2012-05-031-30/+12
| | | | to sized frames
* server/red_worker.c/video: add support for frames of different sizesYonit Halperin2012-05-033-61/+166
| | | | | | | | | | | | rhbz #813826 When playing a youtube video on Windows guest, the driver sometimes(**) sends images which contain the video frames, but also other parts of the screen (e.g., the youtube process bar). In order to prevent glitches, we send these images as part of the stream, using SPICE_MSG_DISPLAY_STREAM_DATA_SIZED. (**) It happens regularly with the you tube html5 player. With flash, it occurs when moving the cursor in the player area.
* Update the spice-common submoduleYonit Halperin2012-05-033-4/+6
| | | | | | | | | spice-common changes: STREAM_DATA_SIZED message was added in order to support video streams with frames that their size is different from the initial size that the stream was created with. This patch also includes server and client adjustments to the new SpiceMsgDisplayStreamData.
* server/red_worker/video: don't detach a drawable from a stream due to it ↵Yonit Halperin2012-05-031-8/+8
| | | | | | | | | | | being rendered. The previous patch took care that streams will be upgraded by a surface screenshot and not the last frame, if necessary. Thus, there is no more a reason for detaching drawables from streams when they are rendered. Moreover, detaching such drawables can cause glitches, in case they are still in the pipe, and red_update_area is called frequently and leads to stream frames rendering.
* server/red_worker/video: upgrade stream by a screenshot instead of the last ↵Yonit Halperin2012-05-031-21/+71
| | | | | | | | frame, if needed Upgrading a stream: When the stream's visible region is bigger than the one of the last frame, we will send an updated screenshot of the visible region, instead of sending the last frame losslessly.
* server/red_worker/video: maintain visible region and clip region for streamsYonit Halperin2012-05-031-12/+27
| | | | | | | | | | | | | | | | | | | | | Differentiate between the clipping of the video stream, and the region that currently displays fragments of the video stream (henceforth, vis_region). The latter equals or contains the former one. For example, let c1 be the clip area at time t1, and c2 be the clip area at time t2, where t1 < t2. If c1 contains c2, and at least part of c1/c2, hasn't been covered by a non-video images, vis_region will contain c2, and also the part of c1/c2 that still displays fragments of the video. When we consider if a stream should be "upgraded" (1), due to its area being used by a rendering operation, or due to stopping the video, we should take into account the vis_region, and not the clip region (next patch: not upgrade by the last frame, but rather by vis_region). This fix will be more necessary when sized frames are introduced (see the following patches). Then, the vis_region might be larger than the last frame, and contain it, more frequently than before. (1) "upgrading a stream" stands for sending its last frame losslessly. Or more precisely, lossless resending of all the currently displayed lossy areas, that were sent as part of the stream.
* server/red_worker: add get_stream_idYonit Halperin2012-05-031-11/+16
|
* Update the spice-common submoduleYonit Halperin2012-05-031-0/+0
| | | | We need some rect/region getters methods that were added
* Force 64 bit multiplication on 32 bit systems; fixes a bug where the server ↵Jeremy White2012-04-271-1/+1
| | | | times out the display channel freakily fast.
* Ensure __STDC_FORMAT_MACROS is always defined firstDaniel P. Berrange2012-04-262-1/+2
| | | | | | | | | | | The client/common.h file defines __STDC_FORMAT_MACROS before including inttypes.h so that the PRI* macros get defined in C++. This is ignoring the possibility that other global includes may have already pulled in inttypes.h We need __STDC_FORMAT_MACROS to be defined before any header files are included. Putting it in config.h satisfies this, since config.h is always the first header
* Disable -Waggregate-return if building with SLIRPDaniel P. Berrange2012-04-261-1/+4
| | | | | | | The API design of SLIRP means that it is not practical to use the -Waggregate-return warning flag. Disable this flag in the (unlikely) scenario where SLIRP is actually requested at build time
* bump spice-common with SpiceClips fixAlon Levy2012-04-261-0/+0
|
* Add some more 'noreturn' annotationsDaniel P. Berrange2012-04-256-9/+9
| | | | | | | | Methods which longjump, unconditionally raise an exception, or call _exit() cannot return control to the caller so should be annotated with 'noreturn' Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Fix typo in is_equal_brushDaniel P. Berrange2012-04-251-1/+1
| | | | | | | The 3 part of the conditional in the is_equal_brush method compared the b1->u.color field to itself, instead of b2->u.color Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Fix printf format specifiers for i686 hostsDaniel P. Berrange2012-04-253-5/+5
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Add missing struct field initializersDaniel P. Berrange2012-04-251-5/+5
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Ensure config.h is the first include in the fileDaniel P. Berrange2012-04-251-1/+1
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Add a few more syntax-check exemptionsDaniel P. Berrange2012-04-251-2/+4
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Add recent new committers to AUTHORS file / mailmapDaniel P. Berrange2012-04-252-0/+7
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Enable many more compiler warningsDaniel P. Berrange2012-04-255-77/+385
| | | | | | | | | | | * m4/manywarnings.m4m, m4/warnings.m4: Import GNULIB warnings modules * m4/spice-compile-warnings.m4: Define SPICE_COMPILE_WARNINGS * configure.ac: Replace compile warning check with a call to SPICE_COMPILE_WARNINGS * client/Makefile.am: Use WARN_CXXFLAGS instead of WARN_CFLAGS Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Make some int->pointer casts explicitDaniel P. Berrange2012-04-251-2/+2
| | | | | | | | | Tell the compiler that was really do intend to cast from int to pointer, to prevent warnings about implicit casts * server/tests/test_display_base.c: Add explicit casts Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Fix broken -I../common to be -I../spice-common in clientDaniel P. Berrange2012-04-251-1/+1
| | | | | | * Makefile.am: s/common/spice-common/ Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* VSCMsgHeader.reader_id is unsigned, so don't check for >= 0Daniel P. Berrange2012-04-251-2/+1
| | | | | | | * server/smartcard.c: Fix assertion to not check for >= 0 on unsigned variable Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Avoid jumping across variables declarations with initializersDaniel P. Berrange2012-04-251-1/+2
| | | | | | | | | | If a 'goto' statement jumps across a variable declaration which also has an initializer, the variable is in an undefined state. Splitting the the declaration & initialization doesn't change that, but the compiler can at least now detect use of the unintialized variable Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Convert cases of () to (void)Daniel P. Berrange2012-04-252-5/+5
| | | | | | * server/reds.c, server/smartcard.c: s/()/(void) Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Remove 2 *MB* stack frame in red_worker_mainDaniel P. Berrange2012-04-251-25/+25
| | | | | | | | | | The red_worker_main method allocates a RedWorker struct instance on the stack. This struct is a full 2 MB in size which is not at all resonable to allocate on the stack. * server/red_worker.c: Move RedWorker struct to the heap Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Mark some variables as volatileDaniel P. Berrange2012-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | When using setjmp/longjmp the state of local variables can be undefined in certain scenarios: [quote man(longjmp)] The values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria: · they are local to the function that made the correspond‐ ing setjmp(3) call; · their values are changed between the calls to setjmp(3) and longjmp(); and · they are not declared as volatile. [/quote] * server/red_worker.c: Mark some vars as volatile Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Mark functions which never return controlDaniel P. Berrange2012-04-252-4/+3
| | | | | | | | * client/red_channel.cpp: AbortTrigger::on_event can't return given its current impl * server/red_worker.c: red_worker_main can't return Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Fix multiple printf format problemsDaniel P. Berrange2012-04-259-18/+16
| | | | | | | | | | | | | | | | All printf var-args style methods should be annotation with their format. All format strings must be const strings. * client/application.cpp, client/cmd_line_parser.cpp, client/hot_keys.cpp: Avoid non-const format * client/client_net_socket.cpp: Fix broken format specifier * client/red_peer.cpp: Fix missing format specifier * client/platform.h: Add SPICE_GNUC_PRINTF annotation to term_printf * client/utils.h: Add SPICE_GNUC_PRINTF annotation to string_printf * server/glz_encoder_config.h, server/red_worker.c: Add SPICE_GNUC_PRINTF annotation to warning callbacks Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Fix const-ness violationsDaniel P. Berrange2012-04-252-3/+3
| | | | | | | * server/red_worker.c: Add missing const for return type * server/reds.c: Static strings must be declared const Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Don't do arithmetic on void * type, use uint8_t insteadDaniel P. Berrange2012-04-251-6/+6
| | | | | | | | Arithmetic on void * types is non-portable & trivially avoided * server/dispatcher.c: Use uint8_t for arithmetic Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* spice-common: update submodule to verify_subject MSVC++ fixAlon Levy2012-04-181-0/+0
|