From 93e412a07c9784273e99de0fc4d5297963a20144 Mon Sep 17 00:00:00 2001 From: kieran Date: Mon, 11 Nov 2024 16:16:54 +0000 Subject: [PATCH] chore: bump egui-video --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- android.sh | 11 ++++++++--- src/services/ffmpeg_loader.rs | 8 ++++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ac9d36..1a36cb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1379,7 +1379,7 @@ dependencies = [ [[package]] name = "egui-video" version = "0.8.0" -source = "git+https://github.com/v0l/egui-video.git?rev=bb3f6b83ba3a0619b1b9de0d4da88acb7fafd257#bb3f6b83ba3a0619b1b9de0d4da88acb7fafd257" +source = "git+https://github.com/v0l/egui-video.git?rev=5e2167855822f9523aaab0fe58ec8b3d510d1996#5e2167855822f9523aaab0fe58ec8b3d510d1996" dependencies = [ "anyhow", "atomic", @@ -1604,7 +1604,7 @@ dependencies = [ [[package]] name = "ffmpeg-rs-raw" version = "0.1.0" -source = "git+https://git.v0l.io/Kieran/ffmpeg-rs-raw.git?rev=8b6166f1db18ffb322a5a634d6b6deaddb79ecbf#8b6166f1db18ffb322a5a634d6b6deaddb79ecbf" +source = "git+https://git.v0l.io/Kieran/ffmpeg-rs-raw.git?rev=90b98598e1fee6ddc52787c5c88924b52146b026#90b98598e1fee6ddc52787c5c88924b52146b026" dependencies = [ "anyhow", "ffmpeg-sys-the-third", diff --git a/Cargo.toml b/Cargo.toml index 4686438..d14408a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ resvg = { version = "0.44.0", default-features = false } serde = { version = "1.0.214", features = ["derive"] } serde_with = { version = "3.11.0", features = ["hex"] } -egui-video = { git = "https://github.com/v0l/egui-video.git", rev = "bb3f6b83ba3a0619b1b9de0d4da88acb7fafd257" } +egui-video = { git = "https://github.com/v0l/egui-video.git", rev = "5e2167855822f9523aaab0fe58ec8b3d510d1996" } #egui-video = { path = "../egui-video" } [target.'cfg(not(target_os = "android"))'.dependencies] diff --git a/android.sh b/android.sh index 13de478..d90b614 100755 --- a/android.sh +++ b/android.sh @@ -1,13 +1,18 @@ #!/bin/bash -git clone https://github.com/v0l/ffmpeg-kit.git -export ANDROID_SDK_ROOT=$ANDROID_HOME +#git clone https://github.com/v0l/ffmpeg-kit.git +#export ANDROID_SDK_ROOT=$ANDROID_HOME #cd ffmpeg-kit && ./android.sh \ # --disable-x86 \ # --disable-x86-64 \ # --disable-arm-v7a \ # --disable-arm-v7a-neon \ +# --enable-gpl \ # --enable-openssl \ +# --enable-x264 \ +# --enable-libwebp \ +# --enable-libpng \ +# --enable-android-media-codec \ # --api-level=28 \ # --no-ffmpeg-kit-protocols \ # --no-archive @@ -27,4 +32,4 @@ cp "$ANDROID_HOME/ndk/$NDK_VER/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr cp "$ANDROID_HOME/ndk/$NDK_VER/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/$TRIPLET/35/libcamera2ndk.so" \ ./target/x/release/android/$ARCH/cargo/$TRIPLET/release/deps -x build --arch $ARCH --platform $PLATFORM --verbose --release +x build --arch $ARCH --platform $PLATFORM --format apk --verbose --release diff --git a/src/services/ffmpeg_loader.rs b/src/services/ffmpeg_loader.rs index 19f803d..0e6911d 100644 --- a/src/services/ffmpeg_loader.rs +++ b/src/services/ffmpeg_loader.rs @@ -13,7 +13,7 @@ impl FfmpegLoader { } pub fn load_image(&self, path: PathBuf) -> Result { - let demux = Demuxer::new(path.to_str().unwrap()); + let demux = Demuxer::new(path.to_str().unwrap())?; Self::load_image_from_demuxer(demux) } @@ -22,7 +22,7 @@ impl FfmpegLoader { key: &str, data: &'static [u8], ) -> Result { - let demux = Demuxer::new_custom_io(data, Some(key.to_string())); + let demux = Demuxer::new_custom_io(data, Some(key.to_string()))?; Self::load_image_from_demuxer(demux) } @@ -45,8 +45,8 @@ impl FfmpegLoader { loop { let (mut pkt, stream) = demuxer.get_packet()?; if (*stream).index as usize == bv.index { - let frames = decode.decode_pkt(pkt, stream)?; - if let Some((frame, _)) = frames.first() { + let frames = decode.decode_pkt(pkt)?; + if let Some(frame) = frames.first() { let mut frame = get_frame_from_hw(*frame)?; let frame_rgb = scaler.process_frame( frame,