Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kpipewire6 for openSUSE:Factory checked in at 2025-09-29 21:11:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kpipewire6 (Old) and /work/SRC/openSUSE:Factory/.kpipewire6.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kpipewire6" Mon Sep 29 21:11:54 2025 rev:31 rq:1307468 version:6.4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/kpipewire6/kpipewire6.changes 2025-09-11 14:38:15.761062260 +0200 +++ /work/SRC/openSUSE:Factory/.kpipewire6.new.11973/kpipewire6.changes 2025-09-29 21:11:56.455199294 +0200 @@ -1,0 +2,5 @@ +Thu Sep 25 15:20:30 UTC 2025 - Bjørn Lie <[email protected]> + +- Add 0001-Fix-build-with-ffmpeg-8.0.patch: Fix build with ffmpeg 8.0 (boo#1249045). + +------------------------------------------------------------------- New: ---- 0001-Fix-build-with-ffmpeg-8.0.patch ----------(New B)---------- New: - Add 0001-Fix-build-with-ffmpeg-8.0.patch: Fix build with ffmpeg 8.0 (boo#1249045). ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kpipewire6.spec ++++++ --- /var/tmp/diff_new_pack.zaV3GZ/_old 2025-09-29 21:11:57.151228537 +0200 +++ /var/tmp/diff_new_pack.zaV3GZ/_new 2025-09-29 21:11:57.155228706 +0200 @@ -37,6 +37,8 @@ Source1: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig Source2: plasma.keyring %endif +# PATCH-FIX-UPSTREAM 0001-Fix-build-with-ffmpeg-8.0.patch -- Fix build with ffmpeg 8.0 +Patch0: 0001-Fix-build-with-ffmpeg-8.0.patch BuildRequires: kf6-extra-cmake-modules BuildRequires: pkgconfig BuildRequires: qt6-gui-private-devel >= %{qt6_version} ++++++ 0001-Fix-build-with-ffmpeg-8.0.patch ++++++ >From dee3f8d96e2abcf649b638784a1835b907711bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <[email protected]> Date: Wed, 27 Aug 2025 16:39:36 +0200 Subject: [PATCH] Fix build with ffmpeg >= 8.0 (amended to add a missing #define) --- src/h264vaapiencoder.cpp | 39 ++++++++++++++++++++++---------------- src/libopenh264encoder.cpp | 12 +++++++++--- src/libx264encoder.cpp | 12 +++++++++--- 3 files changed, 41 insertions(+), 22 deletions(-) diff --git a/src/h264vaapiencoder.cpp b/src/h264vaapiencoder.cpp index 0cf251b..75a99b8 100644 --- a/src/h264vaapiencoder.cpp +++ b/src/h264vaapiencoder.cpp @@ -18,13 +18,20 @@ extern "C" { #include "logging_record.h" -H264VAAPIEncoder::H264VAAPIEncoder(H264Profile profile, PipeWireProduce *produce) +#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 +#define AV_PROFILE_H264_CONSTRAINED_BASELINE FF_PROFILE_H264_CONSTRAINED_BASELINE +#endif + +H264VAAPIEncoder::H264VAAPIEncoder(H264Profile profile, PipeWireProduce* produce) : HardwareEncoder(produce) , m_profile(profile) { } -bool H264VAAPIEncoder::initialize(const QSize &size) +bool H264VAAPIEncoder::initialize(const QSize& size) { if (!createDrmContext(size)) { return false; @@ -37,11 +44,11 @@ bool H264VAAPIEncoder::initialize(const QSize &size) } int ret = avfilter_graph_create_filter(&m_inputFilter, - avfilter_get_by_name("buffer"), - "in", - "width=1:height=1:pix_fmt=drm_prime:time_base=1/1", - nullptr, - m_avFilterGraph); + avfilter_get_by_name("buffer"), + "in", + "width=1:height=1:pix_fmt=drm_prime:time_base=1/1", + nullptr, + m_avFilterGraph); if (ret < 0) { qCWarning(PIPEWIRERECORD_LOGGING) << "Failed to create the buffer filter"; return false; @@ -55,7 +62,7 @@ bool H264VAAPIEncoder::initialize(const QSize &size) parameters->format = AV_PIX_FMT_DRM_PRIME; parameters->width = size.width(); parameters->height = size.height(); - parameters->time_base = {1, 1000}; + parameters->time_base = { 1, 1000 }; parameters->hw_frames_ctx = m_drmFramesContext; av_buffersrc_parameters_set(m_inputFilter, parameters); @@ -120,7 +127,7 @@ bool H264VAAPIEncoder::initialize(const QSize &size) m_avCodecContext->max_b_frames = 0; m_avCodecContext->gop_size = 100; m_avCodecContext->pix_fmt = AV_PIX_FMT_VAAPI; - m_avCodecContext->time_base = AVRational{1, 1000}; + m_avCodecContext->time_base = AVRational { 1, 1000 }; if (m_quality) { m_avCodecContext->global_quality = percentageToAbsoluteQuality(m_quality); @@ -130,17 +137,17 @@ 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; } - AVDictionary *options = buildEncodingOptions(); + AVDictionary* options = buildEncodingOptions(); maybeLogOptions(options); // Assign the right hardware context for encoding frames. @@ -157,7 +164,7 @@ bool H264VAAPIEncoder::initialize(const QSize &size) return true; } -int H264VAAPIEncoder::percentageToAbsoluteQuality(const std::optional<quint8> &quality) +int H264VAAPIEncoder::percentageToAbsoluteQuality(const std::optional<quint8>& quality) { if (!quality) { return -1; @@ -167,9 +174,9 @@ int H264VAAPIEncoder::percentageToAbsoluteQuality(const std::optional<quint8> &q return std::max(1, int(MinQuality - (m_quality.value() / 100.0) * MinQuality)); } -AVDictionary *H264VAAPIEncoder::buildEncodingOptions() +AVDictionary* H264VAAPIEncoder::buildEncodingOptions() { - AVDictionary *options = HardwareEncoder::buildEncodingOptions(); + AVDictionary* options = HardwareEncoder::buildEncodingOptions(); // Disable motion estimation, not great while dragging windows but speeds up encoding by an order of magnitude av_dict_set(&options, "flags", "+mv4", 0); // Disable in-loop filtering 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; } -- 2.51.0
