Commit graph

88 commits

Author SHA1 Message Date
Cameron Gutman
ce98d4fb2f Introduce connection callbacks for trigger rumble and motion events 2023-06-11 19:42:02 -05:00
Cameron Gutman
7e089435c7 Reduce max number of frame status reports per second 2023-02-20 16:48:12 -06:00
Cameron Gutman
55a6d58225 Fix leak 2023-02-20 16:42:23 -06:00
Cameron Gutman
207f981fd0 Send final FEC frame status info to Sunshine
This info will be used for dynamic FEC and dynamic video packet batch size.
2023-02-20 16:24:48 -06:00
Cameron Gutman
82105f2f8f Declare packetFreed as volatile 2023-02-15 01:42:48 -06:00
Cameron Gutman
54d46ca80f Put backpressure on control stream sender when the window fills up
Without any backpressure, ENet will just let packets accumulate forever.
2023-02-14 23:02:18 -06:00
Cameron Gutman
79b5ef0e1e Add Sunshine protocol extension for passing HDR metadata 2023-01-16 21:06:33 -06:00
Cameron Gutman
9240090983 Add LiRequestIdrFrame() API for requesting an IDR frame on demand 2022-10-05 00:46:56 -05:00
Cameron Gutman
502f799a73 Add ML_ERROR_FRAME_CONVERSION error constant 2022-10-04 19:37:35 -05:00
Cameron Gutman
ec420615a1 Fix GCC build 2022-08-10 00:18:56 -05:00
Cameron Gutman
ef9c5a65cf Return a better error code when the control stream connection fails 2022-08-09 23:26:33 -05:00
Cameron Gutman
c72f30da2e Improve logging for control stream connection failure 2022-08-09 23:12:31 -05:00
Cameron Gutman
abc7acb5e4 Add HDR mode APIs 2022-01-28 21:29:14 -06:00
Cameron Gutman
cfe75eb569 Add workaround for keyboard and UTF-8 events interfering with each other 2022-01-17 21:56:06 -06:00
Cameron Gutman
b2c39883bf Fix incorrect IV for encrypted control stream packets on big-endian machines 2021-07-17 22:29:30 -05:00
Cameron Gutman
5820cc2048 Fix double-free if unencrypted packet is received on encrypted stream 2021-07-08 20:50:09 -05:00
Cameron Gutman
3b9d8a3176 Assert that the port numbers are set prior to being used 2021-07-02 01:44:11 -05:00
Cameron Gutman
56ccd99cc7 Dynamically determine audio, video, and control ports from RTSP DESCRIBE response 2021-07-01 23:45:33 -05:00
Cameron Gutman
d9ea208dea Avoid unlock and immediate relock of mutex 2021-05-25 19:57:06 -05:00
Cameron Gutman
edf1838708 Expose RTT information from ENet 2021-05-15 13:58:54 -05:00
Cameron Gutman
5feb3b6f90 Dynamically adjust wait time to hit the next RTO 2021-05-15 12:47:20 -05:00
Cameron Gutman
50c0648de2 Run a full enet_host_service() rather than just enet_host_flush() on send 2021-05-15 12:26:01 -05:00
Cameron Gutman
97216e1704 Wait for ENet socket readability rather than just sleeping 10 ms 2021-05-15 00:15:16 -05:00
Cameron Gutman
43eb36e17a Simplify and improve graceful disconnect logic 2021-05-14 22:36:13 -05:00
Cameron Gutman
387ff48a65 Perform a graceful disconnection if the termination was locally initiated 2021-05-14 22:06:07 -05:00
Cameron Gutman
132833deeb Limit RTO to 2x RTT and fix early peer timeout expiration 2021-05-14 20:44:19 -05:00
Cameron Gutman
a1a150c300 Refactor IDR/RFI requests to simplify code and fix race conditions 2021-05-14 20:41:20 -05:00
Cameron Gutman
a000f9f8b8 Validate that claimed length doesn't exceed the actual length 2021-04-29 17:26:59 -05:00
Cameron Gutman
8f371343cd Consolidate includes 2021-04-29 17:22:15 -05:00
Cameron Gutman
da68e64d9b Fix various MSVC warnings 2021-04-29 17:21:12 -05:00
Cameron Gutman
d7549cd953 Use array initializers compatible with MSVC 2021-04-22 00:32:41 -05:00
Cameron Gutman
625ec431eb Improve AES-CBC code in preparation for audio encryption 2021-04-21 23:59:14 -05:00
Cameron Gutman
b24a71ab0b Add explicit IDR frame request packet for GFE 3.22 2021-04-21 17:52:05 -05:00
Cameron Gutman
4304e597d8 Add byteswapping macros for big-endian systems 2021-04-17 21:43:13 -05:00
Cameron Gutman
d62ee951a0 Refactor OpenSSL usage into a platform-specific file to allow other crypto backends 2021-04-17 17:47:53 -05:00
Cameron Gutman
31433fc5ee Minor cleanup and bugfix 2021-04-09 13:47:24 -05:00
Cameron Gutman
6dca9c6754 Add special termination error code for protected content 2021-04-09 11:53:03 -05:00
Cameron Gutman
9841a6e34d Fix parsing of termination message from GFE 3.22 2021-04-09 11:41:59 -05:00
Cameron Gutman
731d52d020 Return a packet length from the decryption process 2021-04-09 10:40:28 -05:00
Cameron Gutman
12f0f3d6d7 Add encrypted control stream support for GFE 3.22
Receive-side not yet fully working
2021-04-09 10:25:24 -05:00
Cameron Gutman
a51cc972d3 Add APP_VERSION_AT_LEAST() macro for cleaner GFE version checks 2021-04-09 07:26:24 -05:00
Cameron Gutman
3aa2463856 Add a special error code for early termination 2020-12-24 11:21:47 -06:00
Cameron Gutman
97ca7b099f Report frames to the control stream code before FEC reconstruction 2020-12-24 11:08:31 -06:00
Cameron Gutman
8dc304bcd3 Fix more warnings 2020-12-05 23:30:25 -06:00
Cameron Gutman
0ead0df2a1 Remove usage of long types for LP64 and LLP64 consistency 2020-12-05 16:51:03 -06:00
Cameron Gutman
333382ae74 Use stdint types for ByteBuffer 2020-11-30 22:03:24 -06:00
Cameron Gutman
5f9f7ce407 Code cleanup: use stdbool.h 2020-11-30 20:38:13 -06:00
Cameron Gutman
b59007cdea Fix server-side log spam caused by sending unused command 0x0201 2020-08-09 11:46:49 -07:00
Cameron Gutman
b46e06fcf1 Terminate the connection if video isn't received for 10 seconds 2020-05-01 19:25:24 -07:00
Cameron Gutman
2a02569c5c Avoid 10 second delay on graceful termination with GFE 3.20.3.63 2020-04-09 17:28:34 -07:00