The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
feat(ui): a Settings switch for decoding on the hardware
Jareer6d9b1e20e7ce
diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.jsonindex 7cfb2d25..eee381f7 100644--- a/src/crates/concat/locales/de.json+++ b/src/crates/concat/locales/de.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "Das Bild als Science-Fiction-Projektion: der Farbton weicht einem Blauverlauf, Kanten glühen, Scanlinien wandern, ein Bildwechsel fegt durch, Risse und Korn.","Token": "Token","{0} is not an address like 127.0.0.1:7420": "{0} ist keine Adresse wie 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Was eine Verbindung vor ihrem ersten Aufruf vorzeigen muss. Bleibt es leer, denkt sich der Server bei jedem Start eines aus und zeigt es hier."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Was eine Verbindung vor ihrem ersten Aufruf vorzeigen muss. Bleibt es leer, denkt sich der Server bei jedem Start eines aus und zeigt es hier.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.jsonindex c0002303..5121c2c6 100644--- a/src/crates/concat/locales/en.json+++ b/src/crates/concat/locales/en.json@@ -162,6 +162,8 @@"Daydream": "Daydream","Daylight footage made to pop: midtones lifted, colour brought up where it is muted, a breath of mint in the brightest whites, skin left alone.": "Daylight footage made to pop: midtones lifted, colour brought up where it is muted, a breath of mint in the brightest whites, skin left alone.","Decay": "Decay",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding","Deep": "Deep","Deep blacks, a cool cast over everything but the lamps, colour low, a little grain. Late-night desk and monologue footage.": "Deep blacks, a cool cast over everything but the lamps, colour low, a little grain. Late-night desk and monologue footage.","Deeper shadows, brighter highlights.": "Deeper shadows, brighter highlights.",@@ -430,6 +432,7 @@"Off": "Off","off": "off","Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.": "Off, a click on the ruler past the last clip lands the playhead there, and a clip placed at the playhead goes with it. On, the playhead never leaves the content.",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.","One repeat, fading.": "One repeat, fading.","One title per phrase spoken, cut to the words' own timing, on the first lane with room.": "One title per phrase spoken, cut to the words' own timing, on the first lane with room.","One title per sentence, held for as long as it takes to read, one after another on the first lane with room.": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.",diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.jsonindex 2ccbc54d..872f55c8 100644--- a/src/crates/concat/locales/es.json+++ b/src/crates/concat/locales/es.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "La imagen como proyección de ciencia ficción: el tono se sustituye por una rampa azul, los bordes brillan, las líneas de barrido se deslizan, pasa un barrido de refresco, con desgarros y grano.","Token": "Token","{0} is not an address like 127.0.0.1:7420": "{0} no es una dirección como 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Lo que una conexión debe presentar antes de su primera llamada. Si se deja vacío, el servidor inventa uno cada vez que arranca y lo muestra aquí."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Lo que una conexión debe presentar antes de su primera llamada. Si se deja vacío, el servidor inventa uno cada vez que arranca y lo muestra aquí.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.jsonindex d791db51..103fc6e9 100644--- a/src/crates/concat/locales/fr.json+++ b/src/crates/concat/locales/fr.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "L'image en projection de science-fiction : sa teinte remplacée par une rampe bleue, des bords lumineux, des lignes de balayage qui dérivent, un balayage de rafraîchissement, des déchirures et du grain.","Token": "Jeton","{0} is not an address like 127.0.0.1:7420": "{0} n'est pas une adresse comme 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Ce qu'une connexion doit présenter avant son premier appel. Laissé vide, le serveur en invente un à chaque démarrage et l'affiche ici."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Ce qu'une connexion doit présenter avant son premier appel. Laissé vide, le serveur en invente un à chaque démarrage et l'affiche ici.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.jsonindex cc78c58b..72a67500 100644--- a/src/crates/concat/locales/hr.json+++ b/src/crates/concat/locales/hr.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "Slika kao znanstvenofantastična projekcija: nijansa zamijenjena plavim prijelazom, rubovi svijetle, linije skeniranja plutaju, prolazi osvježavanje, kidanja i zrnatost.","Token": "Token","{0} is not an address like 127.0.0.1:7420": "{0} nije adresa poput 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Što veza mora predočiti prije prvog poziva. Ostane li prazno, poslužitelj ga sam smisli pri svakom pokretanju i prikaže ovdje."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Što veza mora predočiti prije prvog poziva. Ostane li prazno, poslužitelj ga sam smisli pri svakom pokretanju i prikaže ovdje.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.jsonindex 9c0d9964..02952dc6 100644--- a/src/crates/concat/locales/it.json+++ b/src/crates/concat/locales/it.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "L'immagine come proiezione fantascientifica: la tinta sostituita da una rampa blu, bordi luminosi, linee di scansione alla deriva, una passata di aggiornamento, strappi e grana.","Token": "Token","{0} is not an address like 127.0.0.1:7420": "{0} non è un indirizzo come 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Ciò che una connessione deve presentare prima della prima chiamata. Se lasciato vuoto, il server ne inventa uno a ogni avvio e lo mostra qui."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Ciò che una connessione deve presentare prima della prima chiamata. Se lasciato vuoto, il server ne inventa uno a ogni avvio e lo mostra qui.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.jsonindex a633dee5..3dbe4f3a 100644--- a/src/crates/concat/locales/ja.json+++ b/src/crates/concat/locales/ja.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "SF の投影のような映像: 色相を青のグラデーションに置き換え、縁が光り、走査線が流れ、リフレッシュの帯が走り、ずれと粒子が乗ります。","Token": "トークン","{0} is not an address like 127.0.0.1:7420": "{0} は 127.0.0.1:7420 のようなアドレスではありません",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "接続が最初の呼び出しの前に提示するもの。空のままにすると、サーバーは起動のたびに自分で作り、ここに表示します。"+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "接続が最初の呼び出しの前に提示するもの。空のままにすると、サーバーは起動のたびに自分で作り、ここに表示します。",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.jsonindex 579d5163..0f23732a 100644--- a/src/crates/concat/locales/ko.json+++ b/src/crates/concat/locales/ko.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "SF 영화의 투영처럼 보이는 화면: 색상은 파란 그라데이션으로 바뀌고, 가장자리가 빛나며, 주사선이 흐르고, 새로 고침 띠가 지나가며, 찢김과 입자가 더해집니다.","Token": "토큰","{0} is not an address like 127.0.0.1:7420": "{0}은(는) 127.0.0.1:7420 같은 주소가 아닙니다",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "연결이 첫 호출 전에 제시해야 하는 값입니다. 비워 두면 서버가 시작할 때마다 하나를 만들어 여기에 표시합니다."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "연결이 첫 호출 전에 제시해야 하는 값입니다. 비워 두면 서버가 시작할 때마다 하나를 만들어 여기에 표시합니다.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.jsonindex 186d5a70..f220a2c6 100644--- a/src/crates/concat/locales/pt-BR.json+++ b/src/crates/concat/locales/pt-BR.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "A imagem como uma projeção de ficção científica: o matiz trocado por uma rampa azul, bordas brilhando, linhas de varredura à deriva, uma varredura de atualização, rasgos e granulação.","Token": "Token","{0} is not an address like 127.0.0.1:7420": "{0} não é um endereço como 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "O que uma conexão precisa apresentar antes da primeira chamada. Se ficar vazio, o servidor inventa um a cada início e o mostra aqui."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "O que uma conexão precisa apresentar antes da primeira chamada. Se ficar vazio, o servidor inventa um a cada início e o mostra aqui.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.jsonindex ac03dac1..2926ed53 100644--- a/src/crates/concat/locales/ru.json+++ b/src/crates/concat/locales/ru.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "Изображение как фантастическая проекция: оттенок заменён синим градиентом, края светятся, строки развёртки плывут, проходит полоса обновления, разрывы и зерно.","Token": "Токен","{0} is not an address like 127.0.0.1:7420": "{0} — не адрес вида 127.0.0.1:7420",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Что соединение должно предъявить перед первым вызовом. Если оставить пустым, сервер сам придумает его при каждом запуске и покажет здесь."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Что соединение должно предъявить перед первым вызовом. Если оставить пустым, сервер сам придумает его при каждом запуске и покажет здесь.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.jsonindex 9f0746bc..50013ca9 100644--- a/src/crates/concat/locales/tr.json+++ b/src/crates/concat/locales/tr.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "Görüntü bilimkurgu projeksiyonu gibi: tonu mavi bir geçişle değiştirilir, kenarlar parlar, tarama çizgileri kayar, bir yenileme süpürmesi geçer, yırtılmalar ve gren.","Token": "Belirteç","{0} is not an address like 127.0.0.1:7420": "{0}, 127.0.0.1:7420 gibi bir adres değil",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Bir bağlantının ilk çağrısından önce sunması gereken şey. Boş bırakılırsa sunucu her başlatıldığında bir tane uydurur ve burada gösterir."+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "Bir bağlantının ilk çağrısından önce sunması gereken şey. Boş bırakılırsa sunucu her başlatıldığında bir tane uydurur ve burada gösterir.",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.jsonindex 46cc5b4a..ffe1a390 100644--- a/src/crates/concat/locales/zh-Hans.json+++ b/src/crates/concat/locales/zh-Hans.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "把画面变成科幻投影:色相被换成蓝色渐变,边缘发光,扫描线漂移,刷新扫过,带有撕裂和颗粒。","Token": "令牌","{0} is not an address like 127.0.0.1:7420": "{0} 不是类似 127.0.0.1:7420 的地址",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "连接在首次调用前必须出示的内容。留空时,服务器每次启动都会自行生成一个并显示在这里。"+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "连接在首次调用前必须出示的内容。留空时,服务器每次启动都会自行生成一个并显示在这里。",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.jsonindex 90d9fd46..0f3a9f53 100644--- a/src/crates/concat/locales/zh-TW.json+++ b/src/crates/concat/locales/zh-TW.json@@ -713,5 +713,8 @@"The picture as a sci-fi projection: its hue thrown away for a blue ramp, edges glowing, scan lines drifting, a refresh sweep, tears and grain.": "把畫面變成科幻投影:色相換成藍色漸層,邊緣發光,掃描線漂移,刷新掃過,帶有撕裂與顆粒。","Token": "權杖","{0} is not an address like 127.0.0.1:7420": "{0} 不是類似 127.0.0.1:7420 的位址",- "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "連線在第一次呼叫前必須出示的內容。留空時,伺服器每次啟動都會自行產生一個並顯示在這裡。"+ "What a connection must present before its first call. Left empty, the server makes one up each time it starts and shows it here.": "連線在第一次呼叫前必須出示的內容。留空時,伺服器每次啟動都會自行產生一個並顯示在這裡。",+ "Decode on the hardware": "Decode on the hardware",+ "Decoding": "Decoding",+ "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.": "On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before."}diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rsindex fcbb2ffb..2f484de5 100644--- a/src/crates/concat/src/lib.rs+++ b/src/crates/concat/src/lib.rs@@ -1019,6 +1019,9 @@ pub fn run() -> Result<(), slint::PlatformError> {app.on_settings_custom_context_actions_changed(on_window!(|state, on: bool| {state.handle(Msg::Settings(SettingsMsg::CustomContextActionsChanged(on)));}));+ app.on_settings_hardware_decode_changed(on_window!(|state, on: bool| {+ state.handle(Msg::Settings(SettingsMsg::HardwareDecodeChanged(on)));+ }));app.on_settings_download_source_changed(on_window!(|state, index: i32| {state.handle(Msg::Settings(SettingsMsg::DownloadSourceChanged(index)));}));diff --git a/src/crates/concat/src/panes/settings.rs b/src/crates/concat/src/panes/settings.rsindex d6b8e769..43633868 100644--- a/src/crates/concat/src/panes/settings.rs+++ b/src/crates/concat/src/panes/settings.rs@@ -40,6 +40,7 @@ pub enum SettingsMsg {LanguageChanged(i32),PlayheadStopsChanged(bool),CustomContextActionsChanged(bool),+ HardwareDecodeChanged(bool),DownloadSourceChanged(i32),DownloadBaseEdited(String),ServerEnabledChanged(bool),@@ -131,6 +132,8 @@ pub struct SettingsPane {pub playhead_stops: bool,/// Show flip/reverse in clip context menu.pub custom_context_actions: bool,+ /// Video decodes on the platform's hardware.+ pub hardware_decode: bool,/// Index into `SourcePreference::ALL`: where model downloads look first.pub download_source: usize,/// The base URL of a custom download source.@@ -159,6 +162,8 @@ impl SettingsPane {.unwrap_or(0);self.playhead_stops = studio.prefs.playhead_stops_at_end;self.custom_context_actions = studio.prefs.custom_context_actions;+ self.hardware_decode = studio.prefs.hardware_decode_on();+ concat_media::set_hardware_decode(self.hardware_decode);self.download_source = Self::download_source(studio).0;self.download_base = studio.prefs.download_base.clone().unwrap_or_default();Self::apply_download_source(studio);@@ -208,6 +213,16 @@ impl SettingsPane {studio.prefs.custom_context_actions = on;studio.prefs.save(&studio.host.dirs);}+ SettingsMsg::HardwareDecodeChanged(on) => {+ self.hardware_decode = on;+ studio.prefs.hardware_decode = Some(on);+ studio.prefs.save(&studio.host.dirs);+ // Readers already open keep what they opened with; the+ // monitor's next frame opens fresh ones.+ concat_media::set_hardware_decode(on);+ studio.host.monitor.clear();+ studio.request_preview();+ }SettingsMsg::DownloadSourceChanged(index) => {let index = (index.max(0) as usize).min(SourcePreference::ALL.len() - 1);self.download_source = index;@@ -531,6 +546,9 @@ impl SettingsPane {language: self.language as i32,playhead_stops: self.playhead_stops,custom_context_actions: self.custom_context_actions,+ hardware_decode: self.hardware_decode,+ hardware_decode_offered: concat_media::HwDevice::platform_default()+ .is_some_and(concat_media::HwDevice::linked),download_source: self.download_source as i32,download_base: self.download_base.as_str().into(),server_enabled: studio.prefs.server.enabled,diff --git a/src/crates/concat/src/prefs.rs b/src/crates/concat/src/prefs.rsindex 950bd311..ed81934d 100644--- a/src/crates/concat/src/prefs.rs+++ b/src/crates/concat/src/prefs.rs@@ -37,6 +37,11 @@ pub struct Preferences {/// Show flip horizontal, flip vertical, and reverse in the clip context/// menu. Keyboard shortcuts (H, J, R) are always available.pub custom_context_actions: bool,+ /// Video decodes on the platform's own hardware where it has some:+ /// VideoToolbox on a Mac. `None` is the platform's default, which is on+ /// where the hardware path has been exercised (macOS and iOS) and off+ /// elsewhere; see `Preferences::hardware_decode_on`.+ pub hardware_decode: Option<bool>,/// Where model downloads look first: a `SourcePreference` by name./// Absent is automatic.pub download_source: Option<String>,@@ -47,6 +52,15 @@ pub struct Preferences {pub server: ServerPrefs,}+impl Preferences {+ /// Whether video should decode on the hardware: the choice made, or+ /// the platform's default when none was.+ pub fn hardware_decode_on(&self) -> bool {+ self.hardware_decode+ .unwrap_or(cfg!(any(target_os = "macos", target_os = "ios")))+ }+}+/// The Settings sheet's Remote page: whether the API is served while the/// window is open, where, and behind which token.#[derive(Clone, Debug, Serialize, Deserialize)]diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slintindex 05627425..b98e523d 100644--- a/src/crates/concat/ui/app.slint+++ b/src/crates/concat/ui/app.slint@@ -190,6 +190,7 @@ export component App inherits Window {callback settings-theme-changed(dark: bool);callback settings-playhead-stops-changed(on: bool);callback settings-custom-context-actions-changed(on: bool);+ callback settings-hardware-decode-changed(on: bool);callback settings-download-source-changed(index: int);callback settings-download-base-edited(text: string);callback settings-server-enabled-changed(on: bool);@@ -490,6 +491,7 @@ export component App inherits Window {theme-changed(dark) => { root.settings-theme-changed(dark); }playhead-stops-changed(on) => { root.settings-playhead-stops-changed(on); }custom-context-actions-changed(on) => { root.settings-custom-context-actions-changed(on); }+ hardware-decode-changed(on) => { root.settings-hardware-decode-changed(on); }download-source-changed(index) => { root.settings-download-source-changed(index); }download-base-edited(text) => { root.settings-download-base-edited(text); }server-enabled-changed(on) => { root.settings-server-enabled-changed(on); }diff --git a/src/crates/concat/ui/dialogs/settings.slint b/src/crates/concat/ui/dialogs/settings.slintindex bf566197..c347a612 100644--- a/src/crates/concat/ui/dialogs/settings.slint+++ b/src/crates/concat/ui/dialogs/settings.slint@@ -52,6 +52,11 @@ export struct SettingsData {playhead-stops: bool,/// show flip/reverse in clip context menucustom-context-actions: bool,+ /// video decodes on the platform's own hardware+ hardware-decode: bool,+ /// this build and machine have hardware to decode on; off, the+ /// switch is not shown+ hardware-decode-offered: bool,/// where model downloads look first: automatic, Concat's mirror,/// hf-mirror.com, the original source, a custom URLdownload-source: int,@@ -362,6 +367,7 @@ export component SettingsDialog inherits Modal {callback theme-changed(dark: bool);callback playhead-stops-changed(on: bool);callback custom-context-actions-changed(on: bool);+ callback hardware-decode-changed(on: bool);callback download-source-changed(index: int);callback download-base-edited(text: string);callback server-enabled-changed(on: bool);@@ -540,6 +546,33 @@ export component SettingsDialog inherits Modal {}}+ // The platform's own decoder, where the build has one.+ if root.data.hardware-decode-offered: DialogSection {+ title: I18n.t("Decoding");+ hint: I18n.t("On, video decodes on this machine's own hardware, which is what makes 4K play on a laptop. A file the hardware will not take decodes in software as before.");++ HorizontalLayout {+ spacing: 6px;++ Text {+ text: I18n.t("Decode on the hardware");+ color: Theme.fg;+ font-size: Theme.fs;+ vertical-alignment: center;+ }++ Rectangle { horizontal-stretch: 1; }++ VerticalLayout {+ alignment: center;+ Switch {+ checked: root.data.hardware-decode;+ toggled(on) => { root.hardware-decode-changed(on); }+ }+ }+ }+ }+// The models are open weights from elsewhere, mirrored so// they stay reachable; where a download looks first is a// matter of where you are. Every source is still tried.