Commit graph

1269 commits

Author SHA1 Message Date
sergystepanov
6d2ab88177 Com cleanup 2026-07-04 16:02:02 +03:00
sergystepanov
3ad7a00d72 Don't leak times in RPC 2026-07-03 19:32:58 +03:00
sergystepanov
0edba391f2 Reorder API struct fields for better alignment 2026-07-03 19:22:50 +03:00
sergystepanov
9d72022b57 Backoff with a 2x multiplier instead of exponential 2026-07-03 11:36:49 +03:00
sergystepanov
13852a725a Remove x/image dep 2026-07-02 21:31:33 +03:00
sergystepanov
e7991414b2 Update dependencies
go: upgraded github.com/klauspost/compress v1.18.6 => v1.19.0
go: upgraded github.com/klauspost/cpuid/v2 v2.3.0 => v2.4.0
go: upgraded github.com/pion/rtcp v1.2.16 => v1.2.17
go: upgraded github.com/pion/turn/v5 v5.0.10 => v5.0.12
2026-07-02 21:26:15 +03:00
sergystepanov
00d93c0a00 Remove Prometheus metrics 2026-07-02 21:26:15 +03:00
sergystepanov
68ac6afab4 Switch to the more precise runtime.nanotime for frame timing 2026-07-02 21:26:13 +03:00
sergystepanov
f2cb7ebc7a Increase video channel buffer size to 3
In case if an encoder slower than 16ms.
2026-07-01 23:48:45 +03:00
sergystepanov
684983e714 Remove unused deps in CI 2026-07-01 18:38:41 +03:00
sergystepanov
3018a7da0d Drop dlfcn dependency on Windows
Use direct syscalls instead. Needed for static builds.
2026-07-01 15:38:56 +03:00
sergystepanov
8361215a84 Fix 1px edge artifact in FF when flipped 2026-07-01 12:35:51 +03:00
sergystepanov
dfb78c458d Replace SDL2 with lightweight RGFW-like GL/Window helper lib 2026-06-29 23:24:09 +03:00
sergystepanov
728b2a49f0
Add GStreamer (#504)
Old media pipe was replaced with GStreamer (go-gst). It is now possible
to change encoders to any supported by GStreamer, provided the necessary
plugins are installed on the system where cloud-retro is running. See
params in config.go.
2026-06-28 22:20:31 +03:00
sergystepanov
04240aa855 Use sub-frame emulation precision 2026-06-27 14:56:50 +03:00
sergystepanov
6c0f13c3a2 Update default.pgo 2026-06-15 12:27:22 +03:00
sergystepanov
eef9d4af55 Add missing entrypoint for no-pgo Docker 2026-06-14 20:48:19 +03:00
sergystepanov
653f3c9f65 Add no PGO worker Docker build 2026-06-14 20:34:25 +03:00
sergystepanov
8476600767 Hardcode audio codec to Opus in WebRTC connection 2026-06-13 20:25:33 +03:00
sergystepanov
cbbca28a19 Support array index notation in env var parsing 2026-06-13 18:30:52 +03:00
sergystepanov
e3b16d5feb Use client-side stream vertical flip
Previously we used zero-cost x264 `X264_CSP_VFLIP` and vpx
`vpx_img_flip` for OpenGL cores (which render their output buffers
upside down). Now the flip is handled client-side during GPU compositing
of the video stream.
This will be needed later, when we have to use more codecs and
Gstreamer.
2026-06-13 17:53:37 +03:00
sergystepanov
f55727a9c5 Use single 10ms frame for audio encoder for fewer fragments 2026-06-13 14:05:48 +03:00
sergystepanov
168bad0450 Use thread OS lock only with GL cores 2026-06-13 09:46:11 +03:00
sergystepanov
8bfe576032 Update .gitignore 2026-06-12 19:01:22 +03:00
sergystepanov
6ed3a1b0d0 Force keyframes during first 3 frames because user will see blanks til
kf
2026-06-12 18:18:14 +03:00
sergystepanov
db43b171e9 Update dependencies
go: upgraded github.com/pion/turn/v5 v5.0.9 => v5.0.10
go: upgraded golang.org/x/crypto v0.52.0 => v0.53.0
go: upgraded golang.org/x/net v0.55.0 => v0.56.0
go: upgraded golang.org/x/sys v0.45.0 => v0.46.0
go: upgraded golang.org/x/text v0.37.0 => v0.38.0
go: upgraded gopkg.in/ini.v1 v1.67.2 => v1.67.3
2026-06-12 16:59:22 +03:00
sergystepanov
adf67c035d Drain all VPx encoder packets and use zero-copy internal buffer 2026-06-12 16:56:17 +03:00
sergystepanov
10c2727a38 Move keyframe interval to common Video config and set it to 120 frames 2026-06-12 16:39:41 +03:00
sergystepanov
7ece426518 Fix missing codec params in the VPX struct 2026-06-11 22:04:34 +03:00
sergystepanov
9c42f1cc59 Retune VP8/VP9 codecs
Add new params
cpuUsed: 0
tileColumns: 0
tune: screen

In VP9 it will use multithreaded encoding now.

Keyframe interval was not set properly wasting bitrate. By default. It
is changed to 120 frames instead of 5.
2026-06-11 21:44:33 +03:00
sergystepanov
2897339258 Remove Firefox pointer workaround and clean up imports 2026-06-11 20:36:42 +03:00
sergystepanov
20ed20e22a Optimize keyboard state sync with one bulk CGO call
Instead of abusing 348 individual calls, we use just one
2026-06-11 14:25:58 +03:00
sergystepanov
e53f31073f Delay pointer controls in fullscreen to avoid weird jumps in Zen (FF) 2026-06-09 23:57:12 +03:00
sergystepanov
7adddee6ff Reformat screen.js 2026-06-09 23:54:02 +03:00
sergystepanov
af6b0805b7 Ignore only top level folders in Git 2026-06-09 22:56:04 +03:00
sergystepanov
57168067d9 Guard remote ICE candidates against null peer connection 2026-06-09 20:00:51 +03:00
sergystepanov
16b9c179c8 Refactor webrtc module on the server
- Use unified ice/sdp signaling handlers;
- Set transceiver directions explicitly for performance.
2026-06-09 15:10:09 +03:00
sergystepanov
7442ff7e42 Reset ICE buffering on the client on ICE restarts 2026-06-09 15:10:08 +03:00
sergystepanov
86ee0cb380 Create the main data channel without negotiation
There is no point in previously pushing or pulling this channel, since we won't change any of its configuration parameters.
2026-06-09 15:10:07 +03:00
sergystepanov
67cd92da6b Add IncludeLoopbackCandidate option 2026-06-08 16:47:31 +03:00
sergystepanov
c5886c5b1b Add connection time logging to WebRTC handler 2026-06-08 16:47:18 +03:00
sergystepanov
6016dac27a Update .gitignore 2026-06-07 13:11:27 +03:00
sergystepanov
6fff575817 Use state from the WebRTC stat reports for RTT
Previous fix #844d84b doesn't work in Chrome, so this is another method
for better FF/Chrome compatibility.
2026-06-06 22:52:53 +03:00
sergystepanov
14de2a1790 Disable automatic worker room assignment in busy rooms 2026-06-06 22:23:19 +03:00
sergystepanov
7389bce9cb Update deps
go: upgraded github.com/pion/dtls/v3 v3.1.3 => v3.1.4
go: upgraded github.com/pion/stun/v3 v3.1.4 => v3.1.5
go: upgraded github.com/pion/turn/v5 v5.0.8 => v5.0.9
go: upgraded github.com/pion/webrtc/v4 v4.2.14 => v4.2.15
2026-06-06 18:44:38 +03:00
sergystepanov
9b3d873907 It is time to update copyleft year 2026-06-06 18:35:11 +03:00
sergystepanov
a4b4e0458f Unify all WebRTC signaling in the API
Users, workers, and the coordinator will now send WebRTC signaling
information through a single API endpoint with a unified structure. The
payload should contain either an sdp or ice field for further processing
by the designated handlers.

Replaced API endpoints:
  - (101) WebrtcOffer -> WebrtcSignal
    Removed API endpoints:
  - WebrtcAnswer (102)
  - WebrtcIce (103)
2026-06-06 18:19:07 +03:00
sergystepanov
f72202684f Remove Base64 encoding of wire data 2026-06-06 15:31:13 +03:00
sergystepanov
fa783dc7cd Add init method into WebRTC Signalling 2026-06-06 14:20:17 +03:00
sergystepanov
844d84b6ac Use RTT stats from the selected ICE pair in the stats 2026-06-06 12:58:23 +03:00