Andri Yngvason
af38a643d9
tight: Don't block 1 worker while encoding tiles
2020-09-27 12:37:00 +00:00
Andri Yngvason
9e84000e0a
server: Extract finish_fb_update() from on_client_update_fb_done()
2020-09-26 22:29:02 +00:00
Andri Yngvason
add8d8e8db
server: Move pixel format conversion out of do_client_update_fb
2020-09-26 22:17:02 +00:00
Andri Yngvason
7e2b4fef8c
server: Refactor schedule_client_update_fb
2020-09-26 22:00:53 +00:00
Scott Moreau
81a8ba9d0e
server: Handle cut text messages of up to 10MB
2020-09-25 21:47:59 +00:00
Scott Moreau
783807c0b9
server: Fix possible crash on fragmented packet messages
...
The packets sent from the client especially for client cut text,
are typically sent in two packets, one for the message containing
the type and length and the other for the actual data. Sometimes
the first message is read but we still don't have the data yet.
We need to continue reading data to use the structure but this
revealed a bug. The client event handler was calling memmove()
with buffer_index as the size argument. This meant that it was
copying the wrong amount of data, resulting in garbage at the
end of the expected data. This patch fixes the problem by first
subtracting buffer_index from buffer_len and then moving buffer_len
worth of data, which is what was read into msg_buffer. The problem
possibly manifested itself with random crashes, after reading
random data.
2020-09-21 21:15:45 +00:00
Scott Moreau
6d29937e15
server: Add remaining support for simple copy/paste
...
- Add function to set callback for client_cut_text
- Add server_cut_text structure and function
This in conjunction with wayvnc #66 closes #4 .
2020-09-21 21:15:45 +00:00
Andri Yngvason
addcc50483
Bake version info into library
2020-07-26 11:43:29 +00:00
Andri Yngvason
b52f5cd6c9
Resize tight encoder on frame resize
2020-07-19 16:58:55 +00:00
Andri Yngvason
a0801f04e4
Implement server-side resizing
2020-07-19 11:54:39 +00:00
Andri Yngvason
eb4b9d71a4
Return failure if display buffer is not set in on_connect
2020-07-18 14:04:12 +00:00
Andri Yngvason
683776cdf0
server: Assert that a client has a stream open when processing a message
2020-07-16 18:14:52 +00:00
Andri Yngvason
33eda8c5d0
Always enable tight, encoding but allow disabling lossy tight encoding
2020-07-11 20:16:27 +00:00
Andri Yngvason
497f9adb29
tight: Re-implement with threads
2020-07-11 20:06:45 +00:00
Andri Yngvason
9b54f6d936
Clean up dispatch hander on exit
2020-07-06 16:43:53 +00:00
Andri Yngvason
7fb2215c0f
Use raw encoding by default if no encoding has been selected
...
This complies with the standard.
2020-05-31 22:56:27 +00:00
Andri Yngvason
569ad287c5
Fix version error handling
2020-05-29 20:18:05 +00:00
Stefan Agner
d2527e57f0
fix build warnings when building without tls
...
Fix trivial build warnings when building without TLS support.
2020-05-22 20:54:53 +00:00
Stefan Agner
8316994dfa
use static for functions not used outside this compile unit
...
Add static for all functions only used inside the individual compile
units. This helps the compiler to potentially inline these functions.
This allows to use neatvnc as a Meson subproject in Weston which has
-Wmissing-prototypes enabled by default.
2020-05-21 17:44:31 +00:00
Andri Yngvason
f3e09fd622
Prepare API for multi-display support
...
These changes are made now to make it possible to add multi-display
support in the future while keeping the public interface stable.
2020-04-12 18:16:19 +00:00
Andri Yngvason
737dd311a0
Remove nvnc_set_dimensions()
...
This information is now figured out based on the nvnc_fb passed into
nvnc_set_buffer()
2020-04-12 16:08:33 +00:00
Andri Yngvason
297e22b588
Don't render when a client is still encoding
2020-04-10 12:07:35 +00:00
Andri Yngvason
77b866096d
Redesign framebuffer update loop
...
Rendering may now only happen inside the rendering callback. The user is
also allowed to change out the entire buffer in the callback.
The callback is triggered by nvnc_damage_region(), nvnc_damage_whole()
and/or framebuffer update requests.
This fixes #26
2020-04-07 23:35:57 +00:00
Andri Yngvason
048b796ff5
Enable SO_REUSEADDR again
2020-04-06 18:29:17 +00:00
Andri Yngvason
1976221afe
Resolve host names in nvnc_open()
...
This fixes #23
2020-04-04 22:26:00 +00:00
Andri Yngvason
8fc5c18b28
Don't show partial frames to new clients
2020-04-04 14:00:03 +00:00
Andri Yngvason
f45f90ed9b
nvnc_fb: Add a mechanism for signaling that a frame is in use
2020-04-04 12:33:18 +00:00
Andri Yngvason
b0799f7490
server: Add dtrace probe for stream_send inside update_fb_done
2020-04-03 23:11:12 +00:00
Andri Yngvason
25626a9048
tight: Implement quality control
2020-04-03 20:09:26 +00:00
Andri Yngvason
17e0d6036f
tight: Implement bare minimum "basic" encoding
2020-04-03 00:18:54 +00:00
Andri Yngvason
cfb2abfc58
tight: Prepare for "basic" encoding method
2020-04-02 21:52:04 +00:00
Andri Yngvason
10a3fd6238
Add dtrace probes for framebuffer updates
2020-04-01 22:53:22 +00:00
Andri Yngvason
a77eb34fba
Spawn as many workers as there are CPU cores
2020-03-21 17:27:30 +00:00
Andri Yngvason
76e721c4cd
Replace libuv with aml
2020-03-21 16:59:10 +00:00
Andri Yngvason
7d2b295b4a
server: Read messages straight into message buffer
...
This avoids extra copying and removes a possible error condition that
would cause the connection to be closed
2020-01-25 16:42:10 +00:00
Andri Yngvason
547387f549
server: Close after sending VeNCrypt failure message
2020-01-25 16:04:04 +00:00
Andri Yngvason
b30a5516d3
server: Send the proper reason string on security handshake failure
2020-01-25 15:59:04 +00:00
Andri Yngvason
1687b8c701
server: Apply stream API change
2020-01-25 15:52:44 +00:00
Andri Yngvason
caf9fe0130
Remove unused code
2020-01-25 15:39:23 +00:00
Andri Yngvason
19e4e42036
Implement VeNCrypt with x509 plain authentication
2020-01-25 15:35:14 +00:00
Andri Yngvason
4ebd60b8cc
pixels: Delete useless code
2020-01-24 22:29:29 +00:00
Andri Yngvason
a80b314eea
server: Set the pixel format for the client if it hasn't specified one
2020-01-19 22:54:52 +00:00
Andri Yngvason
7fa074e60b
server: Close client if no frame encoding method is available
2020-01-19 21:27:17 +00:00
Andri Yngvason
ebfe4382ee
server: Use size_t for encoding indices
2020-01-19 19:17:15 +00:00
Scott Moreau
db6c063aea
Include sys/param.h for MIN definition
...
Fixes #11 .
2020-01-19 12:00:18 -07:00
Andri Yngvason
ad0ff6b27c
Make Tight encoding optional
2019-12-31 10:13:21 +00:00
Andri Yngvason
ee3f2fefff
server: Extract pixel format functions into pixels.c
2019-12-30 20:13:40 +00:00
Andri Yngvason
a0376f2fd4
Pass entire client structure to tight encoder
2019-12-30 17:48:22 +00:00
Andri Yngvason
d9f80ad196
server: Extract structure definitions into header
2019-12-30 17:22:19 +00:00
Andri Yngvason
8cd33d8a07
Add JPEG Tight encoding
2019-12-30 10:00:15 +00:00