diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2025-09-27 19:01:44 +0200 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2025-09-27 19:03:05 +0200 |
| commit | 45b3da060bb643f874b33fde315fe92dfe7a1cd0 (patch) | |
| tree | 0abb96d149d40e877ea55b70e1151f8c7131cff1 /kde-plasma/kpipewire/files/kpipewire-6.4.5-ffmpeg8.patch | |
| parent | 70b24b07b4af78280d72e0e822259bd7ccf87b58 (diff) | |
| download | kde-45b3da060bb643f874b33fde315fe92dfe7a1cd0.tar.gz kde-45b3da060bb643f874b33fde315fe92dfe7a1cd0.tar.bz2 kde-45b3da060bb643f874b33fde315fe92dfe7a1cd0.zip | |
kde-plasma/kpipewire: Restrict ffmpeg8 patch to >=media-video/ffmpeg-5
Rather than needlessly revbump and raise minimum version, just make it
conditional.
See also:
https://invent.kde.org/plasma/kpipewire/-/merge_requests/208#note_1310965
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/kpipewire/files/kpipewire-6.4.5-ffmpeg8.patch')
| -rw-r--r-- | kde-plasma/kpipewire/files/kpipewire-6.4.5-ffmpeg8.patch | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/kde-plasma/kpipewire/files/kpipewire-6.4.5-ffmpeg8.patch b/kde-plasma/kpipewire/files/kpipewire-6.4.5-ffmpeg8.patch new file mode 100644 index 00000000000..8c721c47ac7 --- /dev/null +++ b/kde-plasma/kpipewire/files/kpipewire-6.4.5-ffmpeg8.patch @@ -0,0 +1,116 @@ +From 6dc69b0674f9946641e88151c209ce58f085d06a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bero@lindev.ch> +Date: Wed, 27 Aug 2025 16:39:36 +0200 +Subject: [PATCH] Fix build with ffmpeg >= 8.0 + +--- + src/h264vaapiencoder.cpp | 12 +++++++++--- + src/libopenh264encoder.cpp | 12 +++++++++--- + src/libx264encoder.cpp | 12 +++++++++--- + 3 files changed, 27 insertions(+), 9 deletions(-) + +diff --git a/src/h264vaapiencoder.cpp b/src/h264vaapiencoder.cpp +index 0cf251b..eaec8dd 100644 +--- a/src/h264vaapiencoder.cpp ++++ b/src/h264vaapiencoder.cpp +@@ -18,6 +18,12 @@ extern "C" { + + #include "logging_record.h" + ++#ifndef AV_PROFILE_H264_BASELINE // ffmpeg before 8.0 ++#define AV_PROFILE_H264_BASELINE FF_PROFILE_H264_BASELINE ++#define AV_PROFILE_H264_MAIN FF_PROFILE_H264_MAIN ++#define AV_PROFILE_H264_HIGH FF_PROFILE_H264_HIGH ++#endif ++ + H264VAAPIEncoder::H264VAAPIEncoder(H264Profile profile, PipeWireProduce *produce) + : HardwareEncoder(produce) + , m_profile(profile) +@@ -130,13 +136,13 @@ bool H264VAAPIEncoder::initialize(const QSize &size) + + switch (m_profile) { + case H264Profile::Baseline: +- m_avCodecContext->profile = FF_PROFILE_H264_CONSTRAINED_BASELINE; ++ m_avCodecContext->profile = AV_PROFILE_H264_CONSTRAINED_BASELINE; + break; + case H264Profile::Main: +- m_avCodecContext->profile = FF_PROFILE_H264_MAIN; ++ m_avCodecContext->profile = AV_PROFILE_H264_MAIN; + break; + case H264Profile::High: +- m_avCodecContext->profile = FF_PROFILE_H264_HIGH; ++ m_avCodecContext->profile = AV_PROFILE_H264_HIGH; + break; + } + +diff --git a/src/libopenh264encoder.cpp b/src/libopenh264encoder.cpp +index db6ed4d..294c0f2 100644 +--- a/src/libopenh264encoder.cpp ++++ b/src/libopenh264encoder.cpp +@@ -21,6 +21,12 @@ extern "C" { + + #include "logging_record.h" + ++#ifndef AV_PROFILE_H264_BASELINE // ffmpeg before 8.0 ++#define AV_PROFILE_H264_CONSTRAINED_BASELINE FF_PROFILE_H264_CONSTRAINED_BASELINE ++#define AV_PROFILE_H264_MAIN FF_PROFILE_H264_MAIN ++#define AV_PROFILE_H264_HIGH FF_PROFILE_H264_HIGH ++#endif ++ + LibOpenH264Encoder::LibOpenH264Encoder(H264Profile profile, PipeWireProduce *produce) + : SoftwareEncoder(produce) + , m_profile(profile) +@@ -64,13 +70,13 @@ bool LibOpenH264Encoder::initialize(const QSize &size) + // passes that through, but libopenh264 only allows BASELINE. + // Until that bug is fixed there'll always be a warning that the + // profile is not supported (https://github.com/cisco/openh264/issues/3613) +- m_avCodecContext->profile = FF_PROFILE_H264_CONSTRAINED_BASELINE; ++ m_avCodecContext->profile = AV_PROFILE_H264_CONSTRAINED_BASELINE; + break; + case H264Profile::Main: +- m_avCodecContext->profile = FF_PROFILE_H264_MAIN; ++ m_avCodecContext->profile = AV_PROFILE_H264_MAIN; + break; + case H264Profile::High: +- m_avCodecContext->profile = FF_PROFILE_H264_HIGH; ++ m_avCodecContext->profile = AV_PROFILE_H264_HIGH; + break; + } + +diff --git a/src/libx264encoder.cpp b/src/libx264encoder.cpp +index d9fe44f..a8f0e21 100644 +--- a/src/libx264encoder.cpp ++++ b/src/libx264encoder.cpp +@@ -20,6 +20,12 @@ extern "C" { + + #include "logging_record.h" + ++#ifndef AV_PROFILE_H264_BASELINE // ffmpeg before 8.0 ++#define AV_PROFILE_H264_BASELINE FF_PROFILE_H264_BASELINE ++#define AV_PROFILE_H264_MAIN FF_PROFILE_H264_MAIN ++#define AV_PROFILE_H264_HIGH FF_PROFILE_H264_HIGH ++#endif ++ + using namespace Qt::StringLiterals; + + LibX264Encoder::LibX264Encoder(H264Profile profile, PipeWireProduce *produce) +@@ -68,13 +74,13 @@ bool LibX264Encoder::initialize(const QSize &size) + + switch (m_profile) { + case H264Profile::Baseline: +- m_avCodecContext->profile = FF_PROFILE_H264_BASELINE; ++ m_avCodecContext->profile = AV_PROFILE_H264_BASELINE; + break; + case H264Profile::Main: +- m_avCodecContext->profile = FF_PROFILE_H264_MAIN; ++ m_avCodecContext->profile = AV_PROFILE_H264_MAIN; + break; + case H264Profile::High: +- m_avCodecContext->profile = FF_PROFILE_H264_HIGH; ++ m_avCodecContext->profile = AV_PROFILE_H264_HIGH; + break; + } + +-- +GitLab + |
