-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
011484c
commit 2b359f6
Showing
5 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
openboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Patch-Source: https://github.com/OpenBoard-org/OpenBoard/commit/09c2e2573767d56e6c95277c3f53071f5282cf4a | ||
-- | ||
From ffeea1b662b012bd25a025f2130fa2c2044919f9 Mon Sep 17 00:00:00 2001 | ||
From: Vekhir <[email protected]> | ||
Date: Mon, 13 May 2024 10:58:33 +0200 | ||
Subject: [PATCH] fix: Make CMAKE_CXX_STANDARD a cache variable | ||
|
||
poppler 24.05 exposes std::string::starts_with in its headers | ||
which requires C++20. Requiring C++20 means dropping support | ||
for still maintained distributions. As such, the C++ standard | ||
defaults to the current C++17, but can be overridden where | ||
necessary. | ||
|
||
Emit a status message showing the chosen C++ standard for debug | ||
purposes. | ||
--- | ||
CMakeLists.txt | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 97ad4f50f..33a5599b2 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -80,7 +80,7 @@ set(OPENBOARD_MIMEICON_FILE resources/linux/ch.openboard.application-ubz.svg) | ||
# Basic compiler settings | ||
# ========================================================================== | ||
|
||
-set(CMAKE_CXX_STANDARD 17) | ||
+set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use - defaults to C++17") | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
@@ -89,6 +89,8 @@ list(APPEND CMAKE_AUTOUIC_SEARCH_PATHS | ||
${OPENBOARD_FORMS_DIR} | ||
) | ||
|
||
+message(STATUS "Using C++" ${CMAKE_CXX_STANDARD}) | ||
+ | ||
# OpenMP support | ||
include(FindOpenMP) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Patch-Source: https://github.com/OpenBoard-org/OpenBoard/commit/4f45b6c4016972cf5835f9188bda6197b1b4ed2f | ||
-- | ||
From 4f45b6c4016972cf5835f9188bda6197b1b4ed2f Mon Sep 17 00:00:00 2001 | ||
From: Vekhir <[email protected]> | ||
Date: Tue, 18 Jun 2024 06:18:32 +0200 | ||
Subject: [PATCH] fix: Support FFmpeg 7.0 | ||
|
||
The `channels` attribute was deprecated for a long time and has finally | ||
been removed with 7.0. | ||
Use `ch_layout.nb_channels` which is the recommended alternative. | ||
--- | ||
src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | 14 ++++++++++++-- | ||
1 file changed, 12 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp b/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | ||
index b7c3f944c..bd25946d8 100644 | ||
--- a/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | ||
+++ b/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | ||
@@ -520,7 +520,12 @@ bool UBFFmpegVideoEncoder::init() | ||
} | ||
|
||
// Buffer for resampled/converted audio | ||
- mAudioOutBuffer = av_audio_fifo_alloc(c->sample_fmt, c->channels, c->frame_size); | ||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 3, 100) | ||
+ int nb_channels = c->channels; | ||
+#else | ||
+ int nb_channels = c->ch_layout.nb_channels; | ||
+#endif | ||
+ mAudioOutBuffer = av_audio_fifo_alloc(c->sample_fmt, nb_channels, c->frame_size); | ||
} | ||
|
||
|
||
@@ -639,8 +644,13 @@ void UBFFmpegVideoEncoder::processAudio(QByteArray &data) | ||
uint8_t ** outSamples = nullptr; | ||
int outSamplesLineSize; | ||
|
||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 3, 100) | ||
+ int nb_channels = codecContext->channels; | ||
+#else | ||
+ int nb_channels = codecContext->ch_layout.nb_channels; | ||
+#endif | ||
ret = av_samples_alloc_array_and_samples(&outSamples, &outSamplesLineSize, | ||
- codecContext->channels, outSamplesCount, | ||
+ nb_channels, outSamplesCount, | ||
codecContext->sample_fmt, 0); | ||
if (ret < 0) { | ||
qWarning() << "Could not allocate audio samples" << avErrorToQString(ret); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Patch-Source: https://github.com/OpenBoard-org/OpenBoard/commit/315bcac782e10cc6ceef1fc8b78fff40541ea38f | ||
-- | ||
From 315bcac782e10cc6ceef1fc8b78fff40541ea38f Mon Sep 17 00:00:00 2001 | ||
From: Vekhir <[email protected]> | ||
Date: Tue, 18 Jun 2024 06:20:15 +0200 | ||
Subject: [PATCH] fix: Resolve FFmpeg 7.0 warnings | ||
|
||
`avcodec_close` has been discouraged from use since 2.3 and is | ||
formally deprecated with 7.0. Use `avcodec_free_context` instead. | ||
|
||
`avcodec_free_context` takes a double pointer as argument. | ||
--- | ||
src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
diff --git a/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp b/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | ||
index bd25946d8..24451f27a 100644 | ||
--- a/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | ||
+++ b/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | ||
@@ -746,11 +746,19 @@ void UBFFmpegVideoEncoder::finishEncoding() | ||
av_write_trailer(mOutputFormatContext); | ||
avio_close(mOutputFormatContext->pb); | ||
|
||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 3, 100) | ||
avcodec_close(mVideoCodecContext); | ||
+#else | ||
+ avcodec_free_context(&mVideoCodecContext); | ||
+#endif | ||
sws_freeContext(mSwsContext); | ||
|
||
if (mShouldRecordAudio) { | ||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 3, 100) | ||
avcodec_close(mAudioCodecContext); | ||
+#else | ||
+ avcodec_free_context(&mAudioCodecContext); | ||
+#endif | ||
swr_free(&mSwrContext); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
pkgname = "openboard" | ||
pkgver = "1.7.1" | ||
pkgrel = 0 | ||
build_style = "cmake" | ||
configure_args = ["-DCMAKE_CXX_STANDARD=20"] | ||
hostmakedepends = ["cmake", "ninja", "pkgconf"] | ||
makedepends = [ | ||
"ffmpeg-devel", | ||
"openssl-devel", | ||
"poppler-devel", | ||
"qt6-qt5compat-devel", | ||
"qt6-qtbase-devel", | ||
"qt6-qtmultimedia-devel", | ||
"qt6-qtsvg-devel", | ||
"qt6-qttools-devel", | ||
"qt6-qtwebengine-devel", | ||
"quazip-devel", | ||
] | ||
pkgdesc = "Interactive whiteboard application" | ||
maintainer = "breakgimme <[email protected]>" | ||
license = "GPL-3.0-or-later" | ||
url = "https://openboard.ch" | ||
source = f"https://github.com/OpenBoard-org/OpenBoard/archive/refs/tags/v{pkgver}.tar.gz" | ||
sha256 = "5c9fcb54bc1598b4b7026e6ecca07137660dd3d45bda472a5710acf600a2a22f" | ||
|
||
|
||
@subpackage("openboard-locale") | ||
def _(self): | ||
self.install_if = [self.parent, "base-locale"] | ||
return ["usr/share/openboard/i18n"] |