Merge the development branch: decoders, watching from the channel list
Brings the FFmpeg decoder ladder and watching a streaming user's stream from the channel list. app.rs kept both sides: the identity import before the identity is chosen (with the development switches read there) and the video's decoder preference from the settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
599c55fda6
37 files changed
+2842
-159
No files matched your search
@@ -17,7 +17,11 @@ use anyhow::{Context, Result};
|
||||
use slint::{ComponentHandle, ModelRc, VecModel};
|
||||
use tokio::runtime::Runtime;
|
||||
use tracing::warn;
|
||||
use voelin_core::settings::{AUDIO, CRASH_REPORTS, IDENTITY_IMPORT, Settings};
|
||||
use voelin_core::media::decoder_preference;
|
||||
use voelin_core::settings::{
|
||||
AUDIO, CRASH_REPORTS, IDENTITY_IMPORT, STREAM_DECODER_BACKEND, STREAM_HARDWARE_DECODING,
|
||||
Settings,
|
||||
};
|
||||
use voelin_core::stream::StreamInfo;
|
||||
use voelin_core::{
|
||||
AudioSettings, Command, Engine, Event, History, HistoryMessage, SessionState, VoiceState,
|
||||
@@ -388,6 +392,9 @@ pub(crate) struct App {
|
||||
pub share_error: String,
|
||||
/// The stream in the viewer.
|
||||
pub watch: Option<Watch>,
|
||||
/// A client whose stream was asked for before it was known (session,
|
||||
/// client): watched when the lookup brings it.
|
||||
pub pending_watch: Option<(i64, u16)>,
|
||||
/// Stream volume in percent, kept between streams.
|
||||
pub stream_volume: f32,
|
||||
/// `VOELIN_DEMO_STREAM`: the viewer shows a local test stream.
|
||||
@@ -576,7 +583,8 @@ pub fn run(options: RunOptions) -> Result<()> {
|
||||
if settings.global_ptt {
|
||||
ptt.set(Some(settings.ptt_key.clone()));
|
||||
}
|
||||
let video = Video::new(&dir, settings.openh264);
|
||||
let mut video = Video::new(&dir, settings.openh264);
|
||||
video.set_decoder_preference(decoder_preference(&prefs));
|
||||
let app = App {
|
||||
ui: ui.as_weak(),
|
||||
store,
|
||||
@@ -608,6 +616,7 @@ pub fn run(options: RunOptions) -> Result<()> {
|
||||
share_busy: false,
|
||||
share_error: String::new(),
|
||||
watch: None,
|
||||
pending_watch: None,
|
||||
stream_volume: 100.0,
|
||||
demo: switches.demo_stream,
|
||||
demo_ui: switches.demo_ui,
|
||||
@@ -754,6 +763,8 @@ impl App {
|
||||
} else if key == voelin_core::settings::STREAM_AUDIO_SOURCES.name() {
|
||||
// A running share mixes the new sources (streams.rs).
|
||||
self.share_audio_changed();
|
||||
} else if key == STREAM_HARDWARE_DECODING.name() || key == STREAM_DECODER_BACKEND.name() {
|
||||
self.video.set_decoder_preference(decoder_preference(&self.prefs));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user