Conversation
… and settings toggle
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
| setEscHoldReleaseIndicator({ visible: false, progress: 0 }); | ||
| setStreamBackend(null); | ||
| setNativeStreamerState(null); | ||
| nativeStopExpectedRef.current = false; |
There was a problem hiding this comment.
[🟡 Medium]
resetLaunchRuntime clears nativeStopExpectedRef immediately, but stopNativeStreamer() tears down IPC asynchronously and can still emit a late failed/exited state while streamBackendRef/streamStatusRef are still stale from the previous render tick. That late event then enters the failure branch and surfaces a spurious launch error after a user-initiated stop. Keep the stop-expected guard set until native teardown has fully settled (or clear it only after refs/state have converged to idle/non-native). ```ts
// opennow-stable/src/renderer/src/App.tsx
setStreamBackend(null);
setNativeStreamerState(null);
nativeStopExpectedRef.current = false;
...
if (nativeStopExpectedRef.current || streamStatusRef.current === "idle") {
| } | ||
| while (avcodec_receive_frame(audio_decoder_ctx_, audio_frame_) == 0) { | ||
| if (!swr_context_) { | ||
| swr_alloc_set_opts2( |
There was a problem hiding this comment.
[🟡 Medium]
The resampler setup passes nullptr for out_ch_layout and does not check swr_alloc_set_opts2/swr_init results before calling swr_convert. This leaves audio conversion initialization undefined/failing on first use and can drop native audio output even when decode succeeds. Provide an explicit output channel layout (matching the SDL output format) and gate conversion on successful init. ```cpp
// opennow-native-streamer/src/media/media_pipeline.cpp
swr_alloc_set_opts2(
&swr_context_,
nullptr,
AV_SAMPLE_FMT_S16,
48000,
This PR introduces a first-class native streaming backend (
opennow-native-streamer/) alongside the existing Chromium renderer, enabled via a beta settings toggle. The native backend handles WebRTC negotiation (via libdatachannel), media playback (via FFmpeg and SDL3), and input (via native SDL capture and GFN protocol encoding), while preserving full Chromium/WebRTC fallback when the setting is disabled.enableNativeStreamersetting,NativeStreamerManagerservice, IPC lifecycle management, and renderer branching inApp.tsxWebRtcSession(offer/answer/ICE/data channels) andMediaPipeline(FFmpeg decode + SDL3 render/audio)InputEncoderandInputBridgeto send GFN-compatible packets via libdatachannel data channelsfixServerIp,preferCodec,mungeAnswerSdp,buildNvstSdp) and manual ICE injection for GFN ICE-liteMicrophone, recording, and screenshot features remain on the Chromium path. The native backend requires SDL3, FFmpeg, and libdatachain runtime dependencies.