[arch-commits] Commit in k3b/repos (10 files)
Antonio Rojas
arojas at archlinux.org
Wed May 4 20:48:57 UTC 2016
Date: Wednesday, May 4, 2016 @ 22:48:57
Author: arojas
Revision: 266890
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
k3b/repos/extra-i686/PKGBUILD
(from rev 266889, k3b/trunk/PKGBUILD)
k3b/repos/extra-i686/k3b-ffmpeg3.patch
(from rev 266889, k3b/trunk/k3b-ffmpeg3.patch)
k3b/repos/extra-x86_64/PKGBUILD
(from rev 266889, k3b/trunk/PKGBUILD)
k3b/repos/extra-x86_64/k3b-ffmpeg3.patch
(from rev 266889, k3b/trunk/k3b-ffmpeg3.patch)
Deleted:
k3b/repos/extra-i686/PKGBUILD
k3b/repos/extra-i686/k3b-ffmpeg3.patch
k3b/repos/extra-i686/k3b.install
k3b/repos/extra-x86_64/PKGBUILD
k3b/repos/extra-x86_64/k3b-ffmpeg3.patch
k3b/repos/extra-x86_64/k3b.install
--------------------------------+
/PKGBUILD | 90 ++++++++++++
/k3b-ffmpeg3.patch | 276 +++++++++++++++++++++++++++++++++++++++
extra-i686/PKGBUILD | 46 ------
extra-i686/k3b-ffmpeg3.patch | 138 -------------------
extra-i686/k3b.install | 13 -
extra-x86_64/PKGBUILD | 46 ------
extra-x86_64/k3b-ffmpeg3.patch | 138 -------------------
extra-x86_64/k3b.install | 13 -
8 files changed, 366 insertions(+), 394 deletions(-)
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2016-05-04 20:48:26 UTC (rev 266889)
+++ extra-i686/PKGBUILD 2016-05-04 20:48:57 UTC (rev 266890)
@@ -1,46 +0,0 @@
-# $Id$
-# Maintainer: Eric Bélanger <eric at archlinux.org>
-
-pkgname=k3b
-pkgver=2.0.3a
-pkgrel=5
-epoch=1
-pkgdesc="Feature-rich and easy to handle CD burning application"
-arch=('i686' 'x86_64')
-url="http://sourceforge.net/projects/k3b/"
-license=('GPL')
-depends=('kdebase-runtime' 'libkcddb' 'libsamplerate' 'libmad'
- 'ffmpeg' 'taglib' 'libmpcdec' 'libdvdread' 'cdrkit' 'libxft')
-makedepends=('cmake' 'automoc4' 'docbook-xml')
-optdepends=('dvd+rw-tools: for dvd burning support'
- 'vcdimager: for vcd burning support'
- 'transcode: for advanced mpeg conversion support'
- 'emovix: for bootable multimedia cd/dvd support'
- 'cdrdao: for disk-at-once (DAO) mode support'
- 'cdparanoia: for cd ripping support')
-install=k3b.install
-source=(http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.xz k3b-ffmpeg3.patch)
-sha1sums=('f1001db3b5b32ef6bdb827742f1ca357c82b216f'
- '8ee47b04e92499d484c49e33dd33dabdf53025c9')
-
-prepare() {
- cd $pkgname-2.0.3
-# Workaround build failure with cmake 3.4
- sed -e "s|^cmake_minimum_required|#cmake_minimum_required|" -i CMakeLists.txt
-# Fix build with ffmpeg 3.0 (Gentoo)
- patch -p1 -i ../k3b-ffmpeg3.patch
-}
-
-build() {
- mkdir build
- cd build
- cmake ../${pkgname}-2.0.3 \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release
- make
-}
-
-package() {
- cd build
- make DESTDIR="${pkgdir}" install
-}
Copied: k3b/repos/extra-i686/PKGBUILD (from rev 266889, k3b/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2016-05-04 20:48:57 UTC (rev 266890)
@@ -0,0 +1,45 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=k3b
+pkgver=2.0.3a
+pkgrel=6
+epoch=1
+pkgdesc="Feature-rich and easy to handle CD burning application"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/k3b/"
+license=('GPL')
+depends=('kdebase-runtime' 'libkcddb' 'libsamplerate' 'libmad'
+ 'ffmpeg' 'taglib' 'libmpcdec' 'libdvdread' 'cdrkit' 'libxft')
+makedepends=('cmake' 'automoc4' 'docbook-xml')
+optdepends=('dvd+rw-tools: for dvd burning support'
+ 'vcdimager: for vcd burning support'
+ 'transcode: for advanced mpeg conversion support'
+ 'emovix: for bootable multimedia cd/dvd support'
+ 'cdrdao: for disk-at-once (DAO) mode support'
+ 'cdparanoia: for cd ripping support')
+source=(http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.xz k3b-ffmpeg3.patch)
+sha1sums=('f1001db3b5b32ef6bdb827742f1ca357c82b216f'
+ '8ee47b04e92499d484c49e33dd33dabdf53025c9')
+
+prepare() {
+ cd $pkgname-2.0.3
+# Workaround build failure with cmake 3.4
+ sed -e "s|^cmake_minimum_required|#cmake_minimum_required|" -i CMakeLists.txt
+# Fix build with ffmpeg 3.0 (Gentoo)
+ patch -p1 -i ../k3b-ffmpeg3.patch
+}
+
+build() {
+ mkdir build
+ cd build
+ cmake ../${pkgname}-2.0.3 \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="${pkgdir}" install
+}
Deleted: extra-i686/k3b-ffmpeg3.patch
===================================================================
--- extra-i686/k3b-ffmpeg3.patch 2016-05-04 20:48:26 UTC (rev 266889)
+++ extra-i686/k3b-ffmpeg3.patch 2016-05-04 20:48:57 UTC (rev 266890)
@@ -1,138 +0,0 @@
-From 52d3d64863d2fab4128f524870851f18f5cae1fc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= <oldium.pro at seznam.cz>
-Date: Sat, 14 Feb 2015 15:31:07 +0100
-Subject: [PATCH] Fixed compilation with newer ffmpeg/libav.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Oldřich Jedlička <oldium.pro at seznam.cz>
----
- plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 60 ++++++++++++++++++++++++-----
- 1 file changed, 50 insertions(+), 10 deletions(-)
-
-diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
-index 5451fd3..2f80fd6 100644
---- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
-+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
-@@ -86,8 +86,12 @@ public:
- K3b::Msf length;
-
- // for decoding. ffmpeg requires 16-byte alignment.
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ ::AVFrame* frame;
-+#else
- char outputBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE + 15];
- char* alignedOutputBuffer;
-+#endif
- char* outputBufferPos;
- int outputBufferSize;
- ::AVPacket packet;
-@@ -102,14 +106,29 @@ K3bFFMpegFile::K3bFFMpegFile( const QString& filename )
- d = new Private;
- d->formatContext = 0;
- d->codec = 0;
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
-+ d->frame = avcodec_alloc_frame();
-+# else
-+ d->frame = av_frame_alloc();
-+# endif
-+#else
- int offset = 0x10 - (reinterpret_cast<intptr_t>(&d->outputBuffer) & 0xf);
- d->alignedOutputBuffer = &d->outputBuffer[offset];
-+#endif
- }
-
-
- K3bFFMpegFile::~K3bFFMpegFile()
- {
- close();
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
-+ av_free(d->frame);
-+# else
-+ av_frame_free(&d->frame);
-+# endif
-+#endif
- delete d;
- }
-
-@@ -326,26 +345,36 @@ int K3bFFMpegFile::fillOutputBuffer()
- return 0;
- }
-
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ int gotFrame = 0;
-+ int len = ::avcodec_decode_audio4(
-+#else
- d->outputBufferPos = d->alignedOutputBuffer;
- d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
--
--#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
-+# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
- int len = ::avcodec_decode_audio3(
--#else
--# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
-- int len = ::avcodec_decode_audio2(
- # else
-+# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
-+ int len = ::avcodec_decode_audio2(
-+# else
- int len = ::avcodec_decode_audio(
-+# endif
- # endif
- #endif
-
- FFMPEG_CODEC(d->formatContext->streams[0]),
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ d->frame,
-+ &gotFrame,
-+ &d->packet );
-+#else
- (short*)d->alignedOutputBuffer,
- &d->outputBufferSize,
--#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
-+# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
- &d->packet );
--#else
-+# else
- d->packetData, d->packetSize );
-+# endif
- #endif
-
- if( d->packetSize <= 0 || len < 0 )
-@@ -355,6 +384,17 @@ int K3bFFMpegFile::fillOutputBuffer()
- return -1;
- }
-
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ if ( gotFrame ) {
-+ d->outputBufferSize = ::av_samples_get_buffer_size(
-+ NULL,
-+ FFMPEG_CODEC(d->formatContext->streams[0])->channels,
-+ d->frame->nb_samples,
-+ FFMPEG_CODEC(d->formatContext->streams[0])->sample_fmt,
-+ 1 );
-+ d->outputBufferPos = reinterpret_cast<char*>( d->frame->data[0] );
-+ }
-+#endif
- d->packetSize -= len;
- d->packetData += len;
- }
-@@ -420,9 +460,9 @@ K3bFFMpegFile* K3bFFMpegWrapper::open( const QString& filename ) const
- // mp3 being one of them sadly. Most importantly: allow the libsndfile decoder to do
- // its thing.
- //
-- if( file->type() == CODEC_ID_WMAV1 ||
-- file->type() == CODEC_ID_WMAV2 ||
-- file->type() == CODEC_ID_AAC )
-+ if( file->type() == AV_CODEC_ID_WMAV1 ||
-+ file->type() == AV_CODEC_ID_WMAV2 ||
-+ file->type() == AV_CODEC_ID_AAC )
- #endif
- return file;
- }
---
-2.0.5
-
Copied: k3b/repos/extra-i686/k3b-ffmpeg3.patch (from rev 266889, k3b/trunk/k3b-ffmpeg3.patch)
===================================================================
--- extra-i686/k3b-ffmpeg3.patch (rev 0)
+++ extra-i686/k3b-ffmpeg3.patch 2016-05-04 20:48:57 UTC (rev 266890)
@@ -0,0 +1,138 @@
+From 52d3d64863d2fab4128f524870851f18f5cae1fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= <oldium.pro at seznam.cz>
+Date: Sat, 14 Feb 2015 15:31:07 +0100
+Subject: [PATCH] Fixed compilation with newer ffmpeg/libav.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Oldřich Jedlička <oldium.pro at seznam.cz>
+---
+ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 60 ++++++++++++++++++++++++-----
+ 1 file changed, 50 insertions(+), 10 deletions(-)
+
+diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+index 5451fd3..2f80fd6 100644
+--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
++++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+@@ -86,8 +86,12 @@ public:
+ K3b::Msf length;
+
+ // for decoding. ffmpeg requires 16-byte alignment.
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ ::AVFrame* frame;
++#else
+ char outputBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE + 15];
+ char* alignedOutputBuffer;
++#endif
+ char* outputBufferPos;
+ int outputBufferSize;
+ ::AVPacket packet;
+@@ -102,14 +106,29 @@ K3bFFMpegFile::K3bFFMpegFile( const QString& filename )
+ d = new Private;
+ d->formatContext = 0;
+ d->codec = 0;
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
++ d->frame = avcodec_alloc_frame();
++# else
++ d->frame = av_frame_alloc();
++# endif
++#else
+ int offset = 0x10 - (reinterpret_cast<intptr_t>(&d->outputBuffer) & 0xf);
+ d->alignedOutputBuffer = &d->outputBuffer[offset];
++#endif
+ }
+
+
+ K3bFFMpegFile::~K3bFFMpegFile()
+ {
+ close();
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
++ av_free(d->frame);
++# else
++ av_frame_free(&d->frame);
++# endif
++#endif
+ delete d;
+ }
+
+@@ -326,26 +345,36 @@ int K3bFFMpegFile::fillOutputBuffer()
+ return 0;
+ }
+
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ int gotFrame = 0;
++ int len = ::avcodec_decode_audio4(
++#else
+ d->outputBufferPos = d->alignedOutputBuffer;
+ d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-
+-#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
+ int len = ::avcodec_decode_audio3(
+-#else
+-# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
+- int len = ::avcodec_decode_audio2(
+ # else
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
++ int len = ::avcodec_decode_audio2(
++# else
+ int len = ::avcodec_decode_audio(
++# endif
+ # endif
+ #endif
+
+ FFMPEG_CODEC(d->formatContext->streams[0]),
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ d->frame,
++ &gotFrame,
++ &d->packet );
++#else
+ (short*)d->alignedOutputBuffer,
+ &d->outputBufferSize,
+-#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
+ &d->packet );
+-#else
++# else
+ d->packetData, d->packetSize );
++# endif
+ #endif
+
+ if( d->packetSize <= 0 || len < 0 )
+@@ -355,6 +384,17 @@ int K3bFFMpegFile::fillOutputBuffer()
+ return -1;
+ }
+
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ if ( gotFrame ) {
++ d->outputBufferSize = ::av_samples_get_buffer_size(
++ NULL,
++ FFMPEG_CODEC(d->formatContext->streams[0])->channels,
++ d->frame->nb_samples,
++ FFMPEG_CODEC(d->formatContext->streams[0])->sample_fmt,
++ 1 );
++ d->outputBufferPos = reinterpret_cast<char*>( d->frame->data[0] );
++ }
++#endif
+ d->packetSize -= len;
+ d->packetData += len;
+ }
+@@ -420,9 +460,9 @@ K3bFFMpegFile* K3bFFMpegWrapper::open( const QString& filename ) const
+ // mp3 being one of them sadly. Most importantly: allow the libsndfile decoder to do
+ // its thing.
+ //
+- if( file->type() == CODEC_ID_WMAV1 ||
+- file->type() == CODEC_ID_WMAV2 ||
+- file->type() == CODEC_ID_AAC )
++ if( file->type() == AV_CODEC_ID_WMAV1 ||
++ file->type() == AV_CODEC_ID_WMAV2 ||
++ file->type() == AV_CODEC_ID_AAC )
+ #endif
+ return file;
+ }
+--
+2.0.5
+
Deleted: extra-i686/k3b.install
===================================================================
--- extra-i686/k3b.install 2016-05-04 20:48:26 UTC (rev 266889)
+++ extra-i686/k3b.install 2016-05-04 20:48:57 UTC (rev 266890)
@@ -1,13 +0,0 @@
-post_install() {
- xdg-icon-resource forceupdate --theme hicolor &> /dev/null
- update-mime-database usr/share/mime &> /dev/null
- update-desktop-database -q
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2016-05-04 20:48:26 UTC (rev 266889)
+++ extra-x86_64/PKGBUILD 2016-05-04 20:48:57 UTC (rev 266890)
@@ -1,46 +0,0 @@
-# $Id$
-# Maintainer: Eric Bélanger <eric at archlinux.org>
-
-pkgname=k3b
-pkgver=2.0.3a
-pkgrel=5
-epoch=1
-pkgdesc="Feature-rich and easy to handle CD burning application"
-arch=('i686' 'x86_64')
-url="http://sourceforge.net/projects/k3b/"
-license=('GPL')
-depends=('kdebase-runtime' 'libkcddb' 'libsamplerate' 'libmad'
- 'ffmpeg' 'taglib' 'libmpcdec' 'libdvdread' 'cdrkit' 'libxft')
-makedepends=('cmake' 'automoc4' 'docbook-xml')
-optdepends=('dvd+rw-tools: for dvd burning support'
- 'vcdimager: for vcd burning support'
- 'transcode: for advanced mpeg conversion support'
- 'emovix: for bootable multimedia cd/dvd support'
- 'cdrdao: for disk-at-once (DAO) mode support'
- 'cdparanoia: for cd ripping support')
-install=k3b.install
-source=(http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.xz k3b-ffmpeg3.patch)
-sha1sums=('f1001db3b5b32ef6bdb827742f1ca357c82b216f'
- '8ee47b04e92499d484c49e33dd33dabdf53025c9')
-
-prepare() {
- cd $pkgname-2.0.3
-# Workaround build failure with cmake 3.4
- sed -e "s|^cmake_minimum_required|#cmake_minimum_required|" -i CMakeLists.txt
-# Fix build with ffmpeg 3.0 (Gentoo)
- patch -p1 -i ../k3b-ffmpeg3.patch
-}
-
-build() {
- mkdir build
- cd build
- cmake ../${pkgname}-2.0.3 \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release
- make
-}
-
-package() {
- cd build
- make DESTDIR="${pkgdir}" install
-}
Copied: k3b/repos/extra-x86_64/PKGBUILD (from rev 266889, k3b/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2016-05-04 20:48:57 UTC (rev 266890)
@@ -0,0 +1,45 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=k3b
+pkgver=2.0.3a
+pkgrel=6
+epoch=1
+pkgdesc="Feature-rich and easy to handle CD burning application"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/k3b/"
+license=('GPL')
+depends=('kdebase-runtime' 'libkcddb' 'libsamplerate' 'libmad'
+ 'ffmpeg' 'taglib' 'libmpcdec' 'libdvdread' 'cdrkit' 'libxft')
+makedepends=('cmake' 'automoc4' 'docbook-xml')
+optdepends=('dvd+rw-tools: for dvd burning support'
+ 'vcdimager: for vcd burning support'
+ 'transcode: for advanced mpeg conversion support'
+ 'emovix: for bootable multimedia cd/dvd support'
+ 'cdrdao: for disk-at-once (DAO) mode support'
+ 'cdparanoia: for cd ripping support')
+source=(http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.xz k3b-ffmpeg3.patch)
+sha1sums=('f1001db3b5b32ef6bdb827742f1ca357c82b216f'
+ '8ee47b04e92499d484c49e33dd33dabdf53025c9')
+
+prepare() {
+ cd $pkgname-2.0.3
+# Workaround build failure with cmake 3.4
+ sed -e "s|^cmake_minimum_required|#cmake_minimum_required|" -i CMakeLists.txt
+# Fix build with ffmpeg 3.0 (Gentoo)
+ patch -p1 -i ../k3b-ffmpeg3.patch
+}
+
+build() {
+ mkdir build
+ cd build
+ cmake ../${pkgname}-2.0.3 \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="${pkgdir}" install
+}
Deleted: extra-x86_64/k3b-ffmpeg3.patch
===================================================================
--- extra-x86_64/k3b-ffmpeg3.patch 2016-05-04 20:48:26 UTC (rev 266889)
+++ extra-x86_64/k3b-ffmpeg3.patch 2016-05-04 20:48:57 UTC (rev 266890)
@@ -1,138 +0,0 @@
-From 52d3d64863d2fab4128f524870851f18f5cae1fc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= <oldium.pro at seznam.cz>
-Date: Sat, 14 Feb 2015 15:31:07 +0100
-Subject: [PATCH] Fixed compilation with newer ffmpeg/libav.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Oldřich Jedlička <oldium.pro at seznam.cz>
----
- plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 60 ++++++++++++++++++++++++-----
- 1 file changed, 50 insertions(+), 10 deletions(-)
-
-diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
-index 5451fd3..2f80fd6 100644
---- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
-+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
-@@ -86,8 +86,12 @@ public:
- K3b::Msf length;
-
- // for decoding. ffmpeg requires 16-byte alignment.
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ ::AVFrame* frame;
-+#else
- char outputBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE + 15];
- char* alignedOutputBuffer;
-+#endif
- char* outputBufferPos;
- int outputBufferSize;
- ::AVPacket packet;
-@@ -102,14 +106,29 @@ K3bFFMpegFile::K3bFFMpegFile( const QString& filename )
- d = new Private;
- d->formatContext = 0;
- d->codec = 0;
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
-+ d->frame = avcodec_alloc_frame();
-+# else
-+ d->frame = av_frame_alloc();
-+# endif
-+#else
- int offset = 0x10 - (reinterpret_cast<intptr_t>(&d->outputBuffer) & 0xf);
- d->alignedOutputBuffer = &d->outputBuffer[offset];
-+#endif
- }
-
-
- K3bFFMpegFile::~K3bFFMpegFile()
- {
- close();
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
-+ av_free(d->frame);
-+# else
-+ av_frame_free(&d->frame);
-+# endif
-+#endif
- delete d;
- }
-
-@@ -326,26 +345,36 @@ int K3bFFMpegFile::fillOutputBuffer()
- return 0;
- }
-
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ int gotFrame = 0;
-+ int len = ::avcodec_decode_audio4(
-+#else
- d->outputBufferPos = d->alignedOutputBuffer;
- d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
--
--#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
-+# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
- int len = ::avcodec_decode_audio3(
--#else
--# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
-- int len = ::avcodec_decode_audio2(
- # else
-+# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
-+ int len = ::avcodec_decode_audio2(
-+# else
- int len = ::avcodec_decode_audio(
-+# endif
- # endif
- #endif
-
- FFMPEG_CODEC(d->formatContext->streams[0]),
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ d->frame,
-+ &gotFrame,
-+ &d->packet );
-+#else
- (short*)d->alignedOutputBuffer,
- &d->outputBufferSize,
--#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
-+# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
- &d->packet );
--#else
-+# else
- d->packetData, d->packetSize );
-+# endif
- #endif
-
- if( d->packetSize <= 0 || len < 0 )
-@@ -355,6 +384,17 @@ int K3bFFMpegFile::fillOutputBuffer()
- return -1;
- }
-
-+#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
-+ if ( gotFrame ) {
-+ d->outputBufferSize = ::av_samples_get_buffer_size(
-+ NULL,
-+ FFMPEG_CODEC(d->formatContext->streams[0])->channels,
-+ d->frame->nb_samples,
-+ FFMPEG_CODEC(d->formatContext->streams[0])->sample_fmt,
-+ 1 );
-+ d->outputBufferPos = reinterpret_cast<char*>( d->frame->data[0] );
-+ }
-+#endif
- d->packetSize -= len;
- d->packetData += len;
- }
-@@ -420,9 +460,9 @@ K3bFFMpegFile* K3bFFMpegWrapper::open( const QString& filename ) const
- // mp3 being one of them sadly. Most importantly: allow the libsndfile decoder to do
- // its thing.
- //
-- if( file->type() == CODEC_ID_WMAV1 ||
-- file->type() == CODEC_ID_WMAV2 ||
-- file->type() == CODEC_ID_AAC )
-+ if( file->type() == AV_CODEC_ID_WMAV1 ||
-+ file->type() == AV_CODEC_ID_WMAV2 ||
-+ file->type() == AV_CODEC_ID_AAC )
- #endif
- return file;
- }
---
-2.0.5
-
Copied: k3b/repos/extra-x86_64/k3b-ffmpeg3.patch (from rev 266889, k3b/trunk/k3b-ffmpeg3.patch)
===================================================================
--- extra-x86_64/k3b-ffmpeg3.patch (rev 0)
+++ extra-x86_64/k3b-ffmpeg3.patch 2016-05-04 20:48:57 UTC (rev 266890)
@@ -0,0 +1,138 @@
+From 52d3d64863d2fab4128f524870851f18f5cae1fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= <oldium.pro at seznam.cz>
+Date: Sat, 14 Feb 2015 15:31:07 +0100
+Subject: [PATCH] Fixed compilation with newer ffmpeg/libav.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Oldřich Jedlička <oldium.pro at seznam.cz>
+---
+ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 60 ++++++++++++++++++++++++-----
+ 1 file changed, 50 insertions(+), 10 deletions(-)
+
+diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+index 5451fd3..2f80fd6 100644
+--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
++++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+@@ -86,8 +86,12 @@ public:
+ K3b::Msf length;
+
+ // for decoding. ffmpeg requires 16-byte alignment.
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ ::AVFrame* frame;
++#else
+ char outputBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE + 15];
+ char* alignedOutputBuffer;
++#endif
+ char* outputBufferPos;
+ int outputBufferSize;
+ ::AVPacket packet;
+@@ -102,14 +106,29 @@ K3bFFMpegFile::K3bFFMpegFile( const QString& filename )
+ d = new Private;
+ d->formatContext = 0;
+ d->codec = 0;
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
++ d->frame = avcodec_alloc_frame();
++# else
++ d->frame = av_frame_alloc();
++# endif
++#else
+ int offset = 0x10 - (reinterpret_cast<intptr_t>(&d->outputBuffer) & 0xf);
+ d->alignedOutputBuffer = &d->outputBuffer[offset];
++#endif
+ }
+
+
+ K3bFFMpegFile::~K3bFFMpegFile()
+ {
+ close();
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++# if LIBAVCODEC_BUILD < AV_VERSION_INT(55,28,1)
++ av_free(d->frame);
++# else
++ av_frame_free(&d->frame);
++# endif
++#endif
+ delete d;
+ }
+
+@@ -326,26 +345,36 @@ int K3bFFMpegFile::fillOutputBuffer()
+ return 0;
+ }
+
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ int gotFrame = 0;
++ int len = ::avcodec_decode_audio4(
++#else
+ d->outputBufferPos = d->alignedOutputBuffer;
+ d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+-
+-#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
+ int len = ::avcodec_decode_audio3(
+-#else
+-# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
+- int len = ::avcodec_decode_audio2(
+ # else
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO2
++ int len = ::avcodec_decode_audio2(
++# else
+ int len = ::avcodec_decode_audio(
++# endif
+ # endif
+ #endif
+
+ FFMPEG_CODEC(d->formatContext->streams[0]),
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ d->frame,
++ &gotFrame,
++ &d->packet );
++#else
+ (short*)d->alignedOutputBuffer,
+ &d->outputBufferSize,
+-#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
++# ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO3
+ &d->packet );
+-#else
++# else
+ d->packetData, d->packetSize );
++# endif
+ #endif
+
+ if( d->packetSize <= 0 || len < 0 )
+@@ -355,6 +384,17 @@ int K3bFFMpegFile::fillOutputBuffer()
+ return -1;
+ }
+
++#ifdef HAVE_FFMPEG_AVCODEC_DECODE_AUDIO4
++ if ( gotFrame ) {
++ d->outputBufferSize = ::av_samples_get_buffer_size(
++ NULL,
++ FFMPEG_CODEC(d->formatContext->streams[0])->channels,
++ d->frame->nb_samples,
++ FFMPEG_CODEC(d->formatContext->streams[0])->sample_fmt,
++ 1 );
++ d->outputBufferPos = reinterpret_cast<char*>( d->frame->data[0] );
++ }
++#endif
+ d->packetSize -= len;
+ d->packetData += len;
+ }
+@@ -420,9 +460,9 @@ K3bFFMpegFile* K3bFFMpegWrapper::open( const QString& filename ) const
+ // mp3 being one of them sadly. Most importantly: allow the libsndfile decoder to do
+ // its thing.
+ //
+- if( file->type() == CODEC_ID_WMAV1 ||
+- file->type() == CODEC_ID_WMAV2 ||
+- file->type() == CODEC_ID_AAC )
++ if( file->type() == AV_CODEC_ID_WMAV1 ||
++ file->type() == AV_CODEC_ID_WMAV2 ||
++ file->type() == AV_CODEC_ID_AAC )
+ #endif
+ return file;
+ }
+--
+2.0.5
+
Deleted: extra-x86_64/k3b.install
===================================================================
--- extra-x86_64/k3b.install 2016-05-04 20:48:26 UTC (rev 266889)
+++ extra-x86_64/k3b.install 2016-05-04 20:48:57 UTC (rev 266890)
@@ -1,13 +0,0 @@
-post_install() {
- xdg-icon-resource forceupdate --theme hicolor &> /dev/null
- update-mime-database usr/share/mime &> /dev/null
- update-desktop-database -q
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
More information about the arch-commits
mailing list