Merge the audio mixer (86db9c5) into the FFmpeg encoders branch

Both add to StreamerConfig, the reconfigure docs and the imports of core
media.rs and the UI's video.rs; kept both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
Claude committed 2026-09-29 00:39:15 +00:00
commit dd8b628909
49 files changed
+10283 -428

No files matched your search

+6 -2
View File
@@ -4,7 +4,8 @@
use slint::{ComponentHandle, Model};
use tracing::warn;
use voelin_core::settings::{STREAM_BITRATE_KBPS, STREAM_FPS};
use voelin_core::media::audio_source_specs;
use voelin_core::settings::{STREAM_AUDIO_SOURCES, STREAM_BITRATE_KBPS, STREAM_FPS};
use voelin_core::stream::{EndReason, LeaveReason, StreamSetup, ViewerInfo, ViewerState};
use voelin_core::{Command, Event, StreamState, WatchState};
@@ -397,10 +398,13 @@ impl App {
audio: form.audio,
auto_accept: form.auto_accept,
};
// No sources configured: no audio.
let audio_sources = audio_source_specs(&self.prefs.get(&STREAM_AUDIO_SOURCES));
let request = CaptureRequest {
fps,
bitrate_kbps: bitrate,
audio: form.audio,
audio: form.audio && !audio_sources.is_empty(),
audio_sources,
restore_token: self.settings.portal_restore_token.clone(),
};
self.settings.share = defaults;
+6 -3
View File
@@ -13,8 +13,8 @@ use tracing::warn;
use voelin_core::media::voelin_media::capture::SourceId;
use voelin_core::media::voelin_media::{Codec, Codecs, EncoderReport, VideoFrame, convert};
use voelin_core::media::{
self, EncoderPreference, Latest, LocalPreview, Streamer, StreamerConfig, Viewer, peer_config,
preferred_codec, stream_codec,
self, AudioSourceSpec, EncoderPreference, Latest, LocalPreview, Streamer, StreamerConfig,
Viewer, peer_config, preferred_codec, stream_codec,
};
use voelin_core::stream::PeerConfig;
use voelin_core::{Engine, StreamSink};
@@ -262,6 +262,7 @@ impl Video {
codec,
encoder: self.encoder.clone(),
audio: options.audio,
audio_sources: options.audio_sources,
restore_token: options.restore_token,
..StreamerConfig::default()
};
@@ -332,6 +333,8 @@ pub(crate) struct CaptureRequest {
pub fps: u32,
pub bitrate_kbps: u32,
pub audio: bool,
/// Mixed into the stream's audio (`stream.audio_sources`).
pub audio_sources: Vec<AudioSourceSpec>,
pub restore_token: Option<String>,
}
@@ -356,7 +359,7 @@ impl Capture {
}
pub fn audio_error(&self) -> Option<String> {
self.streamer.audio_error().map(str::to_owned)
self.streamer.audio_error()
}
/// The portal's token for this choice, to keep.