rpms/k3b-extras-freeworld/F-18 0244-Fixed-compilation-with-new-FFMPEG.patch, NONE, 1.1 0290-fix-for-newer-kde-4.7-FindFFMPEG.cmake.patch, NONE, 1.1 0312-Fix-K3B-to-build-with-recent-FFMPEG-versions.patch, NONE, 1.1 k3b-extras-freeworld.spec, 1.31, 1.32 k3b-2.0.2-FFMPEG_INCLUDE_DIRS.patch, 1.1, NONE k3b-2.0.2-ffmpeg08.patch, 1.2, NONE

Rex Dieter rdieter at rpmfusion.org
Sat Oct 13 17:32:51 CEST 2012


Author: rdieter

Update of /cvs/free/rpms/k3b-extras-freeworld/F-18
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv29649

Modified Files:
	k3b-extras-freeworld.spec 
Added Files:
	0244-Fixed-compilation-with-new-FFMPEG.patch 
	0290-fix-for-newer-kde-4.7-FindFFMPEG.cmake.patch 
	0312-Fix-K3B-to-build-with-recent-FFMPEG-versions.patch 
Removed Files:
	k3b-2.0.2-FFMPEG_INCLUDE_DIRS.patch k3b-2.0.2-ffmpeg08.patch 
Log Message:
* Sat Oct 13 2012 Rex Dieter <rdieter at fedoraproject.org> 1:2.0.2-8
- more upstream ffmpeg-related fixes


0244-Fixed-compilation-with-new-FFMPEG.patch:
 k3bffmpegwrapper.cpp |   39 +++++++++++++++++++++++++++++++--------
 1 file changed, 31 insertions(+), 8 deletions(-)

--- NEW FILE 0244-Fixed-compilation-with-new-FFMPEG.patch ---
>From 2f845b34badb614882b7e38ac38b00041ac2832d Mon Sep 17 00:00:00 2001
From: Michal Malek <michalm at jabster.pl>
Date: Sun, 28 Aug 2011 20:18:53 +0200
Subject: [PATCH 244/314] Fixed compilation with new FFMPEG

BUG: 274817
FIXED-IN: 2.0.3
---
 plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 38 +++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
index 0ad59fc..0c5f366 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -109,7 +109,13 @@ bool K3bFFMpegFile::open()
 #else
     ::AVCodecContext* codecContext =  d->formatContext->streams[0]->codec;
 #endif
-    if( codecContext->codec_type != CODEC_TYPE_AUDIO ) {
+    if( codecContext->codec_type != 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
+        AVMEDIA_TYPE_AUDIO)
+#else
+        CODEC_TYPE_AUDIO)
+#endif
+    {
         kDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename;
         return false;
     }
@@ -225,8 +231,11 @@ QString K3bFFMpegFile::typeComment() const
 QString K3bFFMpegFile::title() const
 {
     // FIXME: is this UTF8 or something??
-    if( d->formatContext->title[0] != '\0' )
-        return QString::fromLocal8Bit( d->formatContext->title );
+    AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "TITLE", NULL, 0 );
+    if( ade == NULL )
+        return QString();
+    if( ade->value != '\0' )
+        return QString::fromLocal8Bit( ade->value );
     else
         return QString();
 }
@@ -235,8 +244,11 @@ QString K3bFFMpegFile::title() const
 QString K3bFFMpegFile::author() const
 {
     // FIXME: is this UTF8 or something??
-    if( d->formatContext->author[0] != '\0' )
-        return QString::fromLocal8Bit( d->formatContext->author );
+    AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "ARTIST", NULL, 0 );
+    if( ade == NULL )
+        return QString();
+    if( ade->value != '\0' )
+        return QString::fromLocal8Bit( ade->value );
     else
         return QString();
 }
@@ -245,8 +257,11 @@ QString K3bFFMpegFile::author() const
 QString K3bFFMpegFile::comment() const
 {
     // FIXME: is this UTF8 or something??
-    if( d->formatContext->comment[0] != '\0' )
-        return QString::fromLocal8Bit( d->formatContext->comment );
+    AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "COMMENT", NULL, 0 );
+    if( ade == NULL )
+        return QString();
+    if( ade->value != '\0' )
+        return QString::fromLocal8Bit( ade->value );
     else
         return QString();
 }
