Commit Graph

445 Commits (24e4c5900aa511bc0ae9fa97c177019f59af9054)

Author SHA1 Message Date
Philipp Zabel e19c9ad600 Implement desktop resizing
Implement minimal support for ExtendedDesktopSize pseudo-encoding
and SetDesktopSize client message.

The opaque nvnc_desktop_layout structure contains all information
from the SetDesktopSize client message.
2023-02-25 11:03:44 +00:00
Andri Yngvason eacebad277 Remove _clang-format
It's not helpful
2023-02-24 15:25:48 +00:00
Andri Yngvason 8b3dc1ae60 Release v0.6.0 2023-01-22 13:06:36 +00:00
Andri Yngvason cdf990db75 meson: Require specific version of aml 2023-01-22 13:06:36 +00:00
Philipp Zabel afe37b983d stream: Fix remote closing TLS connection
If a TLS stream is closed by the remote VNC client,
stream__remote_closed must be called to signal the server.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2022-11-30 15:26:28 +00:00
Andri Yngvason bc87cbbb7d meson: Set default warning level to 2 2022-11-26 18:19:24 +00:00
Jim Ramsay 332be4d471 Add nvnc_client_close API
This allows the user or application to terminate any given nvnc_client
connection at any time.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-24 16:08:06 +00:00
Andri Yngvason 8f979c9928 Pass nvnc_client to cut-text callback 2022-11-20 22:42:01 +00:00
Andri Yngvason 79f26924ea Add functions for listing clients 2022-11-20 12:03:18 +00:00
Andri Yngvason 8a7509bd3a raw: Allocate conservatively sized buffers 2022-11-05 13:54:01 +00:00
Andri Yngvason f31ddf7fe9 enc-util: Add function to calculate region area 2022-11-05 13:52:55 +00:00
Andri Yngvason 3647457f6d server: Properly handle stream write errors
This fixes leaked rcbufs when clients disconnect.
2022-11-05 13:22:14 +00:00
Andri Yngvason fbe8631add raw: Fix worker data dependencies 2022-11-05 13:22:14 +00:00
Andri Yngvason 935ce4e98d Remove push/pull encoder interface
Think of it as a failed experiment.
2022-11-05 10:15:56 +00:00
Jim Ramsay 036b549fd8 Record authenticated username for each connected client
Signed-off-by: Jim Ramsay <jramsay@redhat.com>
2022-11-04 09:41:14 +00:00
Jim Ramsay 86bd2ced85 Record hostname for each connected client
Signed-off-by: Jim Ramsay <jramsay@redhat.com>
2022-11-04 09:41:14 +00:00
Andri Yngvason 73e1089f06 zrle: Unref result in destroy 2022-10-30 13:53:10 +00:00
Andri Yngvason b525608a06 raw: Unref result in destroy 2022-10-30 13:52:52 +00:00
Andri Yngvason b3c1d5d1dc stream: Use MSG_NOSIGNAL
Without MSG_NOSIGNAL, sending to closed sockets will generate SIGPIPE.
2022-10-30 13:07:13 +00:00
Andri Yngvason 95742676c9 zrle: Keep reference to encoder while encoding 2022-10-30 12:44:05 +00:00
Andri Yngvason 91dc5da243 raw: Keep reference to encoder while encoding 2022-10-30 12:44:05 +00:00
Andri Yngvason 727b2f727e tight: Keep reference to encoder while encoding 2022-10-30 12:44:05 +00:00
Andri Yngvason 8f2d137046 server: Make encoder inert when closing client 2022-10-30 12:44:05 +00:00
Andri Yngvason baaf84eab9 Reference count encoders 2022-10-30 12:44:05 +00:00
Andri Yngvason 48b070af5a server: Free cursor buffers on close 2022-10-30 12:44:05 +00:00
Andri Yngvason adef210252 fb-pool: Add setter for fb allocator 2022-10-29 18:40:02 +00:00
Andri Yngvason 411530b5da meson: Ack aml API changes 2022-10-29 11:50:34 +00:00
Andri Yngvason efb5ab956c Add debug logging for tcp address binding 2022-10-24 20:55:38 +00:00
Andri Yngvason 3588670c81 server: Replace abort() with NVNC_LOG_PANIC 2022-10-24 09:16:59 +00:00
Andri Yngvason 3c4a069ba2 tight: Disable chroma subsampling at q=9
This avoids color banding at the highest quality level.
2022-10-23 19:05:32 +00:00
Philipp Zabel df84f371fe Fix fallthrough warnings in murmurhash
Fix two -Wimplicit-fallthrough warnings in the murmurhash function:

  ../src/murmurhash.c: In function 'murmurhash':
  ../src/murmurhash.c:71:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
     71 |     case 3: k ^= (tail[2] << 16);
        |             ~~^~~~~~~~~~~~~~~~~~
  ../src/murmurhash.c:72:5: note: here
     72 |     case 2: k ^= (tail[1] << 8);
        |     ^~~~
  ../src/murmurhash.c:72:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
     72 |     case 2: k ^= (tail[1] << 8);
        |             ~~^~~~~~~~~~~~~~~~~
  ../src/murmurhash.c:74:5: note: here
     74 |     case 1:
        |     ^~~~
