From 2e3c44b4215552d9978f70a1ee31d5ca511be1a6 Mon Sep 17 00:00:00 2001 From: RabbyDevs <67389402+RabbyDevs@users.noreply.github.com> Date: Fri, 9 May 2025 21:38:03 +0300 Subject: [PATCH] black screen dead once and for all. now its just loss of input for a bit on first load --- Cargo.lock | 19 ----- Cargo.toml | 2 - iced_video_player/Cargo.toml | 4 +- iced_video_player/src/video.rs | 2 +- src/components/installer.rs | 1 + src/main.rs | 66 ++++++++++++++--- src/utils/visual_helper.rs | 128 +++++++++++++-------------------- 7 files changed, 107 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a96993..d265e92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,12 +816,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "file-format" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ef3d5e8ae27277c8285ac43ed153158178ef0f79567f32024ca8140a0c7cd8" - [[package]] name = "flate2" version = "1.1.1" @@ -1627,13 +1621,11 @@ dependencies = [ "glib", "gstreamer", "gstreamer-app", - "gstreamer-base", "iced", "iced_wgpu", "log", "thiserror 2.0.12", "url", - "yuvutils-rs", ] [[package]] @@ -3102,7 +3094,6 @@ name = "reversed-rooms-launcher" version = "0.5.0" dependencies = [ "directories", - "file-format", "iced", "iced_video_player", "image", @@ -3111,7 +3102,6 @@ dependencies = [ "serde_json", "strum 0.27.1", "strum_macros 0.27.1", - "tempfile", "url", ] @@ -5051,15 +5041,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "yuvutils-rs" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b699b6503cd14c70b258eaffedd7ada5a781ea23206eeb9066736b99ba37af1" -dependencies = [ - "num-traits", -] - [[package]] name = "zeno" version = "0.3.2" diff --git a/Cargo.toml b/Cargo.toml index cdb2392..4ccd5bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,10 +10,8 @@ iced = { git = "https://github.com/RabbyDevs/iced.git", features = ["tokio", "wg image = "0.25.6" serde = { version = "1.0.219", features = ["serde_derive"] } serde_json = "1.0.140" -tempfile = "3.19.1" iced_video_player = {path = "./iced_video_player"} url = "2.5.4" -file-format = "0.26.0" strum = "0.27.1" strum_macros = "0.27.1" reqwest = { version = "0.12.15", features = [ diff --git a/iced_video_player/Cargo.toml b/iced_video_player/Cargo.toml index 9fc00ab..c3eb0fe 100644 --- a/iced_video_player/Cargo.toml +++ b/iced_video_player/Cargo.toml @@ -20,12 +20,12 @@ iced = { git = "https://github.com/RabbyDevs/iced.git", features = ["wgpu", "ima iced_wgpu = { git = "https://github.com/RabbyDevs/iced.git" } gstreamer = "0.23.5" gstreamer-app = "0.23.5" # appsink -gstreamer-base = "0.23.5" # basesrc +# gstreamer-base = "0.23.5" # basesrc glib = "0.20.9" # gobject traits and error type log = "0.4.27" thiserror = "2.0.12" url = "2.5.4" # media uri -yuvutils-rs = "0.8.2" +# yuvutils-rs = "0.8.2" [package.metadata.nix] systems = ["x86_64-linux"] diff --git a/iced_video_player/src/video.rs b/iced_video_player/src/video.rs index b974c2e..c2bb3ae 100644 --- a/iced_video_player/src/video.rs +++ b/iced_video_player/src/video.rs @@ -336,7 +336,7 @@ impl Video { frame, upload_frame, - looping: false, + looping: true, is_eos: false, restart_stream: false, }))) diff --git a/src/components/installer.rs b/src/components/installer.rs index 1a80525..95fe991 100644 --- a/src/components/installer.rs +++ b/src/components/installer.rs @@ -156,6 +156,7 @@ async fn refresh_kuro_install(proj_dirs: &ProjectDirs, client: &Client) -> Resul update_file_if_needed(data_dir, client, &bg_information.background_file, "background").await?; update_file_if_needed(data_dir, client, &bg_information.slogan, "splash").await?; + update_file_if_needed(data_dir, client, &bg_information.first_frame_image, "first_frame_image").await?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index b2aad26..b089173 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,9 +96,15 @@ enum Launcher { Loaded(Box), } +#[derive(Debug)] +struct VideoBackground { + video: Option