@@ -309,8 +324,13 @@ int K3bFFMpegFile::fillOutputBuffer()
 #if LIBAVCODEC_VERSION_MAJOR < 52
         int len = ::avcodec_decode_audio(
 #else
+   #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
+        int len = ::avcodec_decode_audio3(
+   #else
         int len = ::avcodec_decode_audio2(
+   #endif
 #endif
+
 #ifdef FFMPEG_BUILD_PRE_4629
             &d->formatContext->streams[0]->codec,
 #else
@@ -318,7 +338,11 @@ int K3bFFMpegFile::fillOutputBuffer()
 #endif
             (short*)d->alignedOutputBuffer,
             &d->outputBufferSize,
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
+            &d->packet );
+#else
             d->packetData, d->packetSize );
+#endif
 
         if( d->packetSize <= 0 || len < 0 )
             ::av_free_packet( &d->packet );
-- 
1.7.12.1


0290-fix-for-newer-kde-4.7-FindFFMPEG.cmake.patch:
 CMakeLists.txt |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE 0290-fix-for-newer-kde-4.7-FindFFMPEG.cmake.patch ---
>From 8d33a486082cd9eaa857d6042b1b8870e4bf532b Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at fedoraproject.org>
Date: Sat, 11 Feb 2012 08:34:04 -0600
Subject: [PATCH 290/314] fix for newer (kde-4.7+) FindFFMPEG.cmake which sets
 ${FFMPEG_INCLUDE_DIRS} instead of
 ${FFMPEG_INCLUDE_DIR}

---
 plugins/decoder/ffmpeg/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/decoder/ffmpeg/CMakeLists.txt b/plugins/decoder/ffmpeg/CMakeLists.txt
index d7e25eb..d420a3c 100644
--- a/plugins/decoder/ffmpeg/CMakeLists.txt
+++ b/plugins/decoder/ffmpeg/CMakeLists.txt
@@ -9,7 +9,7 @@ if(FFMPEG_INCLUDE_DIR_OLD_STYLE)
 else(FFMPEG_INCLUDE_DIR_OLD_STYLE)
     message(STATUS "found new ffmpegcodecpath")
     add_definitions(-DNEWFFMPEGAVCODECPATH)
-    include_directories (${FFMPEG_INCLUDE_DIR})
+    include_directories (${FFMPEG_INCLUDE_DIR} ${FFMPEG_INCLUDE_DIRS})
 endif(FFMPEG_INCLUDE_DIR_OLD_STYLE)
 
 set(k3bffmpegdecoder_PART_SRCS k3bffmpegdecoder.cpp k3bffmpegwrapper.cpp )
-- 
1.7.12.1


0312-Fix-K3B-to-build-with-recent-FFMPEG-versions.patch:
 k3bffmpegwrapper.cpp |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- NEW FILE 0312-Fix-K3B-to-build-with-recent-FFMPEG-versions.patch ---
>From 6f34e14b28d2f9103151c6ba08b3bb40448ffe46 Mon Sep 17 00:00:00 2001
From: Alex Merry <kde at randomguy3.me.uk>
Date: Thu, 23 Aug 2012 23:45:34 +0100
Subject: [PATCH 312/314] Fix K3B to build with recent FFMPEG versions

FFMPEG 0.11 (shipped on ArchLinux, for example) has renamed some
functions.

The exact versions in the #ifdefs are taken from the Mobile Robot
Programming Toolkit.

BUG: 300731
---
 plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
index 0c5f366..024c18c 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -88,7 +88,11 @@ bool K3bFFMpegFile::open()
     close();
 
     // open the file
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,2,0)
+    int err = ::avformat_open_input( &d->formatContext, m_filename.toLocal8Bit(), 0, 0 );
+#else
     int err = ::av_open_input_file( &d->formatContext, m_filename.toLocal8Bit(), 0, 0, 0 );
+#endif
     if( err < 0 ) {
         kDebug() << "(K3bFFMpegFile) unable to open " << m_filename << " with error " << err;
         return false;
@@ -143,7 +147,11 @@ bool K3bFFMpegFile::open()
     }
 
     // dump some debugging info
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,2,0)
+    ::av_dump_format( d->formatContext, 0, m_filename.toLocal8Bit(), 0 );
+#else
     ::dump_format( d->formatContext, 0, m_filename.toLocal8Bit(), 0 );
+#endif
 
     return true;
 }
-- 
1.7.12.1



Index: k3b-extras-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/k3b-extras-freeworld/F-18/k3b-extras-freeworld.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- k3b-extras-freeworld.spec	26 Jun 2012 09:07:33 -0000	1.31
+++ k3b-extras-freeworld.spec	13 Oct 2012 15:32:50 -0000	1.32
@@ -3,7 +3,7 @@
 Summary: Additional codec plugins for the k3b CD/DVD burning application
 Epoch:   1
 Version: 2.0.2
-Release: 7%{?dist}
+Release: 8%{?dist}
 
 Group:   Applications/Archiving
 License: GPLv2+
@@ -13,11 +13,10 @@
 # TODO: bugzilla/document
 ExcludeArch: s390 s390x
 
-## upstreamable patches
-# fix build with FFmpeg 0.8 (#1960)
-Patch50: k3b-2.0.2-ffmpeg08.patch
-# kde-4.7+ FindFFMPEG.cmake uses FFMPEG_INCLUDE_DIRS (instead of FFMPEG_INCLUDE_DIR)
-Patch51: k3b-2.0.2-FFMPEG_INCLUDE_DIRS.patch
+# upstream patches
+Patch244: 0244-Fixed-compilation-with-new-FFMPEG.patch
+Patch290: 0290-fix-for-newer-kde-4.7-FindFFMPEG.cmake.patch
+Patch312: 0312-Fix-K3B-to-build-with-recent-FFMPEG-versions.patch
 
 BuildRequires: cmake
 BuildRequires: flac-devel
@@ -51,8 +50,9 @@
 %prep
 %setup -q -n k3b-%{version}
 
-%patch50 -p1 -b .ffmpeg08
-%patch51 -p1 -b .FFMPEG_INCLUDE_DIRS
+%patch244 -p1 -b .0244
+%patch290 -p1 -b .0290
+%patch312 -p1 -b .0313
 
 
 %build
@@ -96,6 +96,9 @@
 
 
 %changelog
+* Sat Oct 13 2012 Rex Dieter <rdieter at fedoraproject.org> 1:2.0.2-8
+- more upstream ffmpeg-related fixes
+
 * Tue Jun 26 2012 Nicolas Chauvet <kwizart at gmail.com> - 1:2.0.2-7
 - Rebuilt for FFmpeg
 


--- k3b-2.0.2-FFMPEG_INCLUDE_DIRS.patch DELETED ---


--- k3b-2.0.2-ffmpeg08.patch DELETED ---


More information about the rpmfusion-commits mailing list