| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
These are supported by gcc and clang, and I don't think MSVC works well
with our code anyway, so let's keep things simple and use these
directly.
|
|
|
|
|
| |
This isn't needed with modern build environments, and can even conflict
with them.
|
|
|
|
|
| |
If we don't mark these as volatile then they might get reset on
longjmp() and the code will misbehave.
|
|
|
|
|
| |
These are just values, so setting const on them has no effect as the
caller will get a copy.
|
|
|
|
|
| |
This allows us to separate accidental fall through from explicit ones,
which allows us to turn on such checks in the compiler.
|
|
|
|
|
|
|
|
|
|
| |
If there isn't enough data, then the client reading the hash will fall
down and try to read the subtype instead, which isn't correct.
Invert the logic so we get a more consistent way through where we only
break out when there is insufficient data.
Do the same for the server code, for consistency.
|
|
|
|
|
| |
This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
|
|
|
|
| |
They have no need for it, so let's simplify things.
|
|
|
|
| |
Everything in flags is already handled at a higher level.
|
|
|
|
| |
The flags should always be empty anyway.
|
|
|
|
|
| |
This makes sure the compiler doesn't complain about problems in those
files.
|
| |
|
| |
|
|
|
|
|
|
| |
We don't want any stray exceptions as we are cleaning up, so handle any
still pending decoder errors by just logging them. We are already
shutting down so there is no need to abort the connection here.
|
|
|
|
|
|
| |
These require a key to have been set up on the server beforehand, so
they do not give a good default experience as clients will be unable to
connect.
|
|
|
|
| |
This is to make the code more tolerant of typos when entering a hostname
|
| |
|
| |
|
|
|
|
|
| |
This call should have been preceeded by hasData() or avail(), just like
all other accessor functions.
|
|
|
|
| |
We should scope these as narrowely as possible to avoid side effects.
|
|
|
|
|
|
| |
Avoid duplicating all the memory mangement, and instead use the
BufferedOutStream as a base clase for all out streams that need an
intermediate buffer.
|
| |
|
|
|
|
|
| |
Allow subclasses to call it, instead of it being strictly internal. This
is useful when a subclass can only provide data in minimum sized chunks.
|
|
|
|
|
|
|
|
|
| |
Avoid having to buffer everything we want to discard, and instead do it
piece by piece. This is more efficient, and avoids hitting any limits on
the buffering.
Note that this is safe here because we already know we have all the
compressed data. It would not be safe for a general input stream.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These streams both need to change the corking state temporarily, but it
is important it is restored to the previous state or things might get
messed up.
For the zlib stream it would just leave things uncorked, which still
works but is less efficient.
But for the TLS stream it might make things very unresponsive as the
corking might be left on permanently, delaying packets indefinitely.
|
|
|
|
|
| |
There is no point flushing when corking was enabled, as we might then
push out a small buffer that the corking otherwise would have preserved.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It seems MFT h264 decoder does not support frame cropping. Which
means that if frame width or height is not multiple of 16 then
decoded output can potentially be used with wrong offset. This
code adds explicit parsing of SPS to extract cropping information
to use, and will apply cropping if reported size differs from
expected.
|
| |
| |
| |
| |
| |
| | |
This is the standard method of finding it on Unix systems, so make sure
we use it. Still keep a fallback, though, for other systems, e.g.
Windows.
|
| |
| |
| |
| |
| | |
FFMPEG is needed by the RFB library, so all the details about it should
only be applied there and not for other components.
|
| |
| |
| |
| |
| |
| | |
This is the standard method of finding it on Unix systems, so make sure
we use it. Still keep a fallback, though, for other systems, e.g.
Windows.
|
|/
|
|
|
| |
Modern cmake has better support for adding source files and libraries
incrementally, so let's use that to clean things up.
|
|
|
|
|
| |
These checks depend on accessRights being set up, this has only happened
if we have done the QUERYING steps.
|
|
|
|
|
| |
Properties should be initialized in order to avoid random values in
case they are used earlier than expected.
|
|
|
|
|
|
| |
Enable this automatically for developers so we increase the chance of
these problems getting caught. There is a risk of overhead though so
keep them disabled for release builds.
|
|
|
|
|
|
| |
Unfortunately this error can be given by GnuTLS even though the
underlying stream still has data available. So stop trusting this value
and keep track of the underlying stream explicitly.
|
|
|
|
| |
It's a bit field so it's easier to decode in hex.
|
|
|
|
|
| |
The browsers allow users to make an exception for expired certificates,
so we should probably also.
|
|
|
|
|
| |
Otherwise we can get crashes on NULL dereference. This should only
happen on reverse connections where we don't have a server address.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ubuntu 20.04
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
libx264-dev:amd64 2:0.155.2917+git0a84d98-2
[ 11%] Building CXX object common/rfb/CMakeFiles/rfb.dir/H264LibavDecoderContext.cxx.o
tigervnc/common/rfb/H264LibavDecoderContext.cxx: In member function ‘virtual bool rfb::H264LibavDecoderContext::initCodec()’:
tigervnc/common/rfb/H264LibavDecoderContext.cxx:50:40: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
50 | AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_H264);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
| |
| const AVCodec*
make[2]: *** [common/rfb/CMakeFiles/rfb.dir/build.make:895: common/rfb/CMakeFiles/rfb.dir/H264LibavDecoderContext.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:597: common/rfb/CMakeFiles/rfb.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
|
| |
|
|
|
|
|
|
| |
Avoid duplication, and add logging for some more error conditions so
it's possible to see in the logs why a resize has failed or produced
unexpected results.
|
| |
|
|
|
|
| |
Linux implementation using ffmpeg
|
|
|
|
|
|
| |
This is a regression from ad0f061. If a VMware cursor rect was split up
over multiple read()s then the stream would become corrupted as we set
the restore point at the wrong place.
|
|
|
|
|
|
| |
The generally recommended way is to include it from source files, not
headers. We had a mix of both. Let's try to be consistent and follow the
recommended way.
|
|
|
|
|
| |
Can be helpful to see what encodings were actually used during a
connection, and how they performed.
|
|
|
|
|
|
| |
macOS' built in VNC server unfortunately sends the entire monitor in a
single rect, so we need to be prepared to buffer a lot of data in case
the monitor has a large resolution.
|
|
|
|
| |
Gives a bit more context where this error happened.
|
|
|
|
|
| |
Single CPU machines are extremely rare now, so let's avoid the hassle of
multiple code paths.
|