Commit Graph

185 Commits (fc2899af7a3b402d5c689b0cc8527f965875b9e0)

Author SHA1 Message Date
Christian Beier fc2899af7a
CMake: set LIBVNCSERVER_HAVE_FORK in rfbconfig.h if fork() found 8 years ago
Christian Beier 2197b415f2
CMake: set LIBVNCSERVER_HAVE_LIBSSL in rfbconfig.h if OpenSSL found 8 years ago
Christian Beier 6d4bb07ea6
CMake: detect mmap() and write result to rfbconfig.h 8 years ago
Christian Beier 80ad74f761
Fix building for Android and add build instructions to README 8 years ago
Christian Beier e03b5750f8
Merge branch 'circle' of https://github.com/ldmnyblzs/libvncserver into ldmnyblzs-circle
Conflicts:
	libvncclient/rfbproto.c
8 years ago
Christian Beier b551e7017b rfbproto: re-add erroneously removed SOCKET definition 8 years ago
Christian Beier 7edd53ec27 rfbproto: remove SOCKET redefinitions 8 years ago
Christian Beier dbf5f9d514 Fix "rfbBool's size is not 1" runtime error with MSVC 8 years ago
Christian Beier 502e97df1a
CMake: that file ain't used no more 8 years ago
Christian Beier 7368417239 Various #ifdef fixes to allow building with MSVC2014 8 years ago
Christian Beier cd5b38d742 CMake: add a HAVE_SYS_UIO_H flag to rfbconfig.h 8 years ago
Christian Beier dede3aea22 Fix LibVNCClient compilation with MSVC 2014 8 years ago
Balazs Ludmany a01a18df1d Add function pointers for every type of rectangle 9 years ago
Christian Beier c4721ae493 Fix rfbClientSwap64IfLE broken in fe7df89fb1 9 years ago
Christian Beier 6f4f31fe93 Merge pull request #84 from plettix/master
fix for issue 81
9 years ago
Christian Beier cada820645 Only include endian.h if present on system. 9 years ago
Christian Beier ddabcb67a6 Merge pull request #105 from cgeorges82/master
fix for issue #97. Also, this fixes cmake builds for other platforms.
9 years ago
Christian Beier 785f0fa2d1 Merge pull request #103 from rdieter/master
use namespaced vnc_max macro (issue #102)
9 years ago
Christian Beier fc3dfdd9c5 Merge pull request #118 from gbdj/threadsafe-100-squash
libvncclient/tls_gnutls.c: Add hooks to WriteToTLS() for optional protection by mutex. (Squashed)
9 years ago
gbdj 1da7872784 libvncclient/tls_gnutls.c: Add hooks to WriteToTLS() for optional protection by mutex. Fix upstream issue #100
Squashed commit of the pull request #101 :
commit 1c7e01e81862bc46508e675e83c74cc6d63224b0
commit 1e749b094d6696380d3f0540a00138d7e3427874
9 years ago
Rex Dieter 53cc1fa18a use namespaced rfbMax macro (issue #102)
Not using generic 'max', avoids conflicts with stl_algobase.h
9 years ago
zbierak b6cb19982f Increase MAX_ENCODINGS value to accommodate more client encodings
Resolves #112
9 years ago
Cédric Georges 445fb7d531 Append IPv6 option in CMake Project 9 years ago
Christian Beier 9d4cb568b7 Be a bit clearer with the cursorshape documentation for libvncclient. 9 years ago
Christian Beier 4665af4950 Properly document HandleCursorShape and GotCursorShapeProc. 9 years ago
Christian Beier 228a75fe3a Merge pull request #90 from stweil/fix
Fix some recently introduced regressions
9 years ago
Stefan Weil 68d43fb62d Fix definition of POSIX data types
Commit 92f558482d added stdint.h to get
the type definitions, but included it after the first use of int8_t in
builds for Windows.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
9 years ago
Stefan Weil b71cc64e58 Fix endianness detection
Commit 97f442ef2a tried to improve the
endianness detection, but introduced a typo and problems for Windows
builds (no endian.h, different definition of LIBVNCSERVER_WORDS_BIGENDIAN).

Fix both issues.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
9 years ago
Stefan Weil 9c7efb7633 Fix some typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
9 years ago
plettix fe7df89fb1 shift fixes - if an integer is a negative number then the return value of "Swap32IfLE" was -1 10 years ago
Christian Beier 97f442ef2a Instead of letting the build system define endianess, rely on endian.h. 10 years ago
Christian Beier 92f558482d Do away with rfbint.h generation and use stdint.h directly instead. 10 years ago
Christian Beier 612de004c4 Revert "LibVNCClient: Add H.264 encoding for framebuffer updates"
This reverts commit d891478ec9.

Conflicts:
	configure.ac
	libvncclient/h264.c
10 years ago
Floris Bos 6836ccb208 Fix handling of multiple VNC commands per websockets frame
- When processing input, check if there is any extra data
  pending in the internal websocket frame and SSL buffers.
- Prevents input events lagging behind because they get
  stuck in one of the buffers.
  Data pending in our own buffers cannot be detected with
  select() so was not processed until more input arrives
  from the network.
- Closes # 55

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
10 years ago
Daniel Cohen Gindi e69e1efd75 Those are generally the windows headers, not just MinGW 11 years ago
Daniel Cohen Gindi 901eba9f46 Generally adjusting headers for compiling on windows without the mixing of Winsock 1 and 2. 11 years ago
Daniel Cohen Gindi e26aeb4062 MSVC: Use the Unix emulation headers
[JES: provided commit message, split out unrelated changes]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Daniel Cohen Gindi 8175f428dc Use correct winsock header
We link to ws2_32.lib which corresponds to the winsock2.h header, not the
winsock.h header.

[JES: fixed commit message]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Christian Beier 0de0fa498d Remove unneeded #ifdefs. 12 years ago
Christian Beier 38c181a2d5 Fix ABI compatibility issue. 12 years ago
David Verbeiren d891478ec9 LibVNCClient: Add H.264 encoding for framebuffer updates
This patch implements support in LibVNCClient for framebuffer updates
encoded as H.264 frames. Hardware accelerated decoding is performed
using VA API.

This is experimental support to let the community explore the possibilities
offered by the potential bandwidth and latency reductions that H.264 encoding
allows. This may be particularly useful for use cases such as online gaming,
hosted desktops, hosted set top boxes...

This patch only provides the client side support and is meant to be used
with corresponding server-side support, as provided by an upcoming patch for
qemu ui/vnc module (to view the display of a virtual machine executing under
QEMU).

With this H.264-based encoding, if multiple framebuffer update messages
are generated for a single server framebuffer modification, the H.264
frame data is sent only with the first update message. Subsequent update
framebuffer messages will contain only the coordinates and size of the
additional updated regions.

Instructions/Requirements:
* The patch should be applied on top of the previous patch I submitted with
minor enhancements to the gtkvncviewer application:
http://sourceforge.net/mailarchive/message.php?msg_id=30323804
* Currently only works with libva 1.0: use branch "v1.0-branch" for libva and
intel-driver. Those can be built as follows:
   cd libva
   git checkout v1.0-branch
   ./autogen.sh
   make
   sudo make install
   cd ..
   git clone git://anongit.freedesktop.org/vaapi/intel-driver
   cd intel-driver
   git checkout v1.0-branch
   ./autogen.sh
   make
   sudo make install

Signed-off-by: David Verbeiren <david.verbeiren@intel.com>
12 years ago
Raphael Kubo da Costa 95dd76327b Use htobeNN(3) to convert numbers in websocket.c.
byteswap.h exists only on glibc, so building libvncserver with websockets
support was not possible in other systems.

Replace the inclusion of byteswap.h and the WS_* definitions with calls to
htobeNN, which should perform the same conversions, be more portable and
avoid the need to check for the platform's endianness.
13 years ago
Raphael Kubo da Costa 3cbef1a976 Use C-style comments in rfbconfig.h.cmake and C source code.
Using C++-style comments when building the code with -ansi does not
work, so be more conservative with the comment style.
13 years ago
Christian Beier fef4386acc Add Compile Time Version Test Defines. 13 years ago
Christian Beier 3e0cf05e12 LibVNCServer: Include ws2tcpip.h if it's available.
Needed for the IPv6 stuff.
13 years ago
Christian Beier d4cbaa0c17 Only try to build TightPNG stuff when libjpeg is available.
TightPNG replaces the ZLIB stuff int Tight encoding with PNG. It still
uses JPEG rects as well. Theoretically, we could build TightPNG with only
libpng and libjpeg - without zlib - but libpng depends on zlib, so this is
kinda moot.
13 years ago
Christian Beier 413ca0dfef Merge branch 'turbovnc'
Conflicts, resolved manually:
	AUTHORS
13 years ago
Christian Beier 77286f0831 LibVNCClient: Remove all those WITH_CLIENT_TLS #ifdefs and move GnuTLS specific functionality into tls_gnutls.c. 13 years ago
DRC 7124b5fbcf Replace TightVNC encoder with TurboVNC encoder. This patch is the result of further research and discussion that revealed the following:
-- TightPng encoding and the rfbTightNoZlib extension need not conflict.  Since
   TightPng is a separate encoding type, not supported by TurboVNC-compatible
   viewers, then the rfbTightNoZlib extension can be used solely whenever the
   encoding type is Tight and disabled with the encoding type is TightPng.

-- In the TightVNC encoder, compression levels above 5 are basically useless.
   On the set of 20 low-level datasets that were used to design the TurboVNC
   encoder (these include the eight 2D application captures that were also used
   when designing the TightVNC encoder, as well as 12 3D application captures
   provided by the VirtualGL Project--
   see http://www.virtualgl.org/pmwiki/uploads/About/tighttoturbo.pdf), moving
   from Compression Level (CL) 5 to CL 9 in the TightVNC encoder did not
   increase the compression ratio of any datasets more than 10%, and the
   compression ratio only increased by more than 5% on four of them.  The
   compression ratio actually decreased a few percent on five of them.  In
   exchange for this paltry increase in compression ratio, the CPU usage, on
   average, went up by a factor of 5.  Thus, for all intents and purposes,
   TightVNC CL 5 provides the "best useful compression" for that encoder.

-- TurboVNC's best compression level (CL 2) compresses 3D and video workloads
   significantly more "tightly" than TightVNC CL 5 (~70% better, in the
   aggregate) but does not quite achieve the same level of compression with 2D
   workloads (~20% worse, in the aggregate.) This decrease in compression ratio
   may or may not be noticeable, since many of the datasets it affects are not
   performance-critical (such as the console output of a compilation, etc.)
   However, for peace of mind, it was still desirable to have a mode that
   compressed with equal "tightness" to TightVNC CL 5, since we proposed to
   replace that encoder entirely.

-- A new mode was discovered in the TurboVNC encoder that produces, in the
   aggregate, similar compression ratios on 2D datasets as TightVNC CL 5.  That
   new mode involves using Zlib level 7 (the same level used by TightVNC CL 5)
   but setting the "palette threshold" to 256, so that indexed color encoding
   is used whenever possible.  This mode reduces bandwidth only marginally
   (typically 10-20%) relative to TurboVNC CL 2 on low-color workloads, in
   exchange for nearly doubling CPU usage, and it does not benefit high-color
   workloads at all (since those are usually encoded with JPEG.)  However, it
   provides a means of reproducing the same "tightness" as the TightVNC
   encoder on 2D workloads without sacrificing any compression for 3D/video
   workloads, and without using any more CPU time than necessary.

-- The TurboVNC encoder still performs as well or better than the TightVNC
   encoder when plain libjpeg is used instead of libjpeg-turbo.

Specific notes follow:

common/turbojpeg.c common/turbojpeg.h:
Added code to emulate the libjpeg-turbo colorspace extensions, so that the
TurboJPEG wrapper can be used with plain libjpeg as well.  This required
updating the TurboJPEG wrapper to the latest code from libjpeg-turbo 1.2.0,
mainly because the TurboJPEG 1.2 API handles pixel formats in a much cleaner
way, which made the conversion code easier to write.  It also eases the
maintenance to have the wrapper synced as much as possible with the upstream
code base (so I can merge any relevant bug fixes that are discovered upstream.)
The libvncserver version of the TurboJPEG wrapper is a "lite" version,
containing only the JPEG compression/decompression code and not the lossless
transform, YUV encoding/decoding, and dynamic buffer allocation features from
TurboJPEG 1.2.

configure.ac:
Removed the --with-turbovnc option.  configure still checks for the presence of
libjpeg-turbo, but only for the purposes of printing a performance warning if
it isn't available.

rfb/rfb.h:
Fix a bug introduced with the initial TurboVNC encoder patch.  We cannot use
tightQualityLevel for the TurboVNC 1-100 quality level, because
tightQualityLevel is also used by ZRLE.  Thus, a new parameter
(turboQualityLevel) was created.

rfb/rfbproto.h:
Remove TurboVNC-specific #ifdefs and language

libvncserver/rfbserver.c:
Remove TurboVNC-specific #ifdefs.  Fix afore-mentioned tightQualityLevel bug.

libvncserver/tight.c:
Replaced the TightVNC encoder with the TurboVNC encoder.  Relative to the
initial TurboVNC encoder patch, this patch also:
-- Adds TightPng support to the TurboVNC encoder
-- Adds the afore-mentioned low-bandwidth mode, which is mapped externally to
   Compression Level 9

test/*:
Included TJUnitTest (a regression test for the TurboJPEG wrapper) as well as
TJBench (a benchmark for same.)  These are useful for ensuring that the wrapper
still functions correctly and performantly if it needs to be modified for
whatever reason.  Both of these programs are derived from libjpeg-turbo 1.2.0.
As with the TurboJPEG wrapper, they do not contain the more advanced features
of TurboJPEG 1.2, such as YUV encoding/decoding and lossless transforms.
13 years ago
Christian Beier 4c7e185a97 Move tightsubsamplevel member to the end of rfbClient struct.
Try to not break ABI between releases. Even if the code gets ugly...
13 years ago