2022-10-15 10:00:43 +00:00
Jeroen Hofstee 5b2a062f0e don't resize an encoder if it is not set 2022-10-15 09:59:05 +00:00
Philipp Zabel 1b929afb2c Only set HAVE_LIBAVUTIL if libav is actually used
src/log.c uses av_log_set_level() and av_log_set_callback() from
libavutil if HAVE_LIBAVUTIL is set, so the libavutil dependence
must be added at the same time. Since libav logging is only used
by the h264 code, enable it all together for now.
2022-10-15 09:57:53 +00:00
Andri Yngvason b932f3e2e0 h264-encoder: Set async_depth=1
This fixes stalling during encoding. The FFmpeg devs seem to think that it's
normal to change the default behaviour or their code, so this needs to be
fixed here instead.

Fixes #73
2022-09-10 15:48:15 +00:00
Andri Yngvason 19538c9435 server: Fix encoding selection for sw frames
This fixes encoding selection when not using the --gpu option. Before this
change, raw encoding would always be selected.

Reported-by: Consolatis
Suggested-by: Consolatis
2022-08-23 22:34:56 +00:00
Andri Yngvason c0e1159a53 Revert "h264-encoder: Add 30 bit color depth formats"
This reverts commit 613761cf5f.

These are not available on older libav version and they don't event work.
2022-08-23 21:13:13 +00:00
Andri Yngvason 5e5d5d6e29 resampler: Use transformed width as destination stride
Fixes #72
2022-08-23 20:23:12 +00:00
Andri Yngvason f00570146b examples: draw: Fix cursor setter argument order
Reported-by: Ronny Nilsson
2022-08-20 11:35:03 +00:00
Andri Yngvason 965837465b README: Upgrade dependency list 2022-07-30 22:10:09 +00:00
Andri Yngvason 86f3106150 README: Reorder dependencies 2022-07-30 22:10:09 +00:00
Andri Yngvason 36fb346da1 README: Remove client compatibility table
It never got updated
2022-07-30 22:10:09 +00:00
Philipp Zabel affd7f3f6d Allow to query client-side cursor support
Add a function nvnc_client_supports_cursor() to enable the API user to
make an informed decision whether nvnc_set_cursor() can be expected to
make the client draw the cursor, or whether it has to be rendered into
the framebuffer.
2022-07-29 08:37:29 +00:00
Andri Yngvason d18cc4fc57 Add constants for left and right scroll 2022-07-28 20:13:48 +00:00
Andri Yngvason 263990f5ef stream: Remove stray ampersand in tls handshake failure code path 2022-07-17 20:17:19 +00:00
Andri Yngvason b9a5b9a3f1 h264: Set quality according to client's wishes 2022-07-10 13:53:32 +00:00
Andri Yngvason 528eac51a3 Fix jpeg quality setting
The encoding identifiers are supposed to be interpreted as a range. I
interpreted the upper and lower limits as two discrete quality settings
instead, which is wrong.
2022-07-10 12:41:20 +00:00
Andri Yngvason 43684ec482 Release v0.5.1 2022-07-09 21:39:53 +00:00
Andri Yngvason 86dd97ed0a test: meson: Add missing libdrm_inc dependency 2022-07-09 21:10:42 +00:00
Andri Yngvason f4f8f0bdb3 meson: Use partial_dependency() for libdrm cflags 2022-07-09 20:52:28 +00:00
Jan Beich 4baeaa43fd server: add missing header after f20ffb5e1e
src/server.c:1119:17: error: use of undeclared identifier 'IPPROTO_TCP'
        setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
                       ^
2022-07-09 20:04:53 +00:00