summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Cowdery Lack2022-03-01 13:21:58 +1100
committerOscar Cowdery Lack2022-03-01 13:21:58 +1100
commitd98ec8a60357caf0f64b2b7f651badacdb5c1cdf (patch)
tree06c8c4cabeb0b060a2c68fed46737d14f5de3ea8
parenta9a0f8bcb3b2e9ab8ccf2c8aed46c8d2d07831f6 (diff)
downloadaur-d98ec8a60357caf0f64b2b7f651badacdb5c1cdf.tar.gz
2.3.3-5
- Use upstream commits for merged patches - Fix more issues with ffmpeg 5.0
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD19
-rw-r--r--ffmpeg-5.0.patch206
3 files changed, 225 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a7171b0ddf24..a0372f534e9c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = casparcg-server
pkgdesc = Software used to play out professional graphics, audio and video to multiple outputs
pkgver = 2.3.3
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/CasparCG/server
arch = x86_64
license = GPL3
@@ -24,28 +24,28 @@ pkgbase = casparcg-server
depends = ttf-liberation
source = https://github.com/CasparCG/server/archive/refs/tags/v2.3.3-lts-stable.tar.gz
source = https://github.com/CasparCG/server/commit/f0e678e7cabc69d573d59f24f9fd3ceca322ab85.patch
+ source = https://github.com/CasparCG/server/commit/9cafa27838039aa65af3c97fe7d0c4531a952cdc.patch
+ source = https://github.com/CasparCG/server/commit/9b0990bee89b7a9fa195db75c976c2b20e33ebb5.patch
+ source = https://github.com/CasparCG/server/commit/e0bbb969b171c85332e77ee8b50f29b4634b7ad7.patch
source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1394.patch
- source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1395.patch
- source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1396.patch
source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1397.patch
- source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1398.patch
source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1308.patch
source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1418.patch
- source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1419.patch
source = https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1420.patch
+ source = ffmpeg-5.0.patch
source = https://cef-builds.spotifycdn.com/cef_binary_3.3578.1870.gc974488_linux64_minimal.tar.bz2
source = casparcg
sha256sums = 6d8e973949009e95bb5a6496e26cbe680efd77666936e131df0da569f8f7c7e1
sha256sums = 320576b7293b658166fe7e58393267a4fbfdc9802f42ae7bf95401a9cc78801f
+ sha256sums = b67cd51d6b01fef1080b49cbb146e94981b1681b90aa3e5a4c28309ce1d5db1b
+ sha256sums = 3e9d6c96f3b196eb3104a59f99dab86a823c887a71ea09883f094003a184ad65
+ sha256sums = c698a177a13a32ad2eb5e1a4ba304526cebc4b63c459893288f14147c4d83ae6
sha256sums = ab663b18f7221d4bcb0835ec7290910341c94a6f3b03cb6defb3eabeaf0f3396
- sha256sums = c0be24d0cc893b4bc402223307691bf5f321d3d6f3918333c55b65db20bacb59
- sha256sums = ddcd8a63e3b12f3199aca4baab867b4f207f247e29a9c48800a1d36f1508b319
sha256sums = 153aea3dc15646db29c01ae4ee82517bbb024bf1d177ed1ea55bd080b525d06e
- sha256sums = 8c417d204e98aa46328a2682bd197a44c479e9dc4ad498a29f57dc1b1f2fa1c6
sha256sums = 5c6f2a3007e3a8739bc1f3eaec3c694af9836aed1943217843a92acff80950c1
sha256sums = 322158baef39dff7bfcf899a2ffea0fbe148443664beac380b9be6858a2b71d1
- sha256sums = 32a1a782a2acc868e8a09f89b116e8d9d6dcb82f87803a73559aeaf5128dac85
sha256sums = a87a88f65e9cf192f4ae93afb20ecc4527b2357ebe1e26e23425d1e8f5e888ed
+ sha256sums = ea1ba9f796f51325f83f2fb1ab73d08be2dcb8afd445cbc860c72762855a5d81
sha256sums = b7c5401f342917ece7be583566bfc48b5cc1a8ff9f6470d396130b4aca7dfb22
sha256sums = ce9dd83ae2ef9289e551f0a3ecbe246537195049c15f69bbfdc6c3ddd23291c2
diff --git a/PKGBUILD b/PKGBUILD
index c423a4c9699a..41c353411c98 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,37 +3,38 @@ pkgname=casparcg-server
pkgver=2.3.3
_pkgver=$pkgver-lts-stable
_cef_version=3.3578.1870.gc974488
-pkgrel=4
+pkgrel=5
pkgdesc="Software used to play out professional graphics, audio and video to multiple outputs"
arch=('x86_64')
url="https://github.com/CasparCG/server"
license=('GPL3')
depends=(ffmpeg libgl freeimage glew tbb openal sfml libxcomposite libxss pango nss at-spi2-atk ttf-liberation)
makedepends=(cmake ninja boost dos2unix)
+options=(debug !strip)
source=("https://github.com/CasparCG/server/archive/refs/tags/v$_pkgver.tar.gz"
"https://github.com/CasparCG/server/commit/f0e678e7cabc69d573d59f24f9fd3ceca322ab85.patch"
+ "https://github.com/CasparCG/server/commit/9cafa27838039aa65af3c97fe7d0c4531a952cdc.patch"
+ "https://github.com/CasparCG/server/commit/9b0990bee89b7a9fa195db75c976c2b20e33ebb5.patch"
+ "https://github.com/CasparCG/server/commit/e0bbb969b171c85332e77ee8b50f29b4634b7ad7.patch"
"https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1394.patch"
- "https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1395.patch"
- "https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1396.patch"
"https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1397.patch"
- "https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1398.patch"
"https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1308.patch"
"https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1418.patch"
- "https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1419.patch"
"https://patch-diff.githubusercontent.com/raw/CasparCG/server/pull/1420.patch"
+ "ffmpeg-5.0.patch"
"https://cef-builds.spotifycdn.com/cef_binary_${_cef_version}_linux64_minimal.tar.bz2"
casparcg)
sha256sums=('6d8e973949009e95bb5a6496e26cbe680efd77666936e131df0da569f8f7c7e1'
'320576b7293b658166fe7e58393267a4fbfdc9802f42ae7bf95401a9cc78801f'
+ 'b67cd51d6b01fef1080b49cbb146e94981b1681b90aa3e5a4c28309ce1d5db1b'
+ '3e9d6c96f3b196eb3104a59f99dab86a823c887a71ea09883f094003a184ad65'
+ 'c698a177a13a32ad2eb5e1a4ba304526cebc4b63c459893288f14147c4d83ae6'
'ab663b18f7221d4bcb0835ec7290910341c94a6f3b03cb6defb3eabeaf0f3396'
- 'c0be24d0cc893b4bc402223307691bf5f321d3d6f3918333c55b65db20bacb59'
- 'ddcd8a63e3b12f3199aca4baab867b4f207f247e29a9c48800a1d36f1508b319'
'153aea3dc15646db29c01ae4ee82517bbb024bf1d177ed1ea55bd080b525d06e'
- '8c417d204e98aa46328a2682bd197a44c479e9dc4ad498a29f57dc1b1f2fa1c6'
'5c6f2a3007e3a8739bc1f3eaec3c694af9836aed1943217843a92acff80950c1'
'322158baef39dff7bfcf899a2ffea0fbe148443664beac380b9be6858a2b71d1'
- '32a1a782a2acc868e8a09f89b116e8d9d6dcb82f87803a73559aeaf5128dac85'
'a87a88f65e9cf192f4ae93afb20ecc4527b2357ebe1e26e23425d1e8f5e888ed'
+ '3e9c407baa225f9654503f277a4ad7cb9fef2cc40da70867777549e4719c4e71'
'b7c5401f342917ece7be583566bfc48b5cc1a8ff9f6470d396130b4aca7dfb22'
'ce9dd83ae2ef9289e551f0a3ecbe246537195049c15f69bbfdc6c3ddd23291c2')
diff --git a/ffmpeg-5.0.patch b/ffmpeg-5.0.patch
new file mode 100644
index 000000000000..2c6a461da44d
--- /dev/null
+++ b/ffmpeg-5.0.patch
@@ -0,0 +1,206 @@
+diff --git a/src/modules/decklink/producer/decklink_producer.cpp b/src/modules/decklink/producer/decklink_producer.cpp
+index 87c115d87..16b1af0e6 100644
+--- a/src/modules/decklink/producer/decklink_producer.cpp
++++ b/src/modules/decklink/producer/decklink_producer.cpp
+@@ -58,6 +58,7 @@ extern "C" {
+ #include <libavfilter/buffersink.h>
+ #include <libavfilter/buffersrc.h>
+ #include <libavformat/avformat.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/opt.h>
+ #include <libavutil/pixfmt.h>
+ #include <libavutil/samplefmt.h>
+diff --git a/src/modules/ffmpeg/consumer/ffmpeg_consumer.cpp b/src/modules/ffmpeg/consumer/ffmpeg_consumer.cpp
+index c7aa6ea4a..6f9182757 100644
+--- a/src/modules/ffmpeg/consumer/ffmpeg_consumer.cpp
++++ b/src/modules/ffmpeg/consumer/ffmpeg_consumer.cpp
+@@ -57,6 +57,7 @@ extern "C" {
+ #include <libavfilter/buffersink.h>
+ #include <libavfilter/buffersrc.h>
+ #include <libavformat/avformat.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/opt.h>
+ #include <libavutil/pixfmt.h>
+ #include <libavutil/samplefmt.h>
+diff --git a/src/modules/ffmpeg/ffmpeg.cpp b/src/modules/ffmpeg/ffmpeg.cpp
+index dc532eb55..ee3d25449 100644
+--- a/src/modules/ffmpeg/ffmpeg.cpp
++++ b/src/modules/ffmpeg/ffmpeg.cpp
+@@ -49,37 +49,6 @@ extern "C" {
+ }
+
+ namespace caspar { namespace ffmpeg {
+-int ffmpeg_lock_callback(void** mutex, enum AVLockOp op)
+-{
+- if (mutex == nullptr)
+- return 0;
+-
+- auto my_mutex = reinterpret_cast<std::recursive_mutex*>(*mutex);
+-
+- switch (op) {
+- case AV_LOCK_CREATE: {
+- *mutex = new std::recursive_mutex();
+- break;
+- }
+- case AV_LOCK_OBTAIN: {
+- if (my_mutex != nullptr)
+- my_mutex->lock();
+- break;
+- }
+- case AV_LOCK_RELEASE: {
+- if (my_mutex != nullptr)
+- my_mutex->unlock();
+- break;
+- }
+- case AV_LOCK_DESTROY: {
+- delete my_mutex;
+- *mutex = nullptr;
+- break;
+- }
+- }
+- return 0;
+-}
+-
+ static void sanitize(uint8_t* line)
+ {
+ while (*line != 0u) {
+@@ -143,18 +112,16 @@ void log_for_thread(void* ptr, int level, const char* fmt, va_list vl) { log_cal
+
+ void init(core::module_dependencies dependencies)
+ {
+- av_lockmgr_register(ffmpeg_lock_callback);
+ av_log_set_callback(log_for_thread);
+
+- avfilter_register_all();
+- av_register_all();
+ avformat_network_init();
+- avcodec_register_all();
+ avdevice_register_all();
+
++#if LIBAVFORMAT_VERSION_MAJOR < 59
+ // mpegts demuxer does not seek acture with binary search.
+ const auto ts_demuxer = av_find_input_format("mpegts");
+ ts_demuxer->flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT | AVFMT_NOBINSEARCH | AVFMT_GENERIC_INDEX;
++#endif
+
+ dependencies.consumer_registry->register_consumer_factory(L"FFmpeg Consumer", create_consumer);
+ dependencies.consumer_registry->register_preconfigured_consumer_factory(L"ffmpeg", create_preconfigured_consumer);
+@@ -166,6 +133,5 @@ void uninit()
+ {
+ // avfilter_uninit();
+ avformat_network_deinit();
+- av_lockmgr_register(nullptr);
+ }
+ }} // namespace caspar::ffmpeg
+diff --git a/src/modules/ffmpeg/producer/av_input.cpp b/src/modules/ffmpeg/producer/av_input.cpp
+index 775491e20..bc3946aa8 100644
+--- a/src/modules/ffmpeg/producer/av_input.cpp
++++ b/src/modules/ffmpeg/producer/av_input.cpp
+@@ -124,7 +124,7 @@ void Input::internal_reset()
+
+ static const std::set<std::wstring> PROTOCOLS_TREATED_AS_FORMATS = {L"dshow", L"v4l2", L"iec61883"};
+
+- AVInputFormat* input_format = nullptr;
++ const AVInputFormat* input_format = nullptr;
+ auto url_parts = caspar::protocol_split(u16(filename_));
+ if (url_parts.first == L"http" || url_parts.first == L"https") {
+ FF(av_dict_set(&options, "multiple_requests", "1", 0)); // NOTE https://trac.ffmpeg.org/ticket/7034#comment:3
+diff --git a/src/modules/ffmpeg/producer/av_producer.cpp b/src/modules/ffmpeg/producer/av_producer.cpp
+index 6b31f8f81..e20eb6703 100644
+--- a/src/modules/ffmpeg/producer/av_producer.cpp
++++ b/src/modules/ffmpeg/producer/av_producer.cpp
+@@ -36,6 +36,7 @@ extern "C" {
+ #include <libavfilter/buffersrc.h>
+ #include <libavformat/avformat.h>
+ #include <libavutil/avutil.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/error.h>
+ #include <libavutil/opt.h>
+ #include <libavutil/pixfmt.h>
+@@ -102,8 +103,6 @@ struct Decoder
+
+ FF(avcodec_parameters_to_context(ctx.get(), stream->codecpar));
+
+- FF(av_opt_set_int(ctx.get(), "refcounted_frames", 1, 0));
+-
+ int numThreads = 1;
+ if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
+ numThreads = 0;
+diff --git a/src/modules/ffmpeg/util/av_util.cpp b/src/modules/ffmpeg/util/av_util.cpp
+index 96d535446..17717e939 100644
+--- a/src/modules/ffmpeg/util/av_util.cpp
++++ b/src/modules/ffmpeg/util/av_util.cpp
+@@ -9,7 +9,9 @@
+ extern "C" {
+ #include <libavcodec/avcodec.h>
+ #include <libavfilter/avfilter.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/frame.h>
++#include <libavutil/imgutils.h>
+ #include <libavutil/pixfmt.h>
+ }
+ #if defined(_MSC_VER)
+@@ -119,47 +121,50 @@ core::pixel_format get_pixel_format(AVPixelFormat pix_fmt)
+ core::pixel_format_desc pixel_format_desc(AVPixelFormat pix_fmt, int width, int height, std::vector<int>& data_map)
+ {
+ // Get linesizes
+- AVPicture dummy_pict;
+- avpicture_fill(&dummy_pict, nullptr, pix_fmt, width, height);
++ int linesizes[4];
++ av_image_fill_linesizes(linesizes, pix_fmt, width);
+
+ core::pixel_format_desc desc = get_pixel_format(pix_fmt);
+
+ switch (desc.format) {
+ case core::pixel_format::gray:
+ case core::pixel_format::luma: {
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[0], height, 1));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[0], height, 1));
+ return desc;
+ }
+ case core::pixel_format::bgr:
+ case core::pixel_format::rgb: {
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[0] / 3, height, 3));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[0] / 3, height, 3));
+ return desc;
+ }
+ case core::pixel_format::bgra:
+ case core::pixel_format::argb:
+ case core::pixel_format::rgba:
+ case core::pixel_format::abgr: {
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[0] / 4, height, 4));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[0] / 4, height, 4));
+ return desc;
+ }
+ case core::pixel_format::ycbcr:
+ case core::pixel_format::ycbcra: {
+ // Find chroma height
+- auto size2 = static_cast<int>(dummy_pict.data[2] - dummy_pict.data[1]);
+- auto h2 = size2 / dummy_pict.linesize[1];
++ size_t sizes[4];
++ ptrdiff_t linesizes1[4];
++ for (int i = 0; i < 4; i++) linesizes1[i] = linesizes[i];
++ av_image_fill_plane_sizes(sizes, pix_fmt, height, linesizes1);
++ auto h2 = sizes[1] / linesizes[1];
+
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[0], height, 1));
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[1], h2, 1));
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[2], h2, 1));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[0], height, 1));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[1], h2, 1));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[2], h2, 1));
+
+ if (desc.format == core::pixel_format::ycbcra)
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[3], height, 1));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[3], height, 1));
+
+ return desc;
+ }
+ case core::pixel_format::uyvy: {
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[0] / 2, height, 2));
+- desc.planes.push_back(core::pixel_format_desc::plane(dummy_pict.linesize[0] / 4, height, 4));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[0] / 2, height, 2));
++ desc.planes.push_back(core::pixel_format_desc::plane(linesizes[0] / 4, height, 4));
+
+ data_map.clear();
+ data_map.push_back(0);