| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
We never use Windows' "UNICODE" mode anyway, so let's get rid of this
complexity.
|
|
|
|
|
| |
This makes memory management more clear and robust when using these
helper functions.
|
|
|
|
|
| |
Let the string helpers call the more fancy setParam(). This makes sure
we can avoid duplicating things.
|
|
|
|
|
| |
Otherwise the old length is preserved, which will result in NULL pointer
dereferencing if the parameter is ever accessed.
|
|
|
|
|
| |
This is explicitly a byte sequence, so let's try to keep a consistent
typing.
|
|
|
|
|
| |
These are used here and there so let's make them more general rather
than hiding them in the stream classes.
|
|
|
|
|
| |
Avoid our own custom types in favour of what's already included with
C++.
|
|
|
|
|
| |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|
|
|
|
| |
Avoid preprocessor magic and instead rely on templating to generate
optimized functions for performance critical code.
|
|
|
|
| |
Everything else uses LF line endings, so fix up the few stray ones.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
We should scope these as narrowely as possible to avoid side effects.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|
|
|
| |
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.
|
|
|
|
| |
Gives a bit more context where this error happened.
|