Temporary revert to add ffmpeg 7.1 compat patch

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks/kpipewire6?expand=0&rev=26
This commit is contained in:
Christophe Marin 2024-10-03 14:04:01 +00:00 committed by Git OBS Bridge
parent 8344aaefd8
commit 7be3ea2745
5 changed files with 43 additions and 50 deletions

View File

@ -0,0 +1,37 @@
From 5ff964b62d0112f27b52b742f4e6a054ba9e4732 Mon Sep 17 00:00:00 2001
From: Arjen Hiemstra <ahiemstra@heimr.nl>
Date: Thu, 3 Oct 2024 10:44:04 +0200
Subject: [PATCH] h264vaapi: Use the proper getter for getting the hardware
context
The hw_frames_context was moved out of AVFilterLink for FFmpeg 7.1.
Apparently there is actually a proper getter for getting the
hw_frames_ctx of a filter context, so use that instead so things keep
compiling with 7.1.
While at it, add a comment explaining why we need this in the first
place.
---
src/h264vaapiencoder.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/h264vaapiencoder.cpp b/src/h264vaapiencoder.cpp
index 2d610de..cf315f3 100644
--- a/src/h264vaapiencoder.cpp
+++ b/src/h264vaapiencoder.cpp
@@ -144,7 +144,11 @@ bool H264VAAPIEncoder::initialize(const QSize &size)
// av_dict_set_int(&options, "threads", qMin(16, QThread::idealThreadCount()), 0);
applyEncodingPreference(options);
- m_avCodecContext->hw_frames_ctx = av_buffer_ref(m_outputFilter->inputs[0]->hw_frames_ctx);
+ // Assign the right hardware context for encoding frames.
+ // We rely on FFmpeg for creating the VAAPI hardware context as part of
+ // `avfilter_graph_parse()`. The codec context needs the VAAPI context to be
+ // able to encode properly, so get that from the output filter.
+ m_avCodecContext->hw_frames_ctx = av_buffer_ref(av_buffersink_get_hw_frames_ctx(m_outputFilter));
if (int result = avcodec_open2(m_avCodecContext, codec, &options); result < 0) {
qCWarning(PIPEWIRERECORD_LOGGING) << "Could not open codec" << av_err2str(ret);
--
2.46.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4072e0584580bfac5a76840b55b948c5e2ab19b6315267e5657ffdb3b84dfb6
size 149248

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4KPrIC+OV1KOE+cv11dEg7tXsY0FAmbiw1gACgkQ11dEg7tX
sY2wBA//Q1DZRhBlNGMFt2vrlL5nmh+9ANeLS4T5cJot3ufGV2QoDJ10ew+G8+t0
9g7XKMABL/B4GOJAoZ3L1/L6Fm0hv0nkYMkuy7dXQC5a/W1qkHZLnS+QjwZM42wp
deIimcssJmi+5GoQ5sFPMDJgh6UFBEqBjeORmK9iJ6et3+TfPoUFngUluriIlrmO
/xN5a8yOxNHT+Ar/A3twRzU+dBxx00seQLRFoMHRg6b+eiDajHMCEggsOCmpj30L
inffPZIkXY6iC+WJtYdPYovo2oxFjpDwT9fBF+2dw2CeBIsnIgJvxQcYfI/X2CzT
K9x8HrXl/VkejYryCMBiXnQWdU3ANCPjRMbkYa5FJAbOzUDDE+xy0/BMVa7tVC75
LeaLIbEQxtxpzSTwsSOPK4U68Swf9X8n61uGyEdAhptCE+wJ3/biwzlxIknK3W4T
L/oPUvIMHtm3RlNlh2zfh8gMSXczvADzXqTKMnUtEwqJPEuzQRQQmf6BJn96rv9+
A72RZt4w3psWzMk8OHjSCV+GiSJriDgFpKekTrf0w9HT+lF+XEAaZJxgWKEPDhlC
cAUSKJGilTxvNlpDlVVUaBZ4H+7oIL0Wvt+wB7l0tTfhFB86plruqFHLEEg9hp2J
pvVEWnpqO/DIMRe7Ld/i0Wx2CeFd04O/4c+8Iq2xjeiU+f2GIXY=
=JjCE
-----END PGP SIGNATURE-----

View File

@ -1,30 +1,3 @@
-------------------------------------------------------------------
Tue Sep 17 14:53:30 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
- Update to 6.1.90:
* New feature release
* For more details see https://kde.org/announcements/plasma/6/6.1.90
- Changes since 6.1.5:
* update version for new release
* sourcestream: Do not process null streams
* Add missing "pipewireencodedstream.h" include
* Generate wayland code with PRIVATE_CODE
* produce: Use a separate condition_variable for passthrough/output thread
* Guard m_stream in setMaxFramerate
* pipewireproduce.cpp: Add guard to m_stream
* sourcestream: make resilient against pipewire restarts
* Fix some copy-and-paste issues in h264vaapi and libx264 encoders
* Add encoder using libopenh264 (kde#476187)
* Simpler yet more useful handling of KPIPEWIRE_FORCE_ENCODER
* produce: Properly cleanup on deactivate in all cases (kde#488687)
* produce: Destroy PipeWireSourceStream on the right thread (kde#489434)
* gitignore: add VS Code dir
* mediamonitortest: start media session and create dummy output to test playback state
* Use only non external only format modifiers
* Drop implicit modifier shortcut
* Use reserve to reserve space in list
* update version for new release
-------------------------------------------------------------------
Tue Sep 10 14:53:47 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -17,7 +17,7 @@
%global kf6_version 6.0.0
%define qt6_version 6.7.0
%define qt6_version 6.6.0
%define _sover 6
%define rname kpipewire
@ -27,16 +27,18 @@
%{!?_plasma6_version: %define _plasma6_version %(echo %{_plasma6_bugfix} | awk -F. '{print $1"."$2}')}
%bcond_without released
Name: kpipewire6
Version: 6.1.90
Version: 6.1.5
Release: 0
Summary: PipeWire integration for KDE Plasma
License: LGPL-2.0-only AND LGPL-3.0-only
URL: https://www.kde.org
Source: https://download.kde.org/unstable/plasma/%{version}/%{rname}-%{version}.tar.xz
Source: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz
%if %{with released}
Source1: https://download.kde.org/unstable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig
Source1: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
# PATCH-FIX-UPSTREAM
Patch0: 0001-h264vaapi-Use-the-proper-getter-for-getting-the-hard.patch
BuildRequires: kf6-extra-cmake-modules
BuildRequires: pkgconfig
BuildRequires: qt6-gui-private-devel >= %{qt6_version}