[arch-commits] Commit in k3b/repos/extra-x86_64 (PKGBUILD PKGBUILD ffmpeg5.patch)

Antonio Rojas arojas at gemini.archlinux.org
Thu Feb 3 10:39:53 UTC 2022


    Date: Thursday, February 3, 2022 @ 10:39:53
  Author: arojas
Revision: 436006

archrelease: copy trunk to extra-x86_64

Added:
  k3b/repos/extra-x86_64/PKGBUILD
    (from rev 436005, k3b/trunk/PKGBUILD)
  k3b/repos/extra-x86_64/ffmpeg5.patch
    (from rev 436005, k3b/trunk/ffmpeg5.patch)
Deleted:
  k3b/repos/extra-x86_64/PKGBUILD

---------------+
 PKGBUILD      |   83 ++++++++++++++++++++++++++++++--------------------------
 ffmpeg5.patch |   72 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 117 insertions(+), 38 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-02-03 10:39:41 UTC (rev 436005)
+++ PKGBUILD	2022-02-03 10:39:53 UTC (rev 436006)
@@ -1,38 +0,0 @@
-# Maintainer: Eric Bélanger <eric at archlinux.org>
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-
-pkgname=k3b
-pkgver=21.12.1
-pkgrel=1
-epoch=1
-pkgdesc='Feature-rich and easy to handle CD burning application'
-arch=(x86_64)
-url='https://apps.kde.org/k3b/'
-license=(GPL)
-depends=(libkcddb kcmutils knotifyconfig libmad kfilemetadata knewstuff
-         libmpcdec libdvdread libburn qt5-webkit)
-makedepends=(extra-cmake-modules kdoctools)
-optdepends=('cdrtools: for CD burning with cdrecord'
-            'dvd+rw-tools: for DVD burning support'
-            'vcdimager: for VCD burning support'
-            'emovix: for bootable multimedia CD/DVD support'
-            'cdrdao: for disk-at-once (DAO) mode support'
-            'cdparanoia: for CD ripping support' 'transcode: for DVD ripping support')
-groups=(kde-applications kde-multimedia)
-source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
-sha256sums=('6610a6d83d7e7fb57e96f968cec12d180ec7f8514308a6e1388aff0e07f55c0f'
-            'SKIP')
-validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid at kde.org>
-              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck at kde.org>
-              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker at kde.org>
-
-build() {
-  cmake -B build -S $pkgname-$pkgver \
-    -DCMAKE_INSTALL_LIBEXECDIR=lib \
-    -DBUILD_TESTING=OFF
-  cmake --build build
-}
-
-package() {
-  DESTDIR="$pkgdir" cmake --install build
-}

Copied: k3b/repos/extra-x86_64/PKGBUILD (from rev 436005, k3b/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-02-03 10:39:53 UTC (rev 436006)
@@ -0,0 +1,45 @@
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=k3b
+pkgver=21.12.2
+pkgrel=1
+epoch=1
+pkgdesc='Feature-rich and easy to handle CD burning application'
+arch=(x86_64)
+url='https://apps.kde.org/k3b/'
+license=(GPL)
+depends=(libkcddb kcmutils knotifyconfig libmad kfilemetadata knewstuff
+         libmpcdec libdvdread libburn qt5-webkit)
+makedepends=(extra-cmake-modules kdoctools)
+optdepends=('cdrtools: for CD burning with cdrecord'
+            'dvd+rw-tools: for DVD burning support'
+            'vcdimager: for VCD burning support'
+            'emovix: for bootable multimedia CD/DVD support'
+            'cdrdao: for disk-at-once (DAO) mode support'
+            'cdparanoia: for CD ripping support' 'transcode: for DVD ripping support')
+groups=(kde-applications kde-multimedia)
+source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig}
+        ffmpeg5.patch)
+sha256sums=('e9e7313a0835851753c9eb9ce20d830f382bd12057d7f1471686bf82f41f4f66'
+            'SKIP'
+            '4855cef052eebccbbcfabbb59b197cf9ed1703bbf548187a3596692821d89657')
+validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid at kde.org>
+              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck at kde.org>
+              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker at kde.org>
+options=(debug)
+
+prepare() {
+  patch -d $pkgname-$pkgver -p1 < ffmpeg5.patch # Fix build with FFmpeg 5 - patch from Bernhard Rosenkraenzer
+}
+
+build() {
+  cmake -B build -S $pkgname-$pkgver \
+    -DCMAKE_INSTALL_LIBEXECDIR=lib \
+    -DBUILD_TESTING=OFF
+  cmake --build build
+}
+
+package() {
+  DESTDIR="$pkgdir" cmake --install build
+}

