Merge the development branch: decoders, watching from the channel list

Both sides kept. From the development branch: FFmpeg's decoders at
runtime (hardware first, then software, then built-in) with the settings
stream.hardware_decoding and stream.decoder_backend, applied to the
video when they change, and watching a streaming user's stream from the
channel list, their dialog and the member card.

video.rs keeps set_decoder_preference and leaves out encoder_report:
the Integrations page asks a copy of the codecs for the report on a
thread of its own (FFmpeg's probe can take a while), not on the UI
thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
selikhovandClaude Opus 5.5 committed 2026-10-04 03:33:33 +03:00
commit 87c8d6c686
37 files changed
+2839 -158

No files matched your search

+23 -2
View File
@@ -1031,14 +1031,31 @@ pub static STREAM_SRTP_PROFILES: Key<Vec<String>> = Key::new(
)
.validated(valid_srtp);
/// Use hardware video encoders and decoders where available.
/// Use hardware video encoders where available.
pub static STREAM_HARDWARE_ACCELERATION: Key<bool> = Key::new(
"stream.hardware_acceleration",
Kind::Bool,
"Use hardware video encoders and decoders where available.",
"Use hardware video encoders where available.",
|| true,
);
/// Use hardware video decoders where available.
pub static STREAM_HARDWARE_DECODING: Key<bool> = Key::new(
"stream.hardware_decoding",
Kind::Bool,
"Use hardware video decoders where available.",
|| true,
);
/// Video decoder: `auto`, `software`, or the name of a decoder backend.
pub static STREAM_DECODER_BACKEND: Key<String> = Key::new(
"stream.decoder_backend",
Kind::Text { suggestions: &["auto", "software"] },
"Video decoder: auto, software, or a decoder's name.",
|| "auto".into(),
)
.validated(not_empty);
/// Who may watch our stream without being asked.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
@@ -1309,6 +1326,8 @@ pub fn builtin_keys() -> Vec<&'static dyn Setting> {
&STREAM_ENCODER_BACKEND,
&STREAM_SRTP_PROFILES,
&STREAM_HARDWARE_ACCELERATION,
&STREAM_HARDWARE_DECODING,
&STREAM_DECODER_BACKEND,
&STREAM_PERMISSIONS,
&CHAT_STORE_HISTORY,
&CHAT_HISTORY_PAGE,
@@ -1381,6 +1400,8 @@ mod tests {
);
assert!(s.get(&STREAM_HARDWARE_ACCELERATION));
assert_eq!(s.get(&STREAM_ENCODER_BACKEND), "auto");
assert!(s.get(&STREAM_HARDWARE_DECODING));
assert_eq!(s.get(&STREAM_DECODER_BACKEND), "auto");
assert!(s.get(&CHAT_STORE_HISTORY));
assert_eq!(s.get(&CHAT_HISTORY_PAGE), 100);
assert_eq!(s.get(&CHAT_DEDUPE_TOLERANCE_MS), 5000);