[gambatte] Add missing include for zlib related funcs
by Mamoru Tasaka
commit 8743229e34a4a59be0fb45676023b3e4f33d837c
Author: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
Date: Fri Oct 11 00:15:59 2024 +0900
Add missing include for zlib related funcs
gambatte-537-minizip.patch | 3 ++-
gambatte.spec | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gambatte-537-minizip.patch b/gambatte-537-minizip.patch
index 6b00ae3..e268f29 100644
--- a/gambatte-537-minizip.patch
+++ b/gambatte-537-minizip.patch
@@ -15,12 +15,13 @@ diff -durN gambatte_src-r537.orig/libgambatte/SConstruct gambatte_src-r537/libga
diff -durN gambatte_src-r537.orig/libgambatte/src/file/file_zip.cpp gambatte_src-r537/libgambatte/src/file/file_zip.cpp
--- gambatte_src-r537.orig/libgambatte/src/file/file_zip.cpp 2013-06-01 16:43:58.000000000 +0200
+++ gambatte_src-r537/libgambatte/src/file/file_zip.cpp 2013-07-01 14:39:57.325515266 +0200
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,8 @@
#include <cstring>
namespace zlib {
-#include "unzip/unzip.h"
+#include <minizip/unzip.h>
++#include <zlib.h>
}
namespace {
diff --git a/gambatte.spec b/gambatte.spec
index b827d29..9472ea7 100644
--- a/gambatte.spec
+++ b/gambatte.spec
@@ -4,7 +4,7 @@
Name: gambatte
Version: 571
-Release: 20%{?dist}
+Release: 21%{?dist}
Summary: An accuracy-focused Game Boy / Game Boy Color emulator
License: GPLv2
@@ -198,6 +198,9 @@ convert %{SOURCE2} -resize x64 %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/
%changelog
+* Thu Oct 10 2024 Mamoru TASAKA <mtasaka(a)fedoraproject.org> - 571-21
+- Add missing include for zlib related funcs
+
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> - 571-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
1 month, 2 weeks
[ffmpeg] Disable DVD demuxer due to undefined symbols in libavformat
by Leigh Scott
commit d991a3a740902979744fb28d65c15a309aabd033
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Wed Oct 9 21:16:04 2024 +0100
Disable DVD demuxer due to undefined symbols in libavformat
ffmpeg.spec | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/ffmpeg.spec b/ffmpeg.spec
index 6100a06..83805b7 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -23,6 +23,8 @@
# Disable because of gcc issue
%global _without_lensfun 1
+# Disable due to undefined symbols in libavformat
+#global _with_dvddemuxer 1
%ifnarch i686
%global _with_bs2b 1
%global _with_codec2 1
@@ -101,7 +103,7 @@ ExclusiveArch: armv7hnl
Summary: Digital VCR and streaming server
Name: ffmpeg%{?flavor}
Version: 7.0.2
-Release: 3%{?dist}
+Release: 4%{?dist}
License: %{ffmpeg_license}
URL: https://ffmpeg.org/
%if 0%{?date}
@@ -144,8 +146,7 @@ BuildRequires: lcms2-devel
%{!?_without_aom:BuildRequires: libaom-devel}
%{!?_without_aribb24:BuildRequires: pkgconfig(aribb24) >= 1.0.3}
%{!?_without_dav1d:BuildRequires: libdav1d-devel}
-BuildRequires: libdvdnav-devel
-BuildRequires: libdvdread-devel
+%{?_with_dvddemuxer:BuildRequires: libdvdnav-devel libdvdread-devel}
%{!?_without_ass:BuildRequires: libass-devel}
%{!?_without_bluray:BuildRequires: libbluray-devel}
%{?_with_bs2b:BuildRequires: libbs2b-devel}
@@ -335,8 +336,7 @@ Freeworld libavcodec to complement the distro counterparts
%{!?_without_cdio:--enable-libcdio} \\\
%{?_with_ieee1394:--enable-libdc1394 --enable-libiec61883} \\\
--enable-libdrm \\\
- --enable-libdvdnav \\\
- --enable-libdvdread \\\
+ %{?_with_dvddemuxer:--enable-libdvdnav --enable-libdvdread} \\\
%{?_with_faac:--enable-libfaac --enable-nonfree} \\\
%{?_with_fdk_aac:--enable-libfdk-aac --enable-nonfree} \\\
%{?_with_flite:--enable-libflite} \\\
@@ -540,6 +540,9 @@ cp -pa %{buildroot}%{_libdir}/libavcodec.so.* \
%changelog
+* Wed Oct 09 2024 Leigh Scott <leigh123linux(a)gmail.com> - 7.0.2-4
+- Disable DVD demuxer due to undefined symbols in libavformat
+
* Mon Oct 07 2024 Nicolas Chauvet <kwizart(a)gmail.com> - 7.0.2-3
- Sync with fedora deps:
Enable Kernel Labs VANC processing and ARIB text/caption decoding
1 month, 2 weeks
[unifi/el8] Update to 8.4.62.
by Richard Shaw
Summary of changes:
9fdad36... Update to 8.4.62. (*)
(*) This commit already existed in another branch; no separate mail sent
1 month, 2 weeks
[unifi/el9] Update to 8.4.62.
by Richard Shaw
Summary of changes:
9fdad36... Update to 8.4.62. (*)
(*) This commit already existed in another branch; no separate mail sent
1 month, 2 weeks
[unifi/f40] Update to 8.4.62.
by Richard Shaw
Summary of changes:
9fdad36... Update to 8.4.62. (*)
(*) This commit already existed in another branch; no separate mail sent
1 month, 2 weeks
[unifi/f41] Update to 8.4.62.
by Richard Shaw
Summary of changes:
9fdad36... Update to 8.4.62. (*)
(*) This commit already existed in another branch; no separate mail sent
1 month, 2 weeks
[obs-studio-freeworld] Update to 31.0.0~beta1
by Dominik Mierzejewski
commit 373c8ee26631e674e361c23c6528ebda2e37c5cc
Author: Dominik 'Rathann' Mierzejewski <dominik(a)greysector.net>
Date: Wed Oct 9 10:04:09 2024 +0200
Update to 31.0.0~beta1
- Sync spec and patches with Fedora
...ntly-reference-the-software-H264-encoder-.patch | 52 ++--
...Add-initial-support-for-the-OpenH264-H.26.patch | 101 +++-----
...ort-for-OpenH264-as-the-worst-case-fallba.patch | 269 +++++++++------------
11345.patch | 59 +++++
obs-studio-UI-use-fdk-aac-by-default.patch | 38 +--
obs-studio-fix-incompatible-pointer-type.patch | 23 +-
obs-studio-freeworld.spec | 61 +++--
sources | 4 +-
8 files changed, 307 insertions(+), 300 deletions(-)
---
diff --git a/0101-UI-Consistently-reference-the-software-H264-encoder-.patch b/0101-UI-Consistently-reference-the-software-H264-encoder-.patch
index 12a6aca..e57689d 100644
--- a/0101-UI-Consistently-reference-the-software-H264-encoder-.patch
+++ b/0101-UI-Consistently-reference-the-software-H264-encoder-.patch
@@ -1,4 +1,4 @@
-From e46d94eaa176c5c83ae9e8ab046cfde7d218d3ca Mon Sep 17 00:00:00 2001
+From d5e19a139c7bb5eb2b5012d7136f363510e2fe9a Mon Sep 17 00:00:00 2001
From: Neal Gompa <neal(a)gompa.dev>
Date: Sat, 7 Jan 2023 23:15:13 -0500
Subject: [PATCH 101/103] UI: Consistently reference the software H264 encoder
@@ -11,14 +11,14 @@ the encoder string to indicate that it's an H.264 encoder from x264.
UI/data/locale/en-US.ini | 4 ++--
UI/window-basic-auto-config-test.cpp | 6 +++---
UI/window-basic-settings-stream.cpp | 2 +-
- UI/window-basic-settings.cpp | 7 ++++---
- 4 files changed, 10 insertions(+), 9 deletions(-)
+ UI/window-basic-settings.cpp | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/UI/data/locale/en-US.ini b/UI/data/locale/en-US.ini
-index b3303340c..095c2b4df 100644
+index 2f15c5abd..29e752896 100644
--- a/UI/data/locale/en-US.ini
+++ b/UI/data/locale/en-US.ini
-@@ -1023,7 +1023,7 @@ Basic.Settings.Output.Simple.Warn.Encoder="Warning: Recording with a software en
+@@ -1034,7 +1034,7 @@ Basic.Settings.Output.Simple.Warn.Encoder="Warning: Recording with a software en
Basic.Settings.Output.Simple.Warn.Lossless="Warning: Lossless quality generates tremendously large file sizes! Lossless quality can use upward of 7 gigabytes of disk space per minute at high resolutions and framerates. Lossless is not recommended for long recordings unless you have a very large amount of disk space available. Replay buffer is unavailable when using lossless quality."
Basic.Settings.Output.Simple.Warn.Lossless.Msg="Are you sure you want to use lossless quality?"
Basic.Settings.Output.Simple.Warn.Lossless.Title="Lossless quality warning!"
@@ -27,7 +27,7 @@ index b3303340c..095c2b4df 100644
Basic.Settings.Output.Simple.Encoder.Hardware.QSV.H264="Hardware (QSV, H.264)"
Basic.Settings.Output.Simple.Encoder.Hardware.QSV.AV1="Hardware (QSV, AV1)"
Basic.Settings.Output.Simple.Encoder.Hardware.AMD.H264="Hardware (AMD, H.264)"
-@@ -1034,7 +1034,7 @@ Basic.Settings.Output.Simple.Encoder.Hardware.NVENC.AV1="Hardware (NVENC, AV1)"
+@@ -1045,7 +1045,7 @@ Basic.Settings.Output.Simple.Encoder.Hardware.NVENC.AV1="Hardware (NVENC, AV1)"
Basic.Settings.Output.Simple.Encoder.Hardware.NVENC.HEVC="Hardware (NVENC, HEVC)"
Basic.Settings.Output.Simple.Encoder.Hardware.Apple.H264="Hardware (Apple, H.264)"
Basic.Settings.Output.Simple.Encoder.Hardware.Apple.HEVC="Hardware (Apple, HEVC)"
@@ -37,10 +37,10 @@ index b3303340c..095c2b4df 100644
Basic.Settings.Output.Simple.Codec.AAC.Default="AAC (Default)"
Basic.Settings.Output.Simple.Codec.Opus="Opus"
diff --git a/UI/window-basic-auto-config-test.cpp b/UI/window-basic-auto-config-test.cpp
-index 904875783..cecb5f9bf 100644
+index b53f37aa2..d941e6f68 100644
--- a/UI/window-basic-auto-config-test.cpp
+++ b/UI/window-basic-auto-config-test.cpp
-@@ -1047,7 +1047,7 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
+@@ -981,7 +981,7 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
}
#define ENCODER_TEXT(x) "Basic.Settings.Output.Simple.Encoder." x
@@ -49,7 +49,7 @@ index 904875783..cecb5f9bf 100644
#define ENCODER_NVENC ENCODER_TEXT("Hardware.NVENC.H264")
#define ENCODER_QSV ENCODER_TEXT("Hardware.QSV.H264")
#define ENCODER_AMD ENCODER_TEXT("Hardware.AMD.H264")
-@@ -1087,7 +1087,7 @@ void AutoConfigTestPage::FinalizeResults()
+@@ -1020,7 +1020,7 @@ void AutoConfigTestPage::FinalizeResults()
auto encName = [](AutoConfig::Encoder enc) -> QString {
switch (enc) {
case AutoConfig::Encoder::x264:
@@ -58,7 +58,7 @@ index 904875783..cecb5f9bf 100644
case AutoConfig::Encoder::NVENC:
return QTStr(ENCODER_NVENC);
case AutoConfig::Encoder::QSV:
-@@ -1100,7 +1100,7 @@ void AutoConfigTestPage::FinalizeResults()
+@@ -1033,7 +1033,7 @@ void AutoConfigTestPage::FinalizeResults()
return QTStr(QUALITY_SAME);
}
@@ -68,37 +68,33 @@ index 904875783..cecb5f9bf 100644
auto newLabel = [this](const char *str) -> QLabel * {
diff --git a/UI/window-basic-settings-stream.cpp b/UI/window-basic-settings-stream.cpp
-index 881e1d542..cd78d4c8a 100644
+index 885c49f8a..7296d7328 100644
--- a/UI/window-basic-settings-stream.cpp
+++ b/UI/window-basic-settings-stream.cpp
-@@ -1850,7 +1850,7 @@ void OBSBasicSettings::ResetEncoders(bool streamOnly)
+@@ -1663,7 +1663,7 @@ void OBSBasicSettings::ResetEncoders(bool streamOnly)
#define ENCODER_STR(str) QTStr("Basic.Settings.Output.Simple.Encoder." str)
-- ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software"),
-+ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.X264.H264"),
- QString(SIMPLE_ENCODER_X264));
+- ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software"), QString(SIMPLE_ENCODER_X264));
++ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.X264.H264"), QString(SIMPLE_ENCODER_X264));
#ifdef _WIN32
if (service_supports_encoder(vcodecs, "obs_qsv11"))
+ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Hardware.QSV.H264"), QString(SIMPLE_ENCODER_QSV));
diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp
-index dfcd2dd65..2aa92203c 100644
+index f4efc3e61..1c77f804b 100644
--- a/UI/window-basic-settings.cpp
+++ b/UI/window-basic-settings.cpp
-@@ -5338,10 +5338,11 @@ void OBSBasicSettings::FillSimpleRecordingValues()
+@@ -4735,8 +4735,8 @@ void OBSBasicSettings::FillSimpleRecordingValues()
ADD_QUALITY("HQ");
ADD_QUALITY("Lossless");
-- ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software"),
-+ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.X264.H264"),
- QString(SIMPLE_ENCODER_X264));
-- ui->simpleOutRecEncoder->addItem(ENCODER_STR("SoftwareLowCPU"),
-- QString(SIMPLE_ENCODER_X264_LOWCPU));
-+ ui->simpleOutRecEncoder->addItem(
-+ ENCODER_STR("SoftwareLowCPU.X264.H264"),
-+ QString(SIMPLE_ENCODER_X264_LOWCPU));
+- ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software"), QString(SIMPLE_ENCODER_X264));
+- ui->simpleOutRecEncoder->addItem(ENCODER_STR("SoftwareLowCPU"), QString(SIMPLE_ENCODER_X264_LOWCPU));
++ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.X264.H264"), QString(SIMPLE_ENCODER_X264));
++ ui->simpleOutRecEncoder->addItem(ENCODER_STR("SoftwareLowCPU.X264.H264"), QString(SIMPLE_ENCODER_X264_LOWCPU));
if (EncoderAvailable("obs_qsv11"))
- ui->simpleOutRecEncoder->addItem(
- ENCODER_STR("Hardware.QSV.H264"),
+ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Hardware.QSV.H264"), QString(SIMPLE_ENCODER_QSV));
+ if (EncoderAvailable("obs_qsv11_av1"))
--
-2.45.2
+2.46.2
diff --git a/0102-obs-ffmpeg-Add-initial-support-for-the-OpenH264-H.26.patch b/0102-obs-ffmpeg-Add-initial-support-for-the-OpenH264-H.26.patch
index 39d4ab0..0058e8a 100644
--- a/0102-obs-ffmpeg-Add-initial-support-for-the-OpenH264-H.26.patch
+++ b/0102-obs-ffmpeg-Add-initial-support-for-the-OpenH264-H.26.patch
@@ -1,4 +1,4 @@
-From 26c2915af0b4cd707d7dbbf7b579eca3c520852f Mon Sep 17 00:00:00 2001
+From 87b3a2fd70e7f5bd715cc7e81ba260cc9f207a6d Mon Sep 17 00:00:00 2001
From: Neal Gompa <neal(a)gompa.dev>
Date: Sun, 26 Mar 2023 06:06:31 -0400
Subject: [PATCH 102/103] obs-ffmpeg: Add initial support for the OpenH264
@@ -12,37 +12,24 @@ This also provides a framework for adding support for other H.264
software codecs provided through FFmpeg.
---
plugins/obs-ffmpeg/CMakeLists.txt | 1 +
- plugins/obs-ffmpeg/cmake/legacy.cmake | 1 +
plugins/obs-ffmpeg/data/locale/en-US.ini | 3 +
- plugins/obs-ffmpeg/obs-ffmpeg-h264.c | 260 +++++++++++++++++++++++
+ plugins/obs-ffmpeg/obs-ffmpeg-h264.c | 244 +++++++++++++++++++++++
plugins/obs-ffmpeg/obs-ffmpeg.c | 2 +
- 5 files changed, 267 insertions(+)
+ 4 files changed, 250 insertions(+)
create mode 100644 plugins/obs-ffmpeg/obs-ffmpeg-h264.c
diff --git a/plugins/obs-ffmpeg/CMakeLists.txt b/plugins/obs-ffmpeg/CMakeLists.txt
-index 4a928c82c..c4dcb17a5 100644
+index 6bc0ab087..35b8c0c40 100644
--- a/plugins/obs-ffmpeg/CMakeLists.txt
+++ b/plugins/obs-ffmpeg/CMakeLists.txt
-@@ -33,6 +33,7 @@ target_sources(
- obs-ffmpeg-av1.c
- obs-ffmpeg-compat.h
- obs-ffmpeg-formats.h
-+ obs-ffmpeg-h264.c
- obs-ffmpeg-hls-mux.c
- obs-ffmpeg-mux.c
- obs-ffmpeg-mux.h
-diff --git a/plugins/obs-ffmpeg/cmake/legacy.cmake b/plugins/obs-ffmpeg/cmake/legacy.cmake
-index 558a34df6..2a3b9d29b 100644
---- a/plugins/obs-ffmpeg/cmake/legacy.cmake
-+++ b/plugins/obs-ffmpeg/cmake/legacy.cmake
-@@ -41,6 +41,7 @@ target_sources(
- obs-ffmpeg-video-encoders.c
- obs-ffmpeg-audio-encoders.c
- obs-ffmpeg-av1.c
-+ obs-ffmpeg-h264.c
- obs-ffmpeg-nvenc.c
- obs-ffmpeg-output.c
- obs-ffmpeg-output.h
+@@ -32,6 +32,7 @@ target_sources(
+ obs-ffmpeg-av1.c
+ obs-ffmpeg-compat.h
+ obs-ffmpeg-formats.h
++ obs-ffmpeg-h264.c
+ obs-ffmpeg-hls-mux.c
+ obs-ffmpeg-mux.c
+ obs-ffmpeg-mux.h
diff --git a/plugins/obs-ffmpeg/data/locale/en-US.ini b/plugins/obs-ffmpeg/data/locale/en-US.ini
index e8b73293c..c69d3475f 100644
--- a/plugins/obs-ffmpeg/data/locale/en-US.ini
@@ -57,10 +44,10 @@ index e8b73293c..c69d3475f 100644
ReconnectDelayTime="Reconnect Delay"
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-h264.c b/plugins/obs-ffmpeg/obs-ffmpeg-h264.c
new file mode 100644
-index 000000000..179a61ccf
+index 000000000..7ed1cd209
--- /dev/null
+++ b/plugins/obs-ffmpeg/obs-ffmpeg-h264.c
-@@ -0,0 +1,260 @@
+@@ -0,0 +1,244 @@
+/******************************************************************************
+ Copyright (C) 2023 by Neal Gompa <neal(a)gompa.dev>
+ Partly derived from obs-ffmpeg-av1.c by Hugh Bailey <obs.jim(a)gmail.com>
@@ -81,9 +68,8 @@ index 000000000..179a61ccf
+
+#include "obs-ffmpeg-video-encoders.h"
+
-+#define do_log(level, format, ...) \
-+ blog(level, "[H.264 encoder: '%s'] " format, \
-+ obs_encoder_get_name(enc->ffve.encoder), ##__VA_ARGS__)
++#define do_log(level, format, ...) \
++ blog(level, "[H.264 encoder: '%s'] " format, obs_encoder_get_name(enc->ffve.encoder), ##__VA_ARGS__)
+
+#define error(format, ...) do_log(LOG_ERROR, format, ##__VA_ARGS__)
+#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
@@ -137,12 +123,10 @@ index 000000000..179a61ccf
+
+ av_opt_set(enc->ffve.context->priv_data, "rc_mode", rc_mode, 0);
+ av_opt_set(enc->ffve.context->priv_data, "profile", profile, 0);
-+ av_opt_set_int(enc->ffve.context->priv_data, "allow_skip_frames",
-+ allow_skip_frames, 0);
++ av_opt_set_int(enc->ffve.context->priv_data, "allow_skip_frames", allow_skip_frames, 0);
+
+ const char *ffmpeg_opts = obs_data_get_string(settings, "ffmpeg_opts");
-+ ffmpeg_video_encoder_update(&enc->ffve, bitrate, keyint_sec, voi, &info,
-+ ffmpeg_opts);
++ ffmpeg_video_encoder_update(&enc->ffve, bitrate, keyint_sec, voi, &info, ffmpeg_opts);
+ info("settings:\n"
+ "\tencoder: %s\n"
+ "\trc_mode: %s\n"
@@ -151,8 +135,7 @@ index 000000000..179a61ccf
+ "\twidth: %d\n"
+ "\theight: %d\n"
+ "\tffmpeg opts: %s\n",
-+ enc->ffve.enc_name, rc_mode, bitrate, profile,
-+ enc->ffve.context->width, enc->ffve.height, ffmpeg_opts);
++ enc->ffve.enc_name, rc_mode, bitrate, profile, enc->ffve.context->width, enc->ffve.height, ffmpeg_opts);
+
+ enc->ffve.context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ return ffmpeg_video_encoder_init_codec(&enc->ffve);
@@ -171,14 +154,13 @@ index 000000000..179a61ccf
+{
+ struct h264_encoder *enc = data;
+
-+ da_copy_array(enc->header, enc->ffve.context->extradata,
-+ enc->ffve.context->extradata_size);
++ da_copy_array(enc->header, enc->ffve.context->extradata, enc->ffve.context->extradata_size);
+
+ darray_copy_array(1, da, pkt->data, pkt->size);
+}
+
-+static void *h264_create_internal(obs_data_t *settings, obs_encoder_t *encoder,
-+ const char *enc_lib, const char *enc_name)
++static void *h264_create_internal(obs_data_t *settings, obs_encoder_t *encoder, const char *enc_lib,
++ const char *enc_name)
+{
+ video_t *video = obs_encoder_video(encoder);
+ const struct video_output_info *voi = video_output_get_info(video);
@@ -211,8 +193,7 @@ index 000000000..179a61ccf
+ case VIDEO_FORMAT_AYUV:
+ break;
+ default:; // Make the compiler do the right thing
-+ const char *const text =
-+ obs_module_text("H264.UnsupportedVideoFormat");
++ const char *const text = obs_module_text("H264.UnsupportedVideoFormat");
+ obs_encoder_set_last_error(encoder, text);
+ blog(LOG_ERROR, "[H.264 encoder] %s", text);
+ return NULL;
@@ -223,8 +204,7 @@ index 000000000..179a61ccf
+ case VIDEO_CS_709:
+ break;
+ default:; // Make the compiler do the right thing
-+ const char *const text =
-+ obs_module_text("H264.UnsupportedColorSpace");
++ const char *const text = obs_module_text("H264.UnsupportedColorSpace");
+ obs_encoder_set_last_error(encoder, text);
+ blog(LOG_ERROR, "[H.264 encoder] %s", text);
+ return NULL;
@@ -235,8 +215,7 @@ index 000000000..179a61ccf
+ if (strcmp(enc_lib, "libopenh264") == 0)
+ enc->type = H264_ENCODER_TYPE_OH264;
+
-+ if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder, enc_lib, NULL,
-+ enc_name, NULL, on_first_packet))
++ if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder, enc_lib, NULL, enc_name, NULL, on_first_packet))
+ goto fail;
+ if (!h264_update(enc, settings))
+ goto fail;
@@ -250,12 +229,10 @@ index 000000000..179a61ccf
+
+static void *oh264_create(obs_data_t *settings, obs_encoder_t *encoder)
+{
-+ return h264_create_internal(settings, encoder, "libopenh264",
-+ "OpenH264");
++ return h264_create_internal(settings, encoder, "libopenh264", "OpenH264");
+}
+
-+static bool h264_encode(void *data, struct encoder_frame *frame,
-+ struct encoder_packet *packet, bool *received_packet)
++static bool h264_encode(void *data, struct encoder_frame *frame, struct encoder_packet *packet, bool *received_packet)
+{
+ struct h264_encoder *enc = data;
+ return ffmpeg_video_encode(&enc->ffve, frame, packet, received_packet);
@@ -273,22 +250,16 @@ index 000000000..179a61ccf
+ obs_properties_t *props = obs_properties_create();
+ obs_property_t *p;
+
-+ p = obs_properties_add_list(props, "profile",
-+ obs_module_text("Profile"),
-+ OBS_COMBO_TYPE_LIST,
++ p = obs_properties_add_list(props, "profile", obs_module_text("Profile"), OBS_COMBO_TYPE_LIST,
+ OBS_COMBO_FORMAT_STRING);
-+ obs_property_list_add_string(p, "constrained_baseline",
-+ "constrained_baseline");
++ obs_property_list_add_string(p, "constrained_baseline", "constrained_baseline");
+ obs_property_list_add_string(p, "main", "main");
+ obs_property_list_add_string(p, "high", "high");
+
-+ p = obs_properties_add_int(props, "bitrate", obs_module_text("Bitrate"),
-+ 50, 300000, 50);
++ p = obs_properties_add_int(props, "bitrate", obs_module_text("Bitrate"), 50, 300000, 50);
+ obs_property_int_set_suffix(p, " Kbps");
+
-+ obs_properties_add_text(props, "ffmpeg_opts",
-+ obs_module_text("FFmpegOpts"),
-+ OBS_TEXT_DEFAULT);
++ obs_properties_add_text(props, "ffmpeg_opts", obs_module_text("FFmpegOpts"), OBS_TEXT_DEFAULT);
+
+ return props;
+}
@@ -322,18 +293,18 @@ index 000000000..179a61ccf
+ .get_video_info = h264_video_info,
+};
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c
-index c20281f63..118468c94 100644
+index df631a672..ac8423e90 100644
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c
-@@ -41,6 +41,7 @@ extern struct obs_encoder_info pcm24_encoder_info;
+@@ -35,6 +35,7 @@ extern struct obs_encoder_info pcm24_encoder_info;
extern struct obs_encoder_info pcm32_encoder_info;
extern struct obs_encoder_info alac_encoder_info;
extern struct obs_encoder_info flac_encoder_info;
+extern struct obs_encoder_info oh264_encoder_info;
+ #ifdef ENABLE_FFMPEG_NVENC
extern struct obs_encoder_info h264_nvenc_encoder_info;
#ifdef ENABLE_HEVC
- extern struct obs_encoder_info hevc_nvenc_encoder_info;
-@@ -367,6 +368,7 @@ bool obs_module_load(void)
+@@ -349,6 +350,7 @@ bool obs_module_load(void)
obs_register_output(&ffmpeg_hls_muxer);
obs_register_output(&replay_buffer);
obs_register_encoder(&aac_encoder_info);
@@ -342,5 +313,5 @@ index c20281f63..118468c94 100644
register_encoder_if_available(&aom_av1_encoder_info, "libaom-av1");
obs_register_encoder(&opus_encoder_info);
--
-2.45.2
+2.46.2
diff --git a/0103-UI-Add-support-for-OpenH264-as-the-worst-case-fallba.patch b/0103-UI-Add-support-for-OpenH264-as-the-worst-case-fallba.patch
index 196505f..6efd2b5 100644
--- a/0103-UI-Add-support-for-OpenH264-as-the-worst-case-fallba.patch
+++ b/0103-UI-Add-support-for-OpenH264-as-the-worst-case-fallba.patch
@@ -1,4 +1,4 @@
-From fc24ed0b22ad1487df277af35d62f5b77b9fbfad Mon Sep 17 00:00:00 2001
+From 2cabb9f3399cece71265c0ce74fca1aafc9dc46c Mon Sep 17 00:00:00 2001
From: Neal Gompa <neal(a)gompa.dev>
Date: Tue, 28 Mar 2023 05:08:49 -0400
Subject: [PATCH 103/103] UI: Add support for OpenH264 as the worst-case
@@ -9,22 +9,22 @@ such that it is only used as the software codec if x264 is not
available.
---
UI/data/locale/en-US.ini | 1 +
- UI/window-basic-auto-config-test.cpp | 50 +++++++++++++++++++---------
- UI/window-basic-auto-config.cpp | 15 ++++++++-
+ UI/window-basic-auto-config-test.cpp | 46 +++++++++++++++++++---------
+ UI/window-basic-auto-config.cpp | 16 +++++++++-
UI/window-basic-auto-config.hpp | 3 ++
UI/window-basic-main-outputs.cpp | 6 ++--
- UI/window-basic-main-profiles.cpp | 34 +++++++++++--------
- UI/window-basic-main.cpp | 20 +++++++----
+ UI/window-basic-main-profiles.cpp | 31 +++++++++++--------
+ UI/window-basic-main.cpp | 15 ++++++---
UI/window-basic-main.hpp | 3 +-
- UI/window-basic-settings-stream.cpp | 16 ++++++---
- UI/window-basic-settings.cpp | 23 ++++++++++---
- 10 files changed, 123 insertions(+), 48 deletions(-)
+ UI/window-basic-settings-stream.cpp | 12 ++++++--
+ UI/window-basic-settings.cpp | 16 ++++++++--
+ 10 files changed, 108 insertions(+), 41 deletions(-)
diff --git a/UI/data/locale/en-US.ini b/UI/data/locale/en-US.ini
-index 095c2b4df..d47765b16 100644
+index 29e752896..b22bae9c5 100644
--- a/UI/data/locale/en-US.ini
+++ b/UI/data/locale/en-US.ini
-@@ -1023,6 +1023,7 @@ Basic.Settings.Output.Simple.Warn.Encoder="Warning: Recording with a software en
+@@ -1034,6 +1034,7 @@ Basic.Settings.Output.Simple.Warn.Encoder="Warning: Recording with a software en
Basic.Settings.Output.Simple.Warn.Lossless="Warning: Lossless quality generates tremendously large file sizes! Lossless quality can use upward of 7 gigabytes of disk space per minute at high resolutions and framerates. Lossless is not recommended for long recordings unless you have a very large amount of disk space available. Replay buffer is unavailable when using lossless quality."
Basic.Settings.Output.Simple.Warn.Lossless.Msg="Are you sure you want to use lossless quality?"
Basic.Settings.Output.Simple.Warn.Lossless.Title="Lossless quality warning!"
@@ -33,20 +33,20 @@ index 095c2b4df..d47765b16 100644
Basic.Settings.Output.Simple.Encoder.Hardware.QSV.H264="Hardware (QSV, H.264)"
Basic.Settings.Output.Simple.Encoder.Hardware.QSV.AV1="Hardware (QSV, AV1)"
diff --git a/UI/window-basic-auto-config-test.cpp b/UI/window-basic-auto-config-test.cpp
-index cecb5f9bf..0d1e20d4f 100644
+index d941e6f68..5b5051919 100644
--- a/UI/window-basic-auto-config-test.cpp
+++ b/UI/window-basic-auto-config-test.cpp
-@@ -199,7 +199,8 @@ void AutoConfigTestPage::TestBandwidthThread()
- : "rtmp_common";
-
- OBSEncoderAutoRelease vencoder = obs_video_encoder_create(
-- "obs_x264", "test_x264", nullptr, nullptr);
-+ (wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
-+ "test_h264", nullptr, nullptr);
- OBSEncoderAutoRelease aencoder = obs_audio_encoder_create(
- "ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
- OBSServiceAutoRelease service = obs_service_create(
-@@ -238,10 +239,11 @@ void AutoConfigTestPage::TestBandwidthThread()
+@@ -192,7 +192,8 @@ void AutoConfigTestPage::TestBandwidthThread()
+
+ const char *serverType = wiz->customServer ? "rtmp_custom" : "rtmp_common";
+
+- OBSEncoderAutoRelease vencoder = obs_video_encoder_create("obs_x264", "test_x264", nullptr, nullptr);
++ OBSEncoderAutoRelease vencoder = obs_video_encoder_create((wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
++ "test_h264", nullptr, nullptr);
+ OBSEncoderAutoRelease aencoder = obs_audio_encoder_create("ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
+ OBSServiceAutoRelease service = obs_service_create(serverType, "test_service", nullptr, nullptr);
+
+@@ -224,10 +225,11 @@ void AutoConfigTestPage::TestBandwidthThread()
obs_data_set_string(service_settings, "key", key.c_str());
obs_data_set_int(vencoder_settings, "bitrate", wiz->startingBitrate);
@@ -62,30 +62,27 @@ index cecb5f9bf..0d1e20d4f 100644
obs_data_set_int(aencoder_settings, "bitrate", 32);
OBSBasic *main = reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
-@@ -607,7 +609,8 @@ bool AutoConfigTestPage::TestSoftwareEncoding()
+@@ -555,7 +557,8 @@ bool AutoConfigTestPage::TestSoftwareEncoding()
+ /* -----------------------------------*/
/* create obs objects */
- OBSEncoderAutoRelease vencoder = obs_video_encoder_create(
-- "obs_x264", "test_x264", nullptr, nullptr);
-+ (wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
-+ "test_h264", nullptr, nullptr);
- OBSEncoderAutoRelease aencoder = obs_audio_encoder_create(
- "ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
- OBSOutputAutoRelease output =
-@@ -621,17 +624,25 @@ bool AutoConfigTestPage::TestSoftwareEncoding()
+- OBSEncoderAutoRelease vencoder = obs_video_encoder_create("obs_x264", "test_x264", nullptr, nullptr);
++ OBSEncoderAutoRelease vencoder = obs_video_encoder_create((wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
++ "test_h264", nullptr, nullptr);
+ OBSEncoderAutoRelease aencoder = obs_audio_encoder_create("ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
+ OBSOutputAutoRelease output = obs_output_create("null_output", "null", nullptr, nullptr);
+
+@@ -567,16 +570,20 @@ bool AutoConfigTestPage::TestSoftwareEncoding()
obs_data_set_int(aencoder_settings, "bitrate", 32);
if (wiz->type != AutoConfig::Type::Recording) {
- obs_data_set_int(vencoder_settings, "keyint_sec", 2);
+ if (wiz->x264Available) {
+ obs_data_set_int(vencoder_settings, "keyint_sec", 2);
-+ obs_data_set_string(vencoder_settings, "rate_control",
-+ "CBR");
-+ obs_data_set_string(vencoder_settings, "preset",
-+ "veryfast");
++ obs_data_set_string(vencoder_settings, "rate_control", "CBR");
++ obs_data_set_string(vencoder_settings, "preset", "veryfast");
+ }
- obs_data_set_int(vencoder_settings, "bitrate",
- wiz->idealBitrate);
+ obs_data_set_int(vencoder_settings, "bitrate", wiz->idealBitrate);
- obs_data_set_string(vencoder_settings, "rate_control", "CBR");
obs_data_set_string(vencoder_settings, "profile", "main");
- obs_data_set_string(vencoder_settings, "preset", "veryfast");
@@ -94,17 +91,15 @@ index cecb5f9bf..0d1e20d4f 100644
- obs_data_set_string(vencoder_settings, "rate_control", "CRF");
+ if (wiz->x264Available) {
+ obs_data_set_int(vencoder_settings, "crf", 20);
-+ obs_data_set_string(vencoder_settings, "rate_control",
-+ "CRF");
-+ obs_data_set_string(vencoder_settings, "preset",
-+ "veryfast");
++ obs_data_set_string(vencoder_settings, "rate_control", "CRF");
++ obs_data_set_string(vencoder_settings, "preset", "veryfast");
+ }
obs_data_set_string(vencoder_settings, "profile", "high");
- obs_data_set_string(vencoder_settings, "preset", "veryfast");
}
/* -----------------------------------*/
-@@ -988,7 +999,10 @@ void AutoConfigTestPage::TestStreamEncoderThread()
+@@ -923,7 +930,10 @@ void AutoConfigTestPage::TestStreamEncoderThread()
else
wiz->streamingEncoder = AutoConfig::Encoder::AMD;
} else {
@@ -116,7 +111,7 @@ index cecb5f9bf..0d1e20d4f 100644
}
#ifdef __linux__
-@@ -1033,7 +1047,10 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
+@@ -967,7 +977,10 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
else
wiz->recordingEncoder = AutoConfig::Encoder::AMD;
} else {
@@ -128,7 +123,7 @@ index cecb5f9bf..0d1e20d4f 100644
}
if (wiz->recordingEncoder != AutoConfig::Encoder::NVENC) {
-@@ -1047,6 +1064,7 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
+@@ -981,6 +994,7 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
}
#define ENCODER_TEXT(x) "Basic.Settings.Output.Simple.Encoder." x
@@ -136,7 +131,7 @@ index cecb5f9bf..0d1e20d4f 100644
#define ENCODER_X264 ENCODER_TEXT("Software.X264.H264")
#define ENCODER_NVENC ENCODER_TEXT("Hardware.NVENC.H264")
#define ENCODER_QSV ENCODER_TEXT("Hardware.QSV.H264")
-@@ -1086,6 +1104,8 @@ void AutoConfigTestPage::FinalizeResults()
+@@ -1019,6 +1033,8 @@ void AutoConfigTestPage::FinalizeResults()
auto encName = [](AutoConfig::Encoder enc) -> QString {
switch (enc) {
@@ -145,7 +140,7 @@ index cecb5f9bf..0d1e20d4f 100644
case AutoConfig::Encoder::x264:
return QTStr(ENCODER_X264);
case AutoConfig::Encoder::NVENC:
-@@ -1100,7 +1120,7 @@ void AutoConfigTestPage::FinalizeResults()
+@@ -1033,7 +1049,7 @@ void AutoConfigTestPage::FinalizeResults()
return QTStr(QUALITY_SAME);
}
@@ -155,18 +150,19 @@ index cecb5f9bf..0d1e20d4f 100644
auto newLabel = [this](const char *str) -> QLabel * {
diff --git a/UI/window-basic-auto-config.cpp b/UI/window-basic-auto-config.cpp
-index 243dce972..22cb399f3 100644
+index eaed589ae..1c6035566 100644
--- a/UI/window-basic-auto-config.cpp
+++ b/UI/window-basic-auto-config.cpp
-@@ -1122,6 +1122,7 @@ AutoConfig::AutoConfig(QWidget *parent) : QWizard(parent)
- streamPage->ui->key->setText(key.c_str());
+@@ -1055,6 +1055,8 @@ AutoConfig::AutoConfig(QWidget *parent) : QWizard(parent)
+ streamPage->ui->useMultitrackVideo->setChecked(hardwareEncodingAvailable && multitrackVideoEnabled);
+ streamPage->ServiceChanged();
- TestHardwareEncoding();
+ TestSoftwareEncoding();
-
- int bitrate =
- config_get_int(main->Config(), "SimpleOutput", "VBitrate");
-@@ -1163,6 +1164,16 @@ AutoConfig::~AutoConfig()
++ TestHardwareEncoding();
+ if (!hardwareEncodingAvailable) {
+ delete streamPage->ui->preferHardware;
+ streamPage->ui->preferHardware = nullptr;
+@@ -1080,6 +1082,16 @@ AutoConfig::~AutoConfig()
EnableThreadedMessageBoxes(false);
}
@@ -183,7 +179,7 @@ index 243dce972..22cb399f3 100644
void AutoConfig::TestHardwareEncoding()
{
size_t idx = 0;
-@@ -1242,8 +1253,10 @@ inline const char *AutoConfig::GetEncoderId(Encoder enc)
+@@ -1155,8 +1167,10 @@ inline const char *AutoConfig::GetEncoderId(Encoder enc)
return SIMPLE_ENCODER_AMD;
case Encoder::Apple:
return SIMPLE_ENCODER_APPLE_H264;
@@ -196,10 +192,10 @@ index 243dce972..22cb399f3 100644
};
diff --git a/UI/window-basic-auto-config.hpp b/UI/window-basic-auto-config.hpp
-index 2f93c540b..805c3836d 100644
+index 7e31bdf89..a97545153 100644
--- a/UI/window-basic-auto-config.hpp
+++ b/UI/window-basic-auto-config.hpp
-@@ -44,6 +44,7 @@ class AutoConfig : public QWizard {
+@@ -45,6 +45,7 @@ class AutoConfig : public QWizard {
};
enum class Encoder {
@@ -207,7 +203,7 @@ index 2f93c540b..805c3836d 100644
x264,
NVENC,
QSV,
-@@ -103,6 +104,7 @@ class AutoConfig : public QWizard {
+@@ -104,6 +105,7 @@ class AutoConfig : public QWizard {
bool qsvAvailable = false;
bool vceAvailable = false;
bool appleAvailable = false;
@@ -215,7 +211,7 @@ index 2f93c540b..805c3836d 100644
int startingBitrate = 2500;
bool customServer = false;
-@@ -119,6 +121,7 @@ class AutoConfig : public QWizard {
+@@ -121,6 +123,7 @@ class AutoConfig : public QWizard {
int specificFPSNum = 0;
int specificFPSDen = 0;
@@ -224,10 +220,10 @@ index 2f93c540b..805c3836d 100644
bool CanTestServer(const char *server);
diff --git a/UI/window-basic-main-outputs.cpp b/UI/window-basic-main-outputs.cpp
-index 9e644e90a..2312da7dd 100644
+index 291f6cf76..6b4adf298 100644
--- a/UI/window-basic-main-outputs.cpp
+++ b/UI/window-basic-main-outputs.cpp
-@@ -593,7 +593,9 @@ void SimpleOutput::LoadStreamingPreset_Lossy(const char *encoderId)
+@@ -546,7 +546,9 @@ void SimpleOutput::LoadStreamingPreset_Lossy(const char *encoderId)
/* mistakes have been made to lead us to this. */
const char *get_simple_output_encoder(const char *encoder)
{
@@ -238,7 +234,7 @@ index 9e644e90a..2312da7dd 100644
return "obs_x264";
} else if (strcmp(encoder, SIMPLE_ENCODER_X264_LOWCPU) == 0) {
return "obs_x264";
-@@ -627,7 +629,7 @@ const char *get_simple_output_encoder(const char *encoder)
+@@ -578,7 +580,7 @@ const char *get_simple_output_encoder(const char *encoder)
#endif
}
@@ -248,34 +244,32 @@ index 9e644e90a..2312da7dd 100644
void SimpleOutput::LoadRecordingPreset()
diff --git a/UI/window-basic-main-profiles.cpp b/UI/window-basic-main-profiles.cpp
-index f9d3f4ea1..27899efc4 100644
+index 559170e5e..0081611b8 100644
--- a/UI/window-basic-main-profiles.cpp
+++ b/UI/window-basic-main-profiles.cpp
-@@ -806,7 +806,7 @@ void OBSBasic::ChangeProfile()
- NewYouTubeAppDock();
- #endif
+@@ -670,7 +670,7 @@ void OBSBasic::ActivateProfile(const OBSProfile &profile, bool reset)
+ ResetProfileData();
+ }
- CheckForSimpleModeX264Fallback();
+ CheckForSimpleModeH264Fallback();
- blog(LOG_INFO, "Switched to profile '%s' (%s)", newName, newDir);
- blog(LOG_INFO, "------------------------------------------------");
-@@ -827,12 +827,13 @@ void OBSBasic::ChangeProfile()
- }
+ RefreshProfiles();
+
+@@ -741,10 +741,11 @@ std::vector<std::string> OBSBasic::GetRestartRequirements(const ConfigFile &conf
+ return result;
}
-void OBSBasic::CheckForSimpleModeX264Fallback()
+void OBSBasic::CheckForSimpleModeH264Fallback()
{
- const char *curStreamEncoder =
- config_get_string(basicConfig, "SimpleOutput", "StreamEncoder");
- const char *curRecEncoder =
- config_get_string(basicConfig, "SimpleOutput", "RecEncoder");
+ const char *curStreamEncoder = config_get_string(activeConfiguration, "SimpleOutput", "StreamEncoder");
+ const char *curRecEncoder = config_get_string(activeConfiguration, "SimpleOutput", "RecEncoder");
+ bool x264_supported = false;
bool qsv_supported = false;
bool qsv_av1_supported = false;
bool amd_supported = false;
-@@ -849,7 +850,9 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
+@@ -761,7 +762,9 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
const char *id;
while (obs_enum_encoder_types(idx++, &id)) {
@@ -286,15 +280,13 @@ index f9d3f4ea1..27899efc4 100644
amd_supported = true;
else if (strcmp(id, "obs_qsv11") == 0)
qsv_supported = true;
-@@ -877,68 +880,73 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
+@@ -784,69 +787,71 @@ void OBSBasic::CheckForSimpleModeX264Fallback()
+ apple_hevc_supported = true;
#endif
}
-
+ // Check to see whether x264 is available
-+ const char *fallback_encoder_name = (x264_supported
-+ ? SIMPLE_ENCODER_X264
-+ : SIMPLE_ENCODER_OPENH264);
-+
++ const char *fallback_encoder_name = (x264_supported ? SIMPLE_ENCODER_X264 : SIMPLE_ENCODER_OPENH264);
+
auto CheckEncoder = [&](const char *&name) {
if (strcmp(name, SIMPLE_ENCODER_QSV) == 0) {
if (!qsv_supported) {
@@ -371,10 +363,10 @@ index f9d3f4ea1..27899efc4 100644
}
#endif
diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp
-index 5c05f4141..445c3e8b4 100644
+index 0616a5fa9..bb956110a 100644
--- a/UI/window-basic-main.cpp
+++ b/UI/window-basic-main.cpp
-@@ -1550,6 +1550,8 @@ extern void CheckExistingCookieId();
+@@ -1576,6 +1576,8 @@ extern void CheckExistingCookieId();
#define DEFAULT_CONTAINER "hybrid_mp4"
#endif
@@ -383,46 +375,34 @@ index 5c05f4141..445c3e8b4 100644
bool OBSBasic::InitBasicConfigDefaults()
{
QList<QScreen *> screens = QGuiApplication::screens();
-@@ -1742,7 +1744,10 @@ bool OBSBasic::InitBasicConfigDefaults()
- config_set_default_bool(basicConfig, "AdvOut", "UseRescale", false);
- config_set_default_uint(basicConfig, "AdvOut", "TrackIndex", 1);
- config_set_default_uint(basicConfig, "AdvOut", "VodTrackIndex", 2);
-- config_set_default_string(basicConfig, "AdvOut", "Encoder", "obs_x264");
+@@ -1737,7 +1739,9 @@ bool OBSBasic::InitBasicConfigDefaults()
+ config_set_default_bool(activeConfiguration, "AdvOut", "UseRescale", false);
+ config_set_default_uint(activeConfiguration, "AdvOut", "TrackIndex", 1);
+ config_set_default_uint(activeConfiguration, "AdvOut", "VodTrackIndex", 2);
+- config_set_default_string(activeConfiguration, "AdvOut", "Encoder", "obs_x264");
+
+ bool useX264 = EncoderAvailable("obs_x264");
-+ config_set_default_string(basicConfig, "AdvOut", "Encoder",
-+ (useX264 ? "obs_x264" : "ffmpeg_openh264"));
++ config_set_default_string(activeConfiguration, "AdvOut", "Encoder", (useX264 ? "obs_x264" : "ffmpeg_openh264"));
- config_set_default_string(basicConfig, "AdvOut", "RecType", "Standard");
+ config_set_default_string(activeConfiguration, "AdvOut", "RecType", "Standard");
-@@ -1868,7 +1873,6 @@ bool OBSBasic::InitBasicConfigDefaults()
- return true;
- }
-
--extern bool EncoderAvailable(const char *encoder);
- extern bool update_nvenc_presets(ConfigFile &config);
-
- void OBSBasic::InitBasicConfigDefaults2()
-@@ -1877,12 +1881,14 @@ void OBSBasic::InitBasicConfigDefaults2()
- "Pre23Defaults");
+@@ -1855,10 +1859,13 @@ void OBSBasic::InitBasicConfigDefaults2()
+ bool oldEncDefaults = config_get_bool(App()->GetUserConfig(), "General", "Pre23Defaults");
bool useNV = EncoderAvailable("ffmpeg_nvenc") && !oldEncDefaults;
+ bool useX264 = EncoderAvailable("obs_x264");
-+ const char *h264_fallback =
-+ (useX264 ? SIMPLE_ENCODER_X264 : SIMPLE_ENCODER_OPENH264);
++ const char *h264_fallback = (useX264 ? SIMPLE_ENCODER_X264 : SIMPLE_ENCODER_OPENH264);
+
- config_set_default_string(basicConfig, "SimpleOutput", "StreamEncoder",
-- useNV ? SIMPLE_ENCODER_NVENC
-- : SIMPLE_ENCODER_X264);
+ config_set_default_string(activeConfiguration, "SimpleOutput", "StreamEncoder",
+- useNV ? SIMPLE_ENCODER_NVENC : SIMPLE_ENCODER_X264);
+ useNV ? SIMPLE_ENCODER_NVENC : h264_fallback);
- config_set_default_string(basicConfig, "SimpleOutput", "RecEncoder",
-- useNV ? SIMPLE_ENCODER_NVENC
-- : SIMPLE_ENCODER_X264);
+ config_set_default_string(activeConfiguration, "SimpleOutput", "RecEncoder",
+- useNV ? SIMPLE_ENCODER_NVENC : SIMPLE_ENCODER_X264);
+ useNV ? SIMPLE_ENCODER_NVENC : h264_fallback);
const char *aac_default = "ffmpeg_aac";
if (EncoderAvailable("CoreAudio_AAC"))
-@@ -2190,7 +2196,7 @@ void OBSBasic::OBSInit()
+@@ -2121,7 +2128,7 @@ void OBSBasic::OBSInit()
InitBasicConfigDefaults2();
@@ -432,7 +412,7 @@ index 5c05f4141..445c3e8b4 100644
LogEncoders();
diff --git a/UI/window-basic-main.hpp b/UI/window-basic-main.hpp
-index eb55d2f05..908093321 100644
+index d04edfeff..c9bec0b6b 100644
--- a/UI/window-basic-main.hpp
+++ b/UI/window-basic-main.hpp
@@ -70,6 +70,7 @@ class OBSBasicVCamConfig;
@@ -443,20 +423,20 @@ index eb55d2f05..908093321 100644
#define SIMPLE_ENCODER_QSV "qsv"
#define SIMPLE_ENCODER_QSV_AV1 "qsv_av1"
#define SIMPLE_ENCODER_NVENC "nvenc"
-@@ -445,7 +446,7 @@ private:
- void DeleteProfile(const char *profile_name, const char *profile_dir);
- void RefreshProfiles();
- void ChangeProfile();
+@@ -1303,7 +1304,7 @@ private:
+ void ActivateProfile(const OBSProfile &profile, bool reset = false);
+ std::vector<std::string> GetRestartRequirements(const ConfigFile &config) const;
+ void ResetProfileData();
- void CheckForSimpleModeX264Fallback();
+ void CheckForSimpleModeH264Fallback();
- void SaveProjectNow();
-
+ public:
+ inline const OBSProfileCache &GetProfileCache() const noexcept { return profiles; };
diff --git a/UI/window-basic-settings-stream.cpp b/UI/window-basic-settings-stream.cpp
-index cd78d4c8a..893059896 100644
+index 7296d7328..0d296abbc 100644
--- a/UI/window-basic-settings-stream.cpp
+++ b/UI/window-basic-settings-stream.cpp
-@@ -1617,7 +1617,9 @@ static QString get_adv_fallback(const QString &enc)
+@@ -1459,7 +1459,9 @@ static QString get_adv_fallback(const QString &enc)
return "com.apple.videotoolbox.videoencoder.ave.avc";
if (enc == "obs_qsv11_av1")
return "obs_qsv11";
@@ -467,7 +447,7 @@ index cd78d4c8a..893059896 100644
}
static QString get_adv_audio_fallback(const QString &enc)
-@@ -1646,7 +1648,9 @@ static QString get_simple_fallback(const QString &enc)
+@@ -1488,7 +1490,9 @@ static QString get_simple_fallback(const QString &enc)
return SIMPLE_ENCODER_APPLE_H264;
if (enc == SIMPLE_ENCODER_QSV_AV1)
return SIMPLE_ENCODER_QSV;
@@ -478,26 +458,22 @@ index cd78d4c8a..893059896 100644
}
bool OBSBasicSettings::ServiceSupportsCodecCheck()
-@@ -1850,8 +1854,12 @@ void OBSBasicSettings::ResetEncoders(bool streamOnly)
+@@ -1663,7 +1667,9 @@ void OBSBasicSettings::ResetEncoders(bool streamOnly)
#define ENCODER_STR(str) QTStr("Basic.Settings.Output.Simple.Encoder." str)
-- ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.X264.H264"),
-- QString(SIMPLE_ENCODER_X264));
-+ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.OpenH264.H264"),
-+ QString(SIMPLE_ENCODER_OPENH264));
+- ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.X264.H264"), QString(SIMPLE_ENCODER_X264));
++ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.OpenH264.H264"), QString(SIMPLE_ENCODER_OPENH264));
+ if (service_supports_encoder(vcodecs, "obs_x264"))
-+ ui->simpleOutStrEncoder->addItem(
-+ ENCODER_STR("Software.X264.H264"),
-+ QString(SIMPLE_ENCODER_X264));
++ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.X264.H264"), QString(SIMPLE_ENCODER_X264));
#ifdef _WIN32
if (service_supports_encoder(vcodecs, "obs_qsv11"))
- ui->simpleOutStrEncoder->addItem(
+ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Hardware.QSV.H264"), QString(SIMPLE_ENCODER_QSV));
diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp
-index 2aa92203c..38e323479 100644
+index 1c77f804b..25b5f940a 100644
--- a/UI/window-basic-settings.cpp
+++ b/UI/window-basic-settings.cpp
-@@ -3848,6 +3848,11 @@ void OBSBasicSettings::SaveOutputSettings()
+@@ -3364,6 +3364,11 @@ void OBSBasicSettings::SaveOutputSettings()
do. This only exists to make sure that the x264 preset doesn't
get overwritten with empty data. */
presetType = "ApplePreset";
@@ -509,29 +485,22 @@ index 2aa92203c..38e323479 100644
else
presetType = "Preset";
-@@ -5338,11 +5343,16 @@ void OBSBasicSettings::FillSimpleRecordingValues()
+@@ -4735,8 +4740,12 @@ void OBSBasicSettings::FillSimpleRecordingValues()
ADD_QUALITY("HQ");
ADD_QUALITY("Lossless");
-- ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.X264.H264"),
-- QString(SIMPLE_ENCODER_X264));
-- ui->simpleOutRecEncoder->addItem(
-- ENCODER_STR("SoftwareLowCPU.X264.H264"),
-- QString(SIMPLE_ENCODER_X264_LOWCPU));
-+ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.OpenH264.H264"),
-+ QString(SIMPLE_ENCODER_OPENH264));
+- ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.X264.H264"), QString(SIMPLE_ENCODER_X264));
+- ui->simpleOutRecEncoder->addItem(ENCODER_STR("SoftwareLowCPU.X264.H264"), QString(SIMPLE_ENCODER_X264_LOWCPU));
++ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.OpenH264.H264"), QString(SIMPLE_ENCODER_OPENH264));
+ if (EncoderAvailable("obs_x264")) {
-+ ui->simpleOutRecEncoder->addItem(
-+ ENCODER_STR("Software.X264.H264"),
-+ QString(SIMPLE_ENCODER_X264));
-+ ui->simpleOutRecEncoder->addItem(
-+ ENCODER_STR("SoftwareLowCPU.X264.H264"),
-+ QString(SIMPLE_ENCODER_X264_LOWCPU));
++ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.X264.H264"), QString(SIMPLE_ENCODER_X264));
++ ui->simpleOutRecEncoder->addItem(ENCODER_STR("SoftwareLowCPU.X264.H264"),
++ QString(SIMPLE_ENCODER_X264_LOWCPU));
+ }
if (EncoderAvailable("obs_qsv11"))
- ui->simpleOutRecEncoder->addItem(
- ENCODER_STR("Hardware.QSV.H264"),
-@@ -5516,6 +5526,9 @@ void OBSBasicSettings::SimpleStreamingEncoderChanged()
+ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Hardware.QSV.H264"), QString(SIMPLE_ENCODER_QSV));
+ if (EncoderAvailable("obs_qsv11_av1"))
+@@ -4885,6 +4894,9 @@ void OBSBasicSettings::SimpleStreamingEncoderChanged()
defaultPreset = "balanced";
preset = curAMDAV1Preset;
@@ -540,7 +509,7 @@ index 2aa92203c..38e323479 100644
+ ui->simpleOutPresetLabel->setVisible(false);
} else {
- #define PRESET_STR(val) \
+ #define PRESET_STR(val) QString(Str("Basic.Settings.Output.EncoderPreset." val)).arg(val)
--
-2.45.2
+2.46.2
diff --git a/11345.patch b/11345.patch
new file mode 100644
index 0000000..97eb09c
--- /dev/null
+++ b/11345.patch
@@ -0,0 +1,59 @@
+From 599b80a9d771411a89f55860f12d3f807864c307 Mon Sep 17 00:00:00 2001
+From: Kurt Kartaltepe <kkartaltepe(a)gmail.com>
+Date: Fri, 4 Oct 2024 19:48:44 -0700
+Subject: [PATCH] cmake: Use fixed SOVERSION everywhere
+
+We missed a spot when freezing the SOVERSION to 30 after we flipped to
+31 causing builds to break.
+---
+ cmake/linux/helpers.cmake | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/cmake/linux/helpers.cmake b/cmake/linux/helpers.cmake
+index b954fb4a76a2b3..260062e4cfb2dd 100644
+--- a/cmake/linux/helpers.cmake
++++ b/cmake/linux/helpers.cmake
+@@ -19,6 +19,7 @@ function(set_target_properties_obs target)
+ endwhile()
+
+ get_target_property(target_type ${target} TYPE)
++ set(OBS_SOVERSION 30)
+
+ if(target_type STREQUAL EXECUTABLE)
+ install(TARGETS ${target} RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}" COMPONENT Runtime)
+@@ -59,8 +60,8 @@ function(set_target_properties_obs target)
+ set_target_properties(
+ ${target}
+ PROPERTIES
+- VERSION 30
+- SOVERSION 30
++ VERSION ${OBS_SOVERSION}
++ SOVERSION ${OBS_SOVERSION}
+ BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
+ INSTALL_RPATH "${OBS_LIBRARY_RPATH}"
+ )
+@@ -96,7 +97,7 @@ function(set_target_properties_obs target)
+ POST_BUILD
+ COMMAND
+ "${CMAKE_COMMAND}" -E create_symlink
+- "$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.${OBS_VERSION_MAJOR}"
++ "$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.${OBS_SOVERSION}"
+ "$<TARGET_FILE_PREFIX:${target}>$<TARGET_FILE_BASE_NAME:${target}>.so.0"
+ COMMAND
+ "${CMAKE_COMMAND}" -E copy_if_different
+@@ -107,13 +108,13 @@ function(set_target_properties_obs target)
+ endif()
+ elseif(target_type STREQUAL MODULE_LIBRARY)
+ if(target STREQUAL obs-browser)
+- set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION 30)
++ set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION ${OBS_SOVERSION})
+ else()
+ set_target_properties(
+ ${target}
+ PROPERTIES
+ VERSION 0
+- SOVERSION 30
++ SOVERSION ${OBS_SOVERSION}
+ BUILD_RPATH "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_LIBRARY_DESTINATION}"
+ INSTALL_RPATH "${OBS_MODULE_RPATH}"
+ )
diff --git a/obs-studio-UI-use-fdk-aac-by-default.patch b/obs-studio-UI-use-fdk-aac-by-default.patch
index 5f9d1e1..4eb3a90 100644
--- a/obs-studio-UI-use-fdk-aac-by-default.patch
+++ b/obs-studio-UI-use-fdk-aac-by-default.patch
@@ -1,4 +1,4 @@
-From 841fd01b7a529b7c1d0e0a509190a26eb1220d5a Mon Sep 17 00:00:00 2001
+From f5177e740846c074e0e2f7aae04a19190e6cbda8 Mon Sep 17 00:00:00 2001
From: Neal Gompa <neal(a)gompa.dev>
Date: Thu, 4 May 2023 13:52:01 -0400
Subject: [PATCH] UI: Default to fdk-aac for AAC when auto-configuring settings
@@ -10,27 +10,27 @@ codec anyway.
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/UI/window-basic-auto-config-test.cpp b/UI/window-basic-auto-config-test.cpp
-index c791c8b8b..7dabfd93f 100644
+index 5b5051919..9c4769e0a 100644
--- a/UI/window-basic-auto-config-test.cpp
+++ b/UI/window-basic-auto-config-test.cpp
-@@ -202,7 +202,7 @@ void AutoConfigTestPage::TestBandwidthThread()
- (wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
- "test_h264", nullptr, nullptr);
- OBSEncoderAutoRelease aencoder = obs_audio_encoder_create(
-- "ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
-+ "libfdk_aac", "test_aac", nullptr, 0, nullptr);
- OBSServiceAutoRelease service = obs_service_create(
- serverType, "test_service", nullptr, nullptr);
+@@ -194,7 +194,7 @@ void AutoConfigTestPage::TestBandwidthThread()
-@@ -572,7 +572,7 @@ bool AutoConfigTestPage::TestSoftwareEncoding()
- (wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
- "test_h264", nullptr, nullptr);
- OBSEncoderAutoRelease aencoder = obs_audio_encoder_create(
-- "ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
-+ "libfdk_aac", "test_aac", nullptr, 0, nullptr);
- OBSOutputAutoRelease output =
- obs_output_create("null_output", "null", nullptr, nullptr);
+ OBSEncoderAutoRelease vencoder = obs_video_encoder_create((wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
+ "test_h264", nullptr, nullptr);
+- OBSEncoderAutoRelease aencoder = obs_audio_encoder_create("ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
++ OBSEncoderAutoRelease aencoder = obs_audio_encoder_create("libfdk_aac", "test_aac", nullptr, 0, nullptr);
+ OBSServiceAutoRelease service = obs_service_create(serverType, "test_service", nullptr, nullptr);
+ /* -----------------------------------*/
+@@ -559,7 +559,7 @@ bool AutoConfigTestPage::TestSoftwareEncoding()
+
+ OBSEncoderAutoRelease vencoder = obs_video_encoder_create((wiz->x264Available ? "obs_x264" : "ffmpeg_openh264"),
+ "test_h264", nullptr, nullptr);
+- OBSEncoderAutoRelease aencoder = obs_audio_encoder_create("ffmpeg_aac", "test_aac", nullptr, 0, nullptr);
++ OBSEncoderAutoRelease aencoder = obs_audio_encoder_create("libfdk_aac", "test_aac", nullptr, 0, nullptr);
+ OBSOutputAutoRelease output = obs_output_create("null_output", "null", nullptr, nullptr);
+
+ /* -----------------------------------*/
--
-2.40.0
+2.46.2
diff --git a/obs-studio-fix-incompatible-pointer-type.patch b/obs-studio-fix-incompatible-pointer-type.patch
index f34e81b..14b82d4 100644
--- a/obs-studio-fix-incompatible-pointer-type.patch
+++ b/obs-studio-fix-incompatible-pointer-type.patch
@@ -1,13 +1,26 @@
+From 88286758bfb7dfcf13875db36f2b2b3960497e99 Mon Sep 17 00:00:00 2001
+From: Neal Gompa <neal(a)gompa.dev>
+Date: Sat, 5 Oct 2024 10:57:23 -0400
+Subject: [PATCH] libobs-opengl: Fix incompatible pointer type error for 32-bit
+ arches
+
+---
+ libobs-opengl/gl-egl-common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
diff --git a/libobs-opengl/gl-egl-common.c b/libobs-opengl/gl-egl-common.c
-index f06cd19..023068f 100644
+index 8854e9d0c..819061ae0 100644
--- a/libobs-opengl/gl-egl-common.c
+++ b/libobs-opengl/gl-egl-common.c
-@@ -373,7 +373,7 @@ bool gl_egl_query_dmabuf_modifiers_for_format(EGLDisplay egl_display,
+@@ -379,7 +379,7 @@ bool gl_egl_query_dmabuf_modifiers_for_format(EGLDisplay egl_display, uint32_t d
+ blog(LOG_ERROR, "Unable to load eglQueryDmaBufModifiersEXT");
return false;
}
- if (!query_dmabuf_modifiers(egl_display, drm_format, modifiers,
-- n_modifiers)) {
-+ (EGLuint64KHR*)n_modifiers)) {
+- if (!query_dmabuf_modifiers(egl_display, drm_format, modifiers, n_modifiers)) {
++ if (!query_dmabuf_modifiers(egl_display, drm_format, modifiers, (EGLuint64KHR *)n_modifiers)) {
*n_modifiers = 0;
*modifiers = NULL;
return false;
+--
+2.46.2
+
diff --git a/obs-studio-freeworld.spec b/obs-studio-freeworld.spec
index 62fccfc..afdd2ea 100644
--- a/obs-studio-freeworld.spec
+++ b/obs-studio-freeworld.spec
@@ -1,29 +1,31 @@
%ifarch %{power64} s390x
# LuaJIT is not available for POWER and IBM Z
-%bcond_with lua_scripting
+%bcond lua_scripting 0
%else
-%bcond_without lua_scripting
+%bcond lua_scripting 1
%endif
%ifarch x86_64
# VPL/QSV is only available on x86_64
-%bcond_without vpl
+%bcond vpl 1
%else
-%bcond_with vpl
+%bcond vpl 0
%endif
-%bcond_without x264
-
-%global obswebsocket_version 5.5.1
-%global origname obs-studio
+# CEF is not packaged yet...
+%bcond cef 0
%if "%{__isa_bits}" == "64"
%global lib64_suffix ()(64bit)
%endif
%global libvlc_soversion 5
+
+%global obswebsocket_version 5.5.3
+%global origname obs-studio
+
Name: obs-studio-freeworld
-Version: 30.2.2
+Version: 31.0.0~beta1
Release: 1%{?dist}
Summary: Open Broadcaster Software Studio -- Freeworld plugins
@@ -41,12 +43,13 @@ Source1: https://github.com/obsproject/obs-websocket/archive/%{obswebsock
# Backports from upstream
# Proposed upstream
+## From: https://github.com/obsproject/obs-studio/pull/11345
+Patch0100: https://github.com/obsproject/obs-studio/pull/11345.patch
## From: https://github.com/obsproject/obs-studio/pull/8529
Patch0101: 0101-UI-Consistently-reference-the-software-H264-encoder-.patch
Patch0102: 0102-obs-ffmpeg-Add-initial-support-for-the-OpenH264-H.26.patch
Patch0103: 0103-UI-Add-support-for-OpenH264-as-the-worst-case-fallba.patch
-
# Downstream Fedora patches
## Use fdk-aac by default
Patch1001: obs-studio-UI-use-fdk-aac-by-default.patch
@@ -54,7 +57,6 @@ Patch1001: obs-studio-UI-use-fdk-aac-by-default.patch
## incompatible pointer type [-Wincompatible-pointer-types]
Patch1003: obs-studio-fix-incompatible-pointer-type.patch
-
BuildRequires: gcc
BuildRequires: cmake >= 3.22
BuildRequires: ninja-build
@@ -70,7 +72,7 @@ BuildRequires: freetype-devel
BuildRequires: jansson-devel >= 2.5
BuildRequires: json-devel
BuildRequires: libcurl-devel
-BuildRequires: libdatachannel-devel
+BuildRequires: libdatachannel-devel >= 0.20
BuildRequires: libdrm-devel
BuildRequires: libGL-devel
BuildRequires: libglvnd-devel
@@ -102,15 +104,14 @@ BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtbase-private-devel
BuildRequires: qt6-qtsvg-devel
BuildRequires: qt6-qtwayland-devel
+BuildRequires: rnnoise-devel
BuildRequires: speexdsp-devel
BuildRequires: swig
BuildRequires: systemd-devel
BuildRequires: uthash-devel
BuildRequires: wayland-devel
BuildRequires: websocketpp-devel
-%if %{with x264}
BuildRequires: x264-devel
-%endif
# Ensure QtWayland is installed when libwayland-client is installed
@@ -152,7 +153,6 @@ software for video recording and live streaming.
%package -n obs-studio-plugin-x264
Summary: Open Broadcaster Software Studio - x264 encoding plugin
License: GPL-2.0-or-later
-BuildRequires: x264-devel
Requires: obs-studio%{?_isa} >= %{version}
Supplements: obs-studio%{?_isa}
@@ -177,13 +177,6 @@ streaming or recording AVC/H.264 video.
tar -xf %{SOURCE1} -C plugins/obs-websocket --strip-components=1
%autopatch -p1
-# rpmlint reports E: hardcoded-library-path
-# replace OBS_MULTIARCH_SUFFIX by LIB_SUFFIX
-sed -e 's|OBS_MULTIARCH_SUFFIX|LIB_SUFFIX|g' -i cmake/Modules/ObsHelpers.cmake
-
-# Kill rpath settings
-sed -e '\|set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OBS_LIBRARY_DESTINATION}")|d' -i cmake/Modules/ObsHelpers_Linux.cmake
-
# touch the missing submodules
touch plugins/obs-browser/CMakeLists.txt
@@ -193,10 +186,6 @@ mv plugins/obs-qsv11/CMakeLists.txt plugins/obs-qsv11/CMakeLists.txt.disabled
touch plugins/obs-qsv11/CMakeLists.txt
%endif
-# remove -Werror flag to mitigate FTBFS with ffmpeg 5.1
-sed -e 's|-Werror-implicit-function-declaration||g' -i cmake/Modules/CompilerConfig.cmake
-sed -e '/-Werror/d' -i cmake/Modules/CompilerConfig.cmake
-
# Removing unused third-party deps
rm -rf deps/w32-pthreads
rm -rf deps/ipc-util
@@ -216,7 +205,6 @@ cp deps/json11/LICENSE.txt .fedora-rpm/licenses/deps/json11-LICENSE.txt
cp deps/libcaption/LICENSE.txt .fedora-rpm/licenses/deps/libcaption-LICENSE.txt
cp plugins/obs-qsv11/QSV11-License-Clarification-Email.txt .fedora-rpm/licenses/plugins/QSV11-License-Clarification-Email.txt
cp deps/blake2/LICENSE.blake2 .fedora-rpm/licenses/deps/
-cp deps/media-playback/LICENSE.media-playback .fedora-rpm/licenses/deps/
cp libobs/graphics/libnsgif/LICENSE.libnsgif .fedora-rpm/licenses/deps/
cp libobs/util/simde/LICENSE.simde .fedora-rpm/licenses/deps/
cp plugins/decklink/LICENSE.decklink-sdk .fedora-rpm/licenses/deps
@@ -224,16 +212,19 @@ cp plugins/obs-qsv11/obs-qsv11-LICENSE.txt .fedora-rpm/licenses/plugins/
%build
-%cmake -DOBS_VERSION_OVERRIDE=%{version_no_tilde} \
+%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DOBS_VERSION_OVERRIDE=%{version_no_tilde} \
+ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
-DUNIX_STRUCTURE=1 -GNinja \
- -DCMAKE_SKIP_RPATH=1 \
- -DBUILD_BROWSER=OFF \
+%if ! %{with cef}
+ -DENABLE_BROWSER=OFF \
+%endif
-DENABLE_VLC=OFF \
-DENABLE_JACK=ON \
-DENABLE_LIBFDK=ON \
-DENABLE_AJA=OFF \
%if ! %{with lua_scripting}
- -DDISABLE_LUA=ON \
+ -DENABLE_SCRIPTING_LUA=OFF \
%endif
-DOpenGL_GL_PREFERENCE=GLVND
%cmake_build
@@ -242,6 +233,10 @@ cp plugins/obs-qsv11/obs-qsv11-LICENSE.txt .fedora-rpm/licenses/plugins/
%install
%cmake_install
+# Work around broken libobs.pc file...
+# Cf. https://github.com/obsproject/obs-studio/issues/7972
+sed -e 's|^Cflags: .*|Cflags: -I${includedir} -DHAVE_OBSCONFIG_H|' -i %{buildroot}%{_libdir}/pkgconfig/libobs.pc
+
mkdir -p preserve/%{_libdir}/obs-plugins
mkdir -p preserve/%{_datadir}/obs/obs-plugins
@@ -257,6 +252,10 @@ mv preserve/%{_prefix} %{buildroot}
%changelog
+* Wed Aug 28 2024 Dominik Mierzejewski <dominik(a)greysector.net> - 31.0.0~beta1-1
+- Update to 31.0.0~beta1
+- Sync spec and patches with Fedora
+
* Wed Aug 28 2024 Dominik Mierzejewski <dominik(a)greysector.net> - 30.2.2-1
- Update to 30.2.2
diff --git a/sources b/sources
index 13a7b05..ba714c6 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (obs-studio-30.2.2.tar.gz) = 3e22be9cc3f09a03a6125b87ee134afe22241a786c5528a6166bd1706e52f7ea6259cfd5207afc8dc299c48851f4663179a698f87e8bde7fecea411764e39c93
-SHA512 (obs-websocket-5.5.1.tar.gz) = a801ca747ccfb9d888e8b2e57c44e786e981a6ab4a83ef1d82ea396b732b9ddcfcdb8068bd65507e5fecc1b93c303611b5c23d0cff5bd36f09230651c534cab5
+SHA512 (obs-studio-31.0.0-beta1.tar.gz) = 31ed02bf04625349cf7b4781c44ddca05191e5a5775a7fdd70fcce3ae63fea0e0fd9cbcaf51a4bbd668e901d93aa49b2d18eaa2a8023aacbffdd1d757ce1a2a4
+SHA512 (obs-websocket-5.5.3.tar.gz) = 4833785c5e8db5423581f59ccb58caeac8f82713a7914bfc56e7811981ff7ad88787376078cb4737ea6467b354cbbd136fa90f365b71698b797ebe3f7e715508
1 month, 2 weeks
[kodi] Try debian ffmpeg fix
by Leigh Scott
commit 23628f1641809be0def03d7045ff0c11a5aef39c
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Wed Oct 9 07:48:27 2024 +0100
Try debian ffmpeg fix
0004-ffmpeg7.patch | 745 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ffmpeg7.patch | 355 -------------------------
kodi.spec | 3 +-
3 files changed, 747 insertions(+), 356 deletions(-)
---
diff --git a/0004-ffmpeg7.patch b/0004-ffmpeg7.patch
new file mode 100644
index 0000000..a14aeaf
--- /dev/null
+++ b/0004-ffmpeg7.patch
@@ -0,0 +1,745 @@
+From 5f731d1c62ebee57c0a545fe255c53b8018ca754 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Thu, 11 Apr 2024 17:11:32 +0200
+Subject: [PATCH 1/7] [ffmpeg] Update to 7.0
+
+---
+ cmake/modules/FindFFMPEG.cmake | 16 +--
+ tools/buildsteps/windows/ffmpeg_options.txt | 1 -
+ tools/depends/target/ffmpeg/CMakeLists.txt | 6 +-
+ tools/depends/target/ffmpeg/FFMPEG-VERSION | 4 +-
+ xbmc/cdrip/EncoderFFmpeg.cpp | 2 +-
+ xbmc/cdrip/EncoderFFmpeg.h | 2 +-
+ .../ActiveAE/ActiveAEResampleFFMPEG.cpp | 110 +++++++++---------
+ .../DVDDemuxers/DVDDemuxFFmpeg.cpp | 71 +----------
+ 8 files changed, 69 insertions(+), 143 deletions(-)
+
+diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
+index 6c6bf973de..6bd05e9f3d 100644
+--- a/cmake/modules/FindFFMPEG.cmake
++++ b/cmake/modules/FindFFMPEG.cmake
+@@ -163,14 +163,14 @@ if(WITH_FFMPEG)
+ set(REQUIRED_FFMPEG_VERSION undef)
+ else()
+ # required ffmpeg library versions
+- set(REQUIRED_FFMPEG_VERSION 6.0.0)
+- set(_avcodec_ver ">=60.2.100")
+- set(_avfilter_ver ">=9.3.100")
+- set(_avformat_ver ">=60.3.100")
+- set(_avutil_ver ">=58.2.100")
+- set(_postproc_ver ">=57.1.100")
+- set(_swresample_ver ">=4.10.100")
+- set(_swscale_ver ">=7.1.100")
++ set(REQUIRED_FFMPEG_VERSION 7.0.0)
++ set(_avcodec_ver ">=61.3.100")
++ set(_avfilter_ver ">=10.1.100")
++ set(_avformat_ver ">=61.1.100")
++ set(_avutil_ver ">=59.8.100")
++ set(_postproc_ver ">=58.1.100")
++ set(_swresample_ver ">=5.1.100")
++ set(_swscale_ver ">=8.1.100")
+ endif()
+
+ # Allows building with external ffmpeg not found in system paths,
+diff --git a/tools/buildsteps/windows/ffmpeg_options.txt b/tools/buildsteps/windows/ffmpeg_options.txt
+index 5034ff26c4..776c0b4b35 100644
+--- a/tools/buildsteps/windows/ffmpeg_options.txt
++++ b/tools/buildsteps/windows/ffmpeg_options.txt
+@@ -1,5 +1,4 @@
+ --disable-avdevice
+---disable-crystalhd
+ --disable-cuda
+ --disable-cuvid
+ --disable-devices
+diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
+index f2ba09402e..60b8887de3 100644
+--- a/tools/depends/target/ffmpeg/FFMPEG-VERSION
++++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION
+@@ -1,5 +1,5 @@
+ LIBNAME=ffmpeg
+-VERSION=6.0.1
++VERSION=7.0.1
+ ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
+-SHA512=945e34840092dc0fd3824eb1af2be79868af2afb4fe13159b19a9bcfc464cc4d53243c13ff065199290e9393ddbf4b1c5c8abccf83a31a31d6c7490e499fd1fc
++SHA512=43b639b0bc0597e95dea2dce3e925f4b71ca8c4d9eadaef614941053e287f2d5c2e78d95413f0f7142da0f6ea1dbf443457e4fa1c2296cd8cf4081c185ed9c04
+
+diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp
+index 85f5fa412e..907d2591dd 100644
+--- a/xbmc/cdrip/EncoderFFmpeg.cpp
++++ b/xbmc/cdrip/EncoderFFmpeg.cpp
+@@ -235,7 +235,7 @@ void CEncoderFFmpeg::SetTag(const std::string& tag, const std::string& value)
+ av_dict_set(&m_formatCtx->metadata, tag.c_str(), value.c_str(), 0);
+ }
+
+-int CEncoderFFmpeg::avio_write_callback(void* opaque, uint8_t* buf, int buf_size)
++int CEncoderFFmpeg::avio_write_callback(void* opaque, const uint8_t* buf, int buf_size)
+ {
+ CEncoderFFmpeg* enc = static_cast<CEncoderFFmpeg*>(opaque);
+ if (enc->Write(buf, buf_size) != buf_size)
+diff --git a/xbmc/cdrip/EncoderFFmpeg.h b/xbmc/cdrip/EncoderFFmpeg.h
+index 48471a4b10..4e9f0f5bbb 100644
+--- a/xbmc/cdrip/EncoderFFmpeg.h
++++ b/xbmc/cdrip/EncoderFFmpeg.h
+@@ -33,7 +33,7 @@ public:
+ bool Close() override;
+
+ private:
+- static int avio_write_callback(void* opaque, uint8_t* buf, int buf_size);
++ static int avio_write_callback(void* opaque, const uint8_t* buf, int buf_size);
+ static int64_t avio_seek_callback(void* opaque, int64_t offset, int whence);
+
+ void SetTag(const std::string& tag, const std::string& value);
+diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp
+index e897cbd3ea..6fce0af981 100644
+--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp
++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResampleFFMPEG.cpp
+@@ -66,51 +66,7 @@ bool CActiveAEResampleFFMPEG::Init(SampleConfig dstConfig, SampleConfig srcConfi
+ AVChannelLayout dstChLayout = {};
+ AVChannelLayout srcChLayout = {};
+
+- av_channel_layout_from_mask(&dstChLayout, m_dst_chan_layout);
+- av_channel_layout_from_mask(&srcChLayout, m_src_chan_layout);
+-
+- int ret = swr_alloc_set_opts2(&m_pContext, &dstChLayout, m_dst_fmt, m_dst_rate, &srcChLayout,
+- m_src_fmt, m_src_rate, 0, NULL);
+-
+- if (ret)
+- {
+- CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - create context failed");
+- return false;
+- }
+-
+- if(quality == AE_QUALITY_HIGH)
+- {
+- av_opt_set_double(m_pContext, "cutoff", 1.0, 0);
+- av_opt_set_int(m_pContext,"filter_size", 256, 0);
+- }
+- else if(quality == AE_QUALITY_MID)
+- {
+- // 0.97 is default cutoff so use (1.0 - 0.97) / 2.0 + 0.97
+- av_opt_set_double(m_pContext, "cutoff", 0.985, 0);
+- av_opt_set_int(m_pContext,"filter_size", 64, 0);
+- }
+- else if(quality == AE_QUALITY_LOW)
+- {
+- av_opt_set_double(m_pContext, "cutoff", 0.97, 0);
+- av_opt_set_int(m_pContext,"filter_size", 32, 0);
+- }
+-
+- if (m_dst_fmt == AV_SAMPLE_FMT_S32 || m_dst_fmt == AV_SAMPLE_FMT_S32P)
+- {
+- av_opt_set_int(m_pContext, "output_sample_bits", m_dst_bits, 0);
+- }
+-
+- // tell resampler to clamp float values
+- // not required for sink stage (remapLayout == true)
+- if ((m_dst_fmt == AV_SAMPLE_FMT_FLT || m_dst_fmt == AV_SAMPLE_FMT_FLTP) &&
+- (m_src_fmt == AV_SAMPLE_FMT_FLT || m_src_fmt == AV_SAMPLE_FMT_FLTP) &&
+- !remapLayout && normalize)
+- {
+- av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0);
+- }
+-
+- av_opt_set_double(m_pContext, "center_mix_level", centerMix, 0);
+-
++ bool hasMatrix = false;
+ if (remapLayout)
+ {
+ // one-to-one mapping of channels
+@@ -120,28 +76,19 @@ bool CActiveAEResampleFFMPEG::Init(SampleConfig dstConfig, SampleConfig srcConfi
+ m_dst_chan_layout = 0;
+ for (unsigned int out=0; out<remapLayout->Count(); out++)
+ {
+- m_dst_chan_layout += ((uint64_t)1) << out;
++ m_dst_chan_layout += static_cast<uint64_t>(1) << out;
+ int idx = CAEUtil::GetAVChannelIndex((*remapLayout)[out], m_src_chan_layout);
+ if (idx >= 0)
+ {
+ m_rematrix[out][idx] = 1.0;
+ }
+ }
+-
+- av_opt_set_int(m_pContext, "out_channel_count", m_dst_channels, 0);
+- av_opt_set_int(m_pContext, "out_channel_layout", m_dst_chan_layout, 0);
+-
+- if (swr_set_matrix(m_pContext, (const double*)m_rematrix, AE_CH_MAX) < 0)
+- {
+- CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - setting channel matrix failed");
+- return false;
+- }
++ hasMatrix = true;
+ }
+ // stereo upmix
+ else if (upmix && m_src_channels == 2 && m_dst_channels > 2)
+ {
+ memset(m_rematrix, 0, sizeof(m_rematrix));
+- av_channel_layout_uninit(&dstChLayout);
+ av_channel_layout_from_mask(&dstChLayout, m_dst_chan_layout);
+ for (int out=0; out<m_dst_channels; out++)
+ {
+@@ -171,15 +118,64 @@ bool CActiveAEResampleFFMPEG::Init(SampleConfig dstConfig, SampleConfig srcConfi
+ }
+ }
+
++ hasMatrix = true;
+ av_channel_layout_uninit(&dstChLayout);
++ }
++
++ av_channel_layout_from_mask(&dstChLayout, m_dst_chan_layout);
++ av_channel_layout_from_mask(&srcChLayout, m_src_chan_layout);
++
++ int ret = swr_alloc_set_opts2(&m_pContext, &dstChLayout, m_dst_fmt, m_dst_rate, &srcChLayout,
++ m_src_fmt, m_src_rate, 0, NULL);
++
++ if (ret)
++ {
++ CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - create context failed");
++ return false;
++ }
+
+- if (swr_set_matrix(m_pContext, (const double*)m_rematrix, AE_CH_MAX) < 0)
++ if (hasMatrix)
++ {
++ if (swr_set_matrix(m_pContext, reinterpret_cast<const double*>(m_rematrix), AE_CH_MAX) < 0)
+ {
+ CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - setting channel matrix failed");
+ return false;
+ }
+ }
+
++ if (quality == AE_QUALITY_HIGH)
++ {
++ av_opt_set_double(m_pContext, "cutoff", 1.0, 0);
++ av_opt_set_int(m_pContext, "filter_size", 256, 0);
++ }
++ else if (quality == AE_QUALITY_MID)
++ {
++ // 0.97 is default cutoff so use (1.0 - 0.97) / 2.0 + 0.97
++ av_opt_set_double(m_pContext, "cutoff", 0.985, 0);
++ av_opt_set_int(m_pContext, "filter_size", 64, 0);
++ }
++ else if (quality == AE_QUALITY_LOW)
++ {
++ av_opt_set_double(m_pContext, "cutoff", 0.97, 0);
++ av_opt_set_int(m_pContext, "filter_size", 32, 0);
++ }
++
++ if (m_dst_fmt == AV_SAMPLE_FMT_S32 || m_dst_fmt == AV_SAMPLE_FMT_S32P)
++ {
++ av_opt_set_int(m_pContext, "output_sample_bits", m_dst_bits, 0);
++ }
++
++ // tell resampler to clamp float values
++ // not required for sink stage (remapLayout == true)
++ if ((m_dst_fmt == AV_SAMPLE_FMT_FLT || m_dst_fmt == AV_SAMPLE_FMT_FLTP) &&
++ (m_src_fmt == AV_SAMPLE_FMT_FLT || m_src_fmt == AV_SAMPLE_FMT_FLTP) && !remapLayout &&
++ normalize)
++ {
++ av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0);
++ }
++
++ av_opt_set_double(m_pContext, "center_mix_level", centerMix, 0);
++
+ if(swr_init(m_pContext) < 0)
+ {
+ CLog::Log(LOGERROR, "CActiveAEResampleFFMPEG::Init - init resampler failed");
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+index 1aebc3dcbc..174df53f16 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -376,74 +376,7 @@ bool CDVDDemuxFFmpeg::Open(const std::shared_ptr<CDVDInputStream>& pInput, bool
+ if (iformat == nullptr)
+ {
+ // let ffmpeg decide which demuxer we have to open
+- bool trySPDIFonly = (m_pInput->GetContent() == "audio/x-spdif-compressed");
+-
+- if (!trySPDIFonly)
+- av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+-
+- // Use the more low-level code in case we have been built against an old
+- // FFmpeg without the above av_probe_input_buffer(), or in case we only
+- // want to probe for spdif (DTS or IEC 61937) compressed audio
+- // specifically, or in case the file is a wav which may contain DTS or
+- // IEC 61937 (e.g. ac3-in-wav) and we want to check for those formats.
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0))
+- {
+- AVProbeData pd;
+- int probeBufferSize = 32768;
+- std::unique_ptr<uint8_t[]> probe_buffer (new uint8_t[probeBufferSize + AVPROBE_PADDING_SIZE]);
+-
+- // init probe data
+- pd.buf = probe_buffer.get();
+- pd.filename = strFile.c_str();
+-
+- // read data using avformat's buffers
+- pd.buf_size = avio_read(m_ioContext, pd.buf, probeBufferSize);
+- if (pd.buf_size <= 0)
+- {
+- CLog::Log(LOGERROR, "{} - error reading from input stream, {}", __FUNCTION__,
+- CURL::GetRedacted(strFile));
+- return false;
+- }
+- memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
+-
+- // restore position again
+- avio_seek(m_ioContext , 0, SEEK_SET);
+-
+- // the advancedsetting is for allowing the user to force outputting the
+- // 44.1 kHz DTS wav file as PCM, so that an A/V receiver can decode
+- // it (this is temporary until we handle 44.1 kHz passthrough properly)
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0 && !CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_VideoPlayerIgnoreDTSinWAV))
+- {
+- // check for spdif and dts
+- // This is used with wav files and audio CDs that may contain
+- // a DTS or AC3 track padded for S/PDIF playback. If neither of those
+- // is present, we assume it is PCM audio.
+- // AC3 is always wrapped in iec61937 (ffmpeg "spdif"), while DTS
+- // may be just padded.
+- const AVInputFormat* iformat2 = av_find_input_format("spdif");
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else
+- {
+- // not spdif or no spdif demuxer, try dts
+- iformat2 = av_find_input_format("dts");
+-
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else if (trySPDIFonly)
+- {
+- // not dts either, return false in case we were explicitly
+- // requested to only check for S/PDIF padded compressed audio
+- CLog::Log(LOGDEBUG, "{} - not spdif or dts file, falling back", __FUNCTION__);
+- return false;
+- }
+- }
+- }
+- }
++ av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+
+ if (!iformat)
+ {
+@@ -1353,7 +1286,7 @@ bool CDVDDemuxFFmpeg::SeekTime(double time, bool backwards, double* startpts)
+
+ if (ret >= 0)
+ {
+- if (m_pFormatContext->iformat->read_seek)
++ if (!(m_pFormatContext->iformat->flags & AVFMT_NOTIMESTAMPS))
+ m_seekToKeyFrame = true;
+ m_currentPts = DVD_NOPTS_VALUE;
+ }
+--
+2.43.0
+
+
+From 17ce23505f171235ac6bfff7fbaa3a5b4bc9a8bf Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Thu, 11 Apr 2024 17:13:36 +0200
+Subject: [PATCH 2/7] [ffmpeg] Remove deprecated use of FF_API_INTERLACED_FRAME
+
+---
+ .../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 5 +++--
+ .../VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 9 +++++----
+ xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 6 ++++--
+ xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp | 2 +-
+ 4 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+index eb2943bb8c..4da0722d5c 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+@@ -582,8 +582,9 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
+
+ pVideoPicture->iRepeatPicture = 0;
+ pVideoPicture->iFlags = 0;
+- pVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
+- pVideoPicture->iFlags |= m_pFrame->top_field_first ? DVP_FLAG_TOP_FIELD_FIRST : 0;
++ pVideoPicture->iFlags |= m_pFrame->flags & AV_FRAME_FLAG_INTERLACED ? DVP_FLAG_INTERLACED : 0;
++ pVideoPicture->iFlags |=
++ m_pFrame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST ? DVP_FLAG_TOP_FIELD_FIRST : 0;
+ pVideoPicture->iFlags |= m_pFrame->data[0] ? 0 : DVP_FLAG_DROPPED;
+
+ if (m_codecControlFlags & DVD_CODEC_CTRL_DROP)
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+index d66378fa07..9586d211e9 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+@@ -792,12 +792,12 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecFFmpeg::GetPicture(VideoPicture* pVideoPi
+ }
+ m_dropCtrl.Process(framePTS, m_pCodecContext->skip_frame > AVDISCARD_DEFAULT);
+
+- if (m_pDecodedFrame->key_frame)
++ if (m_pDecodedFrame->flags & AV_FRAME_FLAG_KEY)
+ {
+ m_started = true;
+ m_iLastKeyframe = m_pCodecContext->has_b_frames + 2;
+ }
+- if (m_pDecodedFrame->interlaced_frame)
++ if (m_pDecodedFrame->flags & AV_FRAME_FLAG_INTERLACED)
+ m_interlaced = true;
+ else
+ m_interlaced = false;
+@@ -1013,8 +1013,9 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(VideoPicture* pVideoPicture)
+
+ pVideoPicture->iRepeatPicture = 0.5 * m_pFrame->repeat_pict;
+ pVideoPicture->iFlags = 0;
+- pVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
+- pVideoPicture->iFlags |= m_pFrame->top_field_first ? DVP_FLAG_TOP_FIELD_FIRST: 0;
++ pVideoPicture->iFlags |= m_pFrame->flags & AV_FRAME_FLAG_INTERLACED ? DVP_FLAG_INTERLACED : 0;
++ pVideoPicture->iFlags |=
++ m_pFrame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST ? DVP_FLAG_TOP_FIELD_FIRST : 0;
+
+ if (m_codecControlFlags & DVD_CODEC_CTRL_DROP)
+ {
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+index fb7606e0d0..a62fa6273d 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+@@ -3068,8 +3068,10 @@ bool CFFmpegPostproc::AddPicture(CVaapiDecodedPicture &inPic)
+ m_pFilterFrameIn->height = m_config.vidHeight;
+ m_pFilterFrameIn->linesize[0] = image.pitches[0];
+ m_pFilterFrameIn->linesize[1] = image.pitches[1];
+- m_pFilterFrameIn->interlaced_frame = (inPic.DVDPic.iFlags & DVP_FLAG_INTERLACED) ? 1 : 0;
+- m_pFilterFrameIn->top_field_first = (inPic.DVDPic.iFlags & DVP_FLAG_TOP_FIELD_FIRST) ? 1 : 0;
++ if (inPic.DVDPic.iFlags & DVP_FLAG_INTERLACED)
++ m_pFilterFrameIn->flags |= AV_FRAME_FLAG_INTERLACED;
++ if (inPic.DVDPic.iFlags & DVP_FLAG_TOP_FIELD_FIRST)
++ m_pFilterFrameIn->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
+
+ if (inPic.DVDPic.pts == DVD_NOPTS_VALUE)
+ m_pFilterFrameIn->pts = AV_NOPTS_VALUE;
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp
+index 1f71f643d2..567d63559d 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VTB.cpp
+@@ -196,7 +196,7 @@ CDVDVideoCodec::VCReturn CDecoder::Decode(AVCodecContext* avctx, AVFrame* frame)
+
+ if(frame)
+ {
+- if (frame->interlaced_frame)
++ if (frame->flags & AV_FRAME_FLAG_INTERLACED)
+ return CDVDVideoCodec::VC_FATAL;
+
+ if (m_renderBuffer)
+--
+2.43.0
+
+
+From 01aa01d5c096ff7554c79493eab65dd41b00402f Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Thu, 11 Apr 2024 17:14:48 +0200
+Subject: [PATCH 3/7] [ffmpeg] Remove deprecated use of avcodec_close
+
+---
+ xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
+index 0cdf8c3864..477a2e82ec 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
+@@ -188,7 +188,6 @@ bool CDVDDemuxClient::ParsePacket(DemuxPacket* pkt)
+ if (!avcodec_open2(stream->m_context, stream->m_context->codec, nullptr))
+ {
+ avcodec_send_packet(stream->m_context, avpkt);
+- avcodec_close(stream->m_context);
+ }
+ }
+ av_packet_free(&avpkt);
+--
+2.43.0
+
+
+From b509d439c18bebcf35cc80d18a0997caf6eda8a6 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Thu, 11 Apr 2024 17:15:16 +0200
+Subject: [PATCH 4/7] [ffmpeg] Remove deprecated use av_stream_get_side_data
+
+---
+ .../DVDDemuxers/DVDDemuxFFmpeg.cpp | 53 +++++++++++--------
+ 1 file changed, 32 insertions(+), 21 deletions(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+index 174df53f16..f917bf719f 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+@@ -1630,42 +1630,49 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int streamIdx)
+ st->colorRange = pStream->codecpar->color_range;
+ st->hdr_type = DetermineHdrType(pStream);
+
+- // https://github.com/FFmpeg/FFmpeg/blob/release/5.0/doc/APIchanges
+- size_t size = 0;
+- uint8_t* side_data = nullptr;
++ // https://github.com/FFmpeg/FFmpeg/blob/release/7.0/doc/APIchanges
++ const AVPacketSideData* sideData = nullptr;
+
+ if (st->hdr_type == StreamHdrType::HDR_TYPE_DOLBYVISION)
+ {
+- side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_DOVI_CONF, &size);
+- if (side_data && size)
++
++ sideData =
++ av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data, AV_PKT_DATA_DOVI_CONF);
++ if (sideData && sideData->size)
+ {
+- st->dovi = *reinterpret_cast<AVDOVIDecoderConfigurationRecord*>(side_data);
++ st->dovi = *reinterpret_cast<const AVDOVIDecoderConfigurationRecord*>(sideData->data);
+ }
+ }
+
+- side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, &size);
+- if (side_data && size)
++ sideData = av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_MASTERING_DISPLAY_METADATA);
++ if (sideData && sideData->size)
+ {
+ st->masteringMetaData = std::make_shared<AVMasteringDisplayMetadata>(
+- *reinterpret_cast<AVMasteringDisplayMetadata*>(side_data));
++ *reinterpret_cast<const AVMasteringDisplayMetadata*>(sideData->data));
+ }
+
+- side_data = av_stream_get_side_data(pStream, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, &size);
+- if (side_data && size)
++ sideData = av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_CONTENT_LIGHT_LEVEL);
++ if (sideData && sideData->size)
+ {
+ st->contentLightMetaData = std::make_shared<AVContentLightMetadata>(
+- *reinterpret_cast<AVContentLightMetadata*>(side_data));
++ *reinterpret_cast<const AVContentLightMetadata*>(sideData->data));
+ }
+
+- uint8_t* displayMatrixSideData =
+- av_stream_get_side_data(pStream, AV_PKT_DATA_DISPLAYMATRIX, nullptr);
+- if (displayMatrixSideData)
++ sideData = av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_DISPLAYMATRIX);
++ if (sideData)
+ {
+- const double tetha =
+- av_display_rotation_get(reinterpret_cast<int32_t*>(displayMatrixSideData));
+- if (!std::isnan(tetha))
++ const double theta =
++ av_display_rotation_get(reinterpret_cast<const int32_t*>(sideData->data));
++ if (!std::isnan(theta))
+ {
+- st->iOrientation = ((static_cast<int>(-tetha) % 360) + 360) % 360;
++ st->iOrientation = ((static_cast<int>(-theta) % 360) + 360) % 360;
+ }
+ }
+
+@@ -2488,7 +2495,9 @@ StreamHdrType CDVDDemuxFFmpeg::DetermineHdrType(AVStream* pStream)
+ {
+ StreamHdrType hdrType = StreamHdrType::HDR_TYPE_NONE;
+
+- if (av_stream_get_side_data(pStream, AV_PKT_DATA_DOVI_CONF, nullptr)) // DoVi
++ if (av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_DOVI_CONF)) // DoVi
+ hdrType = StreamHdrType::HDR_TYPE_DOLBYVISION;
+ else if (pStream->codecpar->color_trc == AVCOL_TRC_SMPTE2084) // HDR10
+ hdrType = StreamHdrType::HDR_TYPE_HDR10;
+@@ -2496,7 +2505,9 @@ StreamHdrType CDVDDemuxFFmpeg::DetermineHdrType(AVStream* pStream)
+ hdrType = StreamHdrType::HDR_TYPE_HLG;
+ // file could be SMPTE2086 which FFmpeg currently returns as unknown
+ // so use the presence of static metadata to detect it
+- else if (av_stream_get_side_data(pStream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, nullptr))
++ else if (av_packet_side_data_get(pStream->codecpar->coded_side_data,
++ pStream->codecpar->nb_coded_side_data,
++ AV_PKT_DATA_MASTERING_DISPLAY_METADATA))
+ hdrType = StreamHdrType::HDR_TYPE_HDR10;
+
+ return hdrType;
+--
+2.43.0
+
+
+From 5e7609bfee5e0559d6c29b01fbc4294d27168921 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Thu, 11 Apr 2024 17:15:43 +0200
+Subject: [PATCH 5/7] [ffmpeg] Remove CrystalHD hw acceleration strings
+
+---
+ addons/resource.language.en_gb/resources/strings.po | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
+index 056b1747a0..292aae4a1b 100644
+--- a/addons/resource.language.en_gb/resources/strings.po
++++ b/addons/resource.language.en_gb/resources/strings.po
+@@ -7342,10 +7342,7 @@ msgctxt "#13427"
+ msgid "Allow hardware acceleration - DXVA2"
+ msgstr ""
+
+-#: system/settings/settings.xml
+-msgctxt "#13428"
+-msgid "Allow hardware acceleration - CrystalHD"
+-msgstr ""
++#empty string with id 13428
+
+ #: system/settings/settings.xml
+ msgctxt "#13429"
+@@ -19502,11 +19499,7 @@ msgctxt "#36158"
+ msgid "Enable DXVA2 hardware decoding of video files."
+ msgstr ""
+
+-#. Description of setting with label #13428 "Allow hardware acceleration (CrystalHD)"
+-#: system/settings/settings.xml
+-msgctxt "#36159"
+-msgid "Enable CrystalHD decoding of video files."
+-msgstr ""
++#empty string with id 36159
+
+ #. Description of setting with label #13429 "Allow hardware acceleration (VDADecoder)"
+ #: system/settings/settings.xml
+--
+2.43.0
+
+
+From 813a40bb30285b1b32a7ab6e63953eb3665f051a Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Sat, 13 Apr 2024 10:31:36 +0200
+Subject: [PATCH 6/7] [settings] Remove VideoPlayerignoredtsinwav advanced
+ setting
+
+---
+ xbmc/settings/AdvancedSettings.cpp | 2 --
+ xbmc/settings/AdvancedSettings.h | 1 -
+ 2 files changed, 3 deletions(-)
+
+diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
+index cc06244799..4e2d6badd6 100644
+--- a/xbmc/settings/AdvancedSettings.cpp
++++ b/xbmc/settings/AdvancedSettings.cpp
+@@ -129,7 +129,6 @@ void CAdvancedSettings::Initialize()
+ return;
+
+ m_audioApplyDrc = -1.0f;
+- m_VideoPlayerIgnoreDTSinWAV = false;
+
+ //default hold time of 25 ms, this allows a 20 hertz sine to pass undistorted
+ m_limiterHold = 0.025f;
+@@ -579,7 +578,6 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)
+ GetCustomRegexps(pAudioExcludes, m_audioExcludeFromScanRegExps);
+
+ XMLUtils::GetFloat(pElement, "applydrc", m_audioApplyDrc);
+- XMLUtils::GetBoolean(pElement, "VideoPlayerignoredtsinwav", m_VideoPlayerIgnoreDTSinWAV);
+
+ XMLUtils::GetFloat(pElement, "limiterhold", m_limiterHold, 0.0f, 100.0f);
+ XMLUtils::GetFloat(pElement, "limiterrelease", m_limiterRelease, 0.001f, 100.0f);
+diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
+index 3351caff55..8eabfe8240 100644
+--- a/xbmc/settings/AdvancedSettings.h
++++ b/xbmc/settings/AdvancedSettings.h
+@@ -120,7 +120,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
+
+ std::string m_audioDefaultPlayer;
+ float m_audioPlayCountMinimumPercent;
+- bool m_VideoPlayerIgnoreDTSinWAV;
+ float m_limiterHold;
+ float m_limiterRelease;
+
+--
+2.43.0
+
+
+From 03449b80c2e00a56912b9612afc11f3d53dd4a05 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann(a)gmail.com>
+Date: Sat, 13 Apr 2024 13:07:58 +0200
+Subject: [PATCH 7/7] [ffmpeg] Use new audio DTS and ATMOS profiles
+
+---
+ .../VideoPlayer/DVDDemuxers/DVDDemux.cpp | 20 +++++++++++++------
+ .../DVDInputStreams/InputStreamAddon.cpp | 9 +++------
+ 2 files changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
+index 63fb9264a8..e9aa468dd0 100644
+--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
++++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemux.cpp
+@@ -15,15 +15,15 @@ std::string CDemuxStreamAudio::GetStreamType()
+ std::string strInfo;
+ switch (codec)
+ {
+- //! @todo: With ffmpeg >= 6.1 add new AC4 codec
+ case AV_CODEC_ID_AC3:
+ strInfo = "AC3 ";
+ break;
++ case AV_CODEC_ID_AC4:
++ strInfo = "AC4 ";
++ break;
+ case AV_CODEC_ID_EAC3:
+ {
+- //! @todo: With ffmpeg >= 6.1 add new atmos profile case
+- // "JOC" its EAC3 Atmos underlying profile, there is no standard codec name string
+- if (StringUtils::Contains(codecName, "JOC"))
++ if (profile == FF_PROFILE_EAC3_DDP_ATMOS)
+ strInfo = "DD+ ATMOS ";
+ else
+ strInfo = "DD+ ";
+@@ -31,7 +31,6 @@ std::string CDemuxStreamAudio::GetStreamType()
+ }
+ case AV_CODEC_ID_DTS:
+ {
+- //! @todo: With ffmpeg >= 6.1 add new DTSX profile cases
+ switch (profile)
+ {
+ case FF_PROFILE_DTS_96_24:
+@@ -49,6 +48,12 @@ std::string CDemuxStreamAudio::GetStreamType()
+ case FF_PROFILE_DTS_HD_HRA:
+ strInfo = "DTS-HD HRA ";
+ break;
++ case FF_PROFILE_DTS_HD_MA_X:
++ strInfo = "DTS-HD MA X ";
++ break;
++ case FF_PROFILE_DTS_HD_MA_X_IMAX:
++ strInfo = "DTS-HD MA X (IMAX) ";
++ break;
+ default:
+ strInfo = "DTS ";
+ break;
+@@ -62,7 +67,10 @@ std::string CDemuxStreamAudio::GetStreamType()
+ strInfo = "MP3 ";
+ break;
+ case AV_CODEC_ID_TRUEHD:
+- strInfo = "TrueHD ";
++ if (profile == FF_PROFILE_TRUEHD_ATMOS)
++ strInfo = "TrueHD ATMOS ";
++ else
++ strInfo = "TrueHD ";
+ break;
+ case AV_CODEC_ID_AAC:
+ {
+diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
+index daf66ce0cd..902f38ade2 100644
+--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
++++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp
+@@ -762,14 +762,11 @@ int CInputStreamAddon::ConvertAudioCodecProfile(STREAMCODEC_PROFILE profile)
+ case DTSCodecProfileHDExpress:
+ return FF_PROFILE_DTS_EXPRESS;
+ case DTSCodecProfileHDMAX:
+- //! @todo: with ffmpeg >= 6.1 set the appropriate profile
+- return FF_PROFILE_UNKNOWN; // FF_PROFILE_DTS_HD_MA_X
++ return FF_PROFILE_DTS_HD_MA_X;
+ case DTSCodecProfileHDMAIMAX:
+- //! @todo: with ffmpeg >= 6.1 set the appropriate profile
+- return FF_PROFILE_UNKNOWN; // FF_PROFILE_DTS_HD_MA_X_IMAX
++ return FF_PROFILE_DTS_HD_MA_X_IMAX;
+ case DDPlusCodecProfileAtmos:
+- //! @todo: with ffmpeg >= 6.1 set the appropriate profile
+- return FF_PROFILE_UNKNOWN; // FF_PROFILE_EAC3_DDP_ATMOS
++ return FF_PROFILE_EAC3_DDP_ATMOS;
+ default:
+ return FF_PROFILE_UNKNOWN;
+ }
+
+--
+2.43.0
diff --git a/kodi.spec b/kodi.spec
index e71084d..85d205c 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -82,7 +82,8 @@ Patch1: fix_py313.patch
# ffmpeg-7 fix
# https://github.com/xbmc/xbmc/pull/24972
-Patch2: ffmpeg7.patch
+# https://salsa.debian.org/multimedia-team/kodi-media-center/kodi/-/blob/de...
+Patch2: 0004-ffmpeg7.patch
%ifarch x86_64
%global _with_crystalhd 1
1 month, 2 weeks