Copied: k3b/repos/extra-x86_64/ffmpeg5.patch (from rev 436005, k3b/trunk/ffmpeg5.patch)
===================================================================
--- ffmpeg5.patch	                        (rev 0)
+++ ffmpeg5.patch	2022-02-03 10:39:53 UTC (rev 436006)
@@ -0,0 +1,72 @@
+diff -up k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.omv~ k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+--- k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.omv~	2022-01-17 19:44:11.314744839 +0100
++++ k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp	2022-01-17 19:55:07.045724184 +0100
+@@ -38,7 +38,20 @@ extern "C" {
+ #include <math.h>
+ 
+ 
++#if LIBAVCODEC_VERSION_MAJOR < 59
+ #define FFMPEG_CODEC(s) (s->codec)
++#else
++static QMap<AVStream*,AVCodecContext*> k3b_codec_contexts;
++static inline AVCodecContext *FFMPEG_CODEC(AVStream *s) {
++	if(!k3b_codec_contexts.contains(s)) {
++		const AVCodec *codec = avcodec_find_decoder(s->codecpar->codec_id);
++		AVCodecContext *ctx = avcodec_alloc_context3(codec);
++		avcodec_parameters_to_context(ctx, s->codecpar);
++		k3b_codec_contexts.insert(s, ctx);
++	}
++	return k3b_codec_contexts.value(s);
++}
++#endif
+ 
+ #ifndef HAVE_FFMPEG_AVFORMAT_OPEN_INPUT
+ //      this works because the parameters/options are not used
+@@ -70,7 +83,7 @@ class K3bFFMpegFile::Private
+ {
+ public:
+     ::AVFormatContext* formatContext;
+-    ::AVCodec* codec;
++    const ::AVCodec* codec;
+     ::AVStream *audio_stream;
+ 
+     K3b::Msf length;
+@@ -320,11 +333,28 @@ int K3bFFMpegFile::fillOutputBuffer()
+         }
+ 
+         int gotFrame = 0;
++#if LIBAVCODEC_VERSION_MAJOR < 59
+         int len = ::avcodec_decode_audio4(
+             FFMPEG_CODEC(d->audio_stream),
+             d->frame,
+             &gotFrame,
+             &d->packet );
++#else
++        int ret = ::avcodec_receive_frame(
++            FFMPEG_CODEC(d->audio_stream),
++            d->frame);
++
++        gotFrame = (ret == 0);
++
++        ret = avcodec_send_packet(
++            FFMPEG_CODEC(d->audio_stream),
++            &d->packet );
++        if (ret < 0) {
++            qDebug() << "(K3bFFMpegFile) decoding failed for " << m_filename;
++            return -1;
++        }
++        int len = d->packet.size;
++#endif
+ 
+         if( d->packetSize <= 0 || len < 0 )
+             ::av_packet_unref( &d->packet );
+@@ -393,7 +423,9 @@ bool K3bFFMpegFile::seek( const K3b::Msf
+ 
+ K3bFFMpegWrapper::K3bFFMpegWrapper()
+ {
++#if LIBAVCODEC_VERSION_MAJOR < 59
+     ::av_register_all();
++#endif
+ }
+ 
+ 



More information about the arch-commits mailing list