diff --git a/.gitignore b/.gitignore index dc76d68..bf20ad6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /snapshot-45.2.tar.xz /snapshot-46.0.tar.xz /snapshot-46.1.tar.xz +/snapshot-46.2.tar.xz diff --git a/0001-aperture-Use-our-preference-for-caps.patch b/0001-aperture-Use-our-preference-for-caps.patch deleted file mode 100644 index 920e5fc..0000000 --- a/0001-aperture-Use-our-preference-for-caps.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e3a7d25e114ad2fe218b4f895f9a04507403b958 Mon Sep 17 00:00:00 2001 -From: Robert Mader -Date: Sat, 30 Mar 2024 17:05:50 +0100 -Subject: [PATCH] aperture: Use our preference for caps - -Prefere the caps we already compute as being best. This notably makes us -prefer jpeg encoded streams on many cameras, allowing higher frame -rates. - -On top of that, ensure we still signal support other caps. This is -important if the camera is already running because of another app - -e.g. Cheese. Right now that app has authority over the chosen mode and -if that doesn't match one of our preferred ones we'd break. ---- - aperture/src/camera.rs | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/aperture/src/camera.rs b/aperture/src/camera.rs -index 1be3c54..2f2daeb 100644 ---- a/aperture/src/camera.rs -+++ b/aperture/src/camera.rs -@@ -172,7 +172,8 @@ fn filter_caps(caps: &gst::Caps) -> gst::Caps { - } - }); - -- caps.intersect_with_mode(&best_caps, gst::CapsIntersectMode::First) -+ best_caps.merge(caps.clone()); -+ best_caps - } - - fn framerate_from_structure(structure: &gst::StructureRef) -> Option { --- -2.44.0 - diff --git a/0001-camera-remove-portal-usage.patch b/0001-camera-remove-portal-usage.patch deleted file mode 100644 index 35fb005..0000000 --- a/0001-camera-remove-portal-usage.patch +++ /dev/null @@ -1,80 +0,0 @@ -From a7f7fabe6a8f7fef6b98724f9c73f6bdd9d19e3a Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 9 Apr 2024 14:55:02 -0700 -Subject: [PATCH] camera: remove portal usage - -This is just causing too many problems for Fedora 40 release -right now. - -Signed-off-by: Adam Williamson ---- - Cargo.toml | 1 - - src/widgets/camera.rs | 25 ------------------------- - 2 files changed, 26 deletions(-) - -diff --git a/Cargo.toml b/Cargo.toml -index 4405060..fc7ce26 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -12,7 +12,6 @@ lto = true - [dependencies] - adw = { package = "libadwaita", version = "0.6", features = ["v1_4"] } - anyhow = "1.0" --ashpd = { version = "0.8", features = ["gtk4", "tracing"] } - futures-channel = "0.3.26" - gettext-rs = { version = "0.7", features = ["gettext-system"] } - gst = { package = "gstreamer", version = "0.22", features = ["v1_20"] } -diff --git a/src/widgets/camera.rs b/src/widgets/camera.rs -index 3f017ca..65843b8 100644 ---- a/src/widgets/camera.rs -+++ b/src/widgets/camera.rs -@@ -1,9 +1,7 @@ - // SPDX-License-Identifier: GPL-3.0-or-later --use std::os::unix::io::OwnedFd; - - use adw::prelude::*; - use adw::subclass::prelude::*; --use ashpd::desktop::camera; - use gettextrs::gettext; - use gtk::CompositeTemplate; - use gtk::{gio, glib}; -@@ -213,22 +211,6 @@ impl Camera { - - glib::spawn_future_local( - glib::clone!(@weak self as obj, @strong provider => async move { -- match stream().await { -- Ok(fd) => { -- if let Err(err) = provider.set_fd(fd) { -- log::error!("Could not use the camera portal: {err}"); -- }; -- } -- Err(ashpd::Error::Portal(ashpd::PortalError::NotAllowed(err))) => { -- // We don't start the device provider if we are not -- // allowed to use cameras. -- log::warn!("Permission to use the camera portal denied: {err}"); -- obj.imp().permission_denied.set(true); -- obj.update_state(); -- return; -- }, -- Err(err) => log::warn!("Could not use the camera portal: {err}"), -- } - if let Err(err) = provider.start_with_default(glib::clone!(@weak obj => @default-return false, move |camera| { - let stored_id = obj.imp().settings().string("last-camera-id"); - !stored_id.is_empty() && id_from_pw(camera) == stored_id -@@ -523,13 +505,6 @@ impl Camera { - } - } - --async fn stream() -> ashpd::Result { -- let proxy = camera::Camera::new().await?; -- proxy.request_access().await?; -- -- proxy.open_pipe_wire_remote().await --} -- - // Id used to identify the last-used camera. - fn id_from_pw(camera: &aperture::Camera) -> glib::GString { - camera.display_name() --- -2.44.0 - diff --git a/snapshot.spec b/snapshot.spec index 223ee0d..3c7923b 100644 --- a/snapshot.spec +++ b/snapshot.spec @@ -9,7 +9,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: snapshot -Version: 46.1 +Version: 46.2 Release: %autorelease Summary: Take pictures and videos @@ -31,18 +31,8 @@ License: (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) URL: https://gitlab.gnome.org/GNOME/snapshot Source: https://download.gnome.org/sources/snapshot/46/snapshot-%{tarball_version}.tar.xz -# https://gitlab.gnome.org/GNOME/snapshot/-/commit/e3a7d25e114ad2fe218b4f895f9a04507403b958 -# Was supposed to be in 46.1 but accidentally omitted from the tarball -# Should fix framerates on some cameras -Patch0: 0001-aperture-Use-our-preference-for-caps.patch - # Downstream patch to disable linting as part of self tests -Patch100: 0001-Disable-cargo-clippy-test.patch - -# Based on https://gitlab.gnome.org/GNOME/snapshot/-/merge_requests/194 -# Disable portal usage, it's causing too many problems right now -# Not applied to flatpak builds, as it'd render them useless -Patch200: 0001-camera-remove-portal-usage.patch +Patch: 0001-Disable-cargo-clippy-test.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -74,13 +64,7 @@ Take pictures and videos on your computer, tablet, or phone. %prep -%setup -q -n snapshot-%{tarball_version} -%patch 0 -p1 -%patch 100 -p1 -%if ! 0%{?flatpak} -# this patch should not be applied to flatpaks -%patch 200 -p1 -%endif +%autosetup -p1 -n snapshot-%{tarball_version} %if 0%{?bundled_rust_deps} %cargo_prep -v vendor diff --git a/sources b/sources index 5d3f503..b9e055c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (snapshot-46.1.tar.xz) = 2a372480b6969c1e7162f76c370551c07a638f987ec587bbf86bb1ed3820c2ebbc82889cf54dcb717a7ed2c32209e9b8aa4afdfd47fe121c89f0f659c8d33f4e +SHA512 (snapshot-46.2.tar.xz) = eb34a9d16e7e0856e04d402b9efd23f9e3f6598846d7a13d16f9ca741e73eadba498b61ff628d5d64f0bad2a5927267d261e52541c68dff59501434f20051f15