[SCM] ffmpegthumbnailer/master: Import Debian changes 2.1.1-0.1

mati75-guest at users.alioth.debian.org mati75-guest at users.alioth.debian.org
Tue Jul 25 19:16:59 UTC 2017


Import Upstream version 2.1.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 39cc500779ecc9de2375eabcb5443bd214bed1c2
X-Git-Newrev: 510571d1eabc8bfe1a48e0296285ffe506d2a54c

The following commit has been merged in the master branch:
commit 510571d1eabc8bfe1a48e0296285ffe506d2a54c
Merge: 8f5ab12e82347fdf819c448e82cd3ad901ab400d d197c0ab021f075adebd4248343b50ed37f49060
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Mon Mar 14 20:48:00 2016 +0100

    Import Debian changes 2.1.1-0.1
    
    ffmpegthumbnailer (2.1.1-0.1) unstable; urgency=medium
    
      * Non-maintainer upload.
      * New upstream release.
        - Fix build issue with ffmpeg 3.0 (Closes: #803812)
      * debian/patches:
        - 621274d694dee1f8c92f5db99a5cff98e82c6bd4.patch: Removed, included
          upstream.
        - Restored-deinterlace.patch: Apply upstream patch to restore deinterlace
          with new ffmpeg.
      * debian/control: Replace libswscale-dev with libavfilter-dev in
        Build-Depends.
    
    ffmpegthumbnailer (2.0.10-0.1) unstable; urgency=medium
    
      * Non-maintainer upload.
      * New upstream release. (Closes: #784745, LP: #1169918)
      * debian/control:
        - Bump Standards-Version to 3.9.6.
        - Remove dh-autoconf from Build-Depends and add cmake.
        - Fix spelling error in description.
      * debian/rules:
        - Adapt for building with cmake instead of autotools.
      * Add debian/patches/621274d694dee1f8c92f5db99a5cff98e82c6bd4.patch
        from upstream to use proper GNU installation directories.
      * Update debian/watch to point to github.
    
    ffmpegthumbnailer (2.0.8-2.1) unstable; urgency=medium
    
      * Non-maintainer upload.
    
      [ Steve Langasek ]
      * Rename library packages for g++5 ABI transition.

diff --combined debian/changelog
index bfe8494,0000000..a3452fb
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,219 -1,0 +1,259 @@@
++ffmpegthumbnailer (2.1.1-0.1) unstable; urgency=medium
++
++  * Non-maintainer upload.
++  * New upstream release.
++    - Fix build issue with ffmpeg 3.0 (Closes: #803812)
++  * debian/patches:
++    - 621274d694dee1f8c92f5db99a5cff98e82c6bd4.patch: Removed, included
++      upstream.
++    - Restored-deinterlace.patch: Apply upstream patch to restore deinterlace
++      with new ffmpeg.
++  * debian/control: Replace libswscale-dev with libavfilter-dev in
++    Build-Depends.
++
++ -- Sebastian Ramacher <sramacher at debian.org>  Mon, 14 Mar 2016 20:48:00 +0100
++
++ffmpegthumbnailer (2.0.10-0.1) unstable; urgency=medium
++
++  * Non-maintainer upload.
++  * New upstream release. (Closes: #784745, LP: #1169918)
++  * debian/control:
++    - Bump Standards-Version to 3.9.6.
++    - Remove dh-autoconf from Build-Depends and add cmake.
++    - Fix spelling error in description.
++  * debian/rules:
++    - Adapt for building with cmake instead of autotools.
++  * Add debian/patches/621274d694dee1f8c92f5db99a5cff98e82c6bd4.patch
++    from upstream to use proper GNU installation directories.
++  * Update debian/watch to point to github.
++
++ -- Mateusz Łukasik <mati75 at linuxmint.pl>  Sat, 22 Aug 2015 10:46:39 +0200
++
++ffmpegthumbnailer (2.0.8-2.1) unstable; urgency=medium
++
++  * Non-maintainer upload.
++
++  [ Steve Langasek ]
++  * Rename library packages for g++5 ABI transition.
++
++ -- Sebastian Ramacher <sramacher at debian.org>  Fri, 14 Aug 2015 19:58:24 +0200
++
 +ffmpegthumbnailer (2.0.8-2) unstable; urgency=low
 +
 +  * Bumped Standards-Version to 3.8.4, no change required.
 +  * Use dh-autoreconf thanks Logan Rosen (Closes: #733083)
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Sun, 05 Jan 2014 08:06:37 +0100
 +
 +ffmpegthumbnailer (2.0.8-1) unstable; urgency=low
 +
 +  * New upstream release (fixes build issue with libav 9). Closes: #720785
 +  * debian/rules:
 +    - pass --enable-thumbnailer to configure to register ffmpegthumbnailer
 +      as a gnome3 thumbnailer. Closes: #684149
 +    - enable all hardening flags.
 +    - build with --parallel.
 +  * debian/ffmpegthumbnailer.install: ship the thumbnailer file.
 +  * debian/control:
 +    - remove alternate b-dep on libpng12-dev. Closes: #662323
 +    - update standards version to 3.9.4.
 +    - update debhelper build dep to 9.
 +    - add build-dep on dpkg-dev 1.16.1.
 +  * debian/compat: bumped to 9.
 +  * debian/*.install: updated paths.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Mon, 26 Aug 2013 11:26:38 +0200
 +
 +ffmpegthumbnailer (2.0.7-2) unstable; urgency=low
 +
 +  * debian/control: remove alternate b-dep on libjpeg62-dev. Closes: #641454
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 18 Sep 2011 21:26:01 +0200
 +
 +ffmpegthumbnailer (2.0.7-1) unstable; urgency=low
 +
 +  * New upstream release:
 +    - fix build with libpng 1.5. Closes: #635944
 +  * debian/patches:
 +    - debian/patches/99_fix-FTBFS-libav-0.7.patch,
 +      debian/patches/02_fix-ftbfs-missing-include-NULL.patch,
 +      debian/patches/01_fix-ftbfs-as-needed.patch: dropped, included upstream.
 +    - debian/patches/series: dropped, now empty.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Mon, 01 Aug 2011 18:44:21 +0200
 +
 +ffmpegthumbnailer (2.0.6-4) unstable; urgency=low
 +
 +  * Fix a build failure with upcoming libav 0.7. Thanks Fabrice Coutadeur for
 +  the patch.
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Fri, 22 Jul 2011 16:39:13 +0200
 +
 +ffmpegthumbnailer (2.0.6-3) unstable; urgency=low
 +
 +  * debian/patches/02_fix-ftbfs-missing-include-NULL.patch: fix FTBFS
 +    with gcc-4.6. Closes: #624961
 +  * debian/patches/series: refreshed.
 +  * debian/control:
 +    - relax a bit the b-dep on libavcodec-dev.
 +    - fix phrasing of the library short desc.
 +    - bump Standards-Version to 3.9.2, no change required.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 15 May 2011 21:56:18 +0200
 +
 +ffmpegthumbnailer (2.0.6-2) unstable; urgency=low
 +
 +  * debian/patches:
 +    - 01_fix-ftbfs-as-needed.patch: move -ldl to the correct position, fixes
 +      FTBFS with recent binutils version (Closes: #618030).
 +    - series: added.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Thu, 17 Mar 2011 12:40:44 +0100
 +
 +ffmpegthumbnailer (2.0.6-1) unstable; urgency=low
 +
 +  * New upstream release.
 +  * debian/rules: call dpkg-buildflags instead of doing manual tests.
 +  * debian/control:
 +    - bump Standards-Version to 3.9.1, no change required.
 +    - bump minimum required version for libavcodec-dev (0.6 series).
 +  * Enable runtime gio uri support:
 +    - debian/rules: pass --enable-gio to configure
 +    - debian/control: suggests libglib2.0-0.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 13 Feb 2011 20:29:01 +0100
 +
 +ffmpegthumbnailer (2.0.2-1) unstable; urgency=low
 +
 +  * New upstream bugfix release:
 +    - Fixed compilation error against latest ffmpeg
 +    - Size of the filmstrip overlay is dependent on thumbnail size.
 +  * debian/rules: build with --as-needed.
 +  * Switch to 3.0 (quilt).
 +  * debian/watch: updated to work again with googlecode.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Thu, 27 May 2010 00:46:55 +0200
 +
 +ffmpegthumbnailer (2.0.1-1) unstable; urgency=low
 +
 +  * New upstream bugfix release:
 +    - Setting the thumbnail size to 0 will use the original video size
 +    - Fix for video files containing lots of audio packets before a video
 +      packet
 +    - Fixed libs in pkgconfig file
 +  * Really convert to dh7 this time, drop cdbs.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 18 Apr 2010 10:27:44 +0200
 +
 +ffmpegthumbnailer (2.0.0-1) unstable; urgency=low
 +
 +  [ Lionel Le Folgoc ]
 +  * New upstream release.
 +  * Updated SONAME version from 3 to 4 caused package rename from
 +    libffmpegthumbnailer3 to libffmpegthumbnailer4.
 +  * Introduced a new binary package ffmpegthumbailer-dbg containing debug
 +    symbols.
 +  * debian/control: bump b-dep on debhelper to (>= 7.0.50~) for overrides.
 +  * Bumped Standards-Version to 3.8.4, no change required.
 +  * debian/copyright: update years.
 +
 +  [ Soeren Sonnenburg ]
 +  * Convert package to cdbs.
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Thu, 04 Feb 2010 06:28:04 +0100
 +
 +ffmpegthumbnailer (1.5.6-1) unstable; urgency=low
 +
 +  * New upstream bugfix release:
 +    - Fixed segmentation fault when seek in video file fails
 +    - Command line option added to specify output format of the image
 +      regardless of the filename
 +    - Fixed memory leak in MovieDecoder (thanks to Ulrich Völkel).
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Wed, 23 Dec 2009 10:11:22 +0100
 +
 +ffmpegthumbnailer (1.5.5-1) unstable; urgency=low
 +
 +  [ Soeren Sonnenburg ]
 +  * Fix override disparity by moving libffmpegthumbnailer-dev into section
 +  libdevel
 +  * Bumped Standards-Version to 3.8.3, no change required.
 +
 +  [ Lionel Le Folgoc ]
 +  * New upstream release:
 +    - Fixed thumbnail generation for ogm files
 +    - Fixed ffmpegthumbnailer hanging on certain filetypes caused by
 +      AVFMT_FLAG_GENPTS flag of video decoder.
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Sun, 27 Sep 2009 08:09:13 +0200
 +
 +ffmpegthumbnailer (1.5.4-1) unstable; urgency=low
 +
 +  * New upstream release:
 +    - Fixed support for large files.
 +  * Bumped Standards-Version to 3.8.2, no change required.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Mon, 22 Jun 2009 22:35:42 +0200
 +
 +ffmpegthumbnailer (1.5.3-1) unstable; urgency=low
 +
 +  [ Lionel Le Folgoc ]
 +  * New upstream release:
 +    - Memory alignment fix causing segmentation fault in ffmpeg with altivec
 +      enabled.
 +
 +  [ Soeren Sonnenburg ]
 +  * Update build dependency to libpng12-dev | libpng-dev and libjpeg62-dev |
 +  libjpeg-dev.
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Thu, 11 Jun 2009 05:37:02 +0200
 +
 +ffmpegthumbnailer (1.5.2-1) unstable; urgency=low
 +
 +  [ Soeren Sonnenburg ]
 +  * New upstream release:
 +    - Optional compilation of jpeg and png support 
 +    - Fixed ffmpeg CFLAGS issue (causing compilation errors on Fedora) 
 +    - Fixed build error against latest ffmpeg (verified against ffmpeg
 +            revision 18769) 
 +    - Fixed missing include files for library usage (thanks to gustavo.boiko)
 +
 +  [ Lionel Le Folgoc ]
 +  * debian/control: fix override disparity.
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Sun, 24 May 2009 21:00:28 +0200
 +
 +ffmpegthumbnailer (1.5.0-1) unstable; urgency=low
 +
 +  [ Lionel Le Folgoc ]
 +  * New upstream release:
 +    - Aspect ratio bug fix (Thanks to S. Eguchi)
 +    - Support input files from stdin (will ignore seek time)
 +    - Fixed build error against latest ffmpeg (verified against ffmpeg
 +      release 0.5).
 +  * debian/control:
 +    - change section from 'graphics' to 'video'
 +    - bump Standards-Version to 3.8.1, no change needed.
 +  * debian/copyright: update years.
 +
 +  [ Soeren Sonnenburg ]
 +  * Update changelog, all packaging work has been done by Lionel.
 +
 + -- Soeren Sonnenburg <sonne at debian.org>  Mon, 23 Mar 2009 07:49:35 +0100
 +
 +ffmpegthumbnailer (1.4.0-1) unstable; urgency=low
 +
 +  * New upstream release:
 +    - fixes FTBFS with gcc 4.4 (Closes: #510671).
 +  * Updated SONAME version from 2 to 3 caused package rename from
 +    libffmpegthumbnailer2 to libffmpegthumbnailer3.
 +  * debian/copyright: update years.
 +  * debian/control: add a missing ${misc:Depends}.
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 04 Jan 2009 21:27:07 +0100
 +
 +ffmpegthumbnailer (1.3.0-1) unstable; urgency=low
 +
 +  * Initial release. (Closes: #478158)
 +
 + -- Lionel Le Folgoc <mrpouit at gmail.com>  Wed, 24 Sep 2008 01:06:49 +0200
diff --combined debian/control
index d3214fc,0000000..a612945
mode 100644,000000..100644
--- a/debian/control
+++ b/debian/control
@@@ -1,60 -1,0 +1,62 @@@
 +Source: ffmpegthumbnailer
 +Section: video
 +Priority: optional
 +Maintainer: Lionel Le Folgoc <mrpouit at gmail.com>
 +Uploaders: Soeren Sonnenburg <sonne at debian.org>
 +Build-Depends: debhelper (>= 9), pkg-config, libavutil-dev, libavformat-dev,
-  libavcodec-dev (>= 4:0.6~svn20100505-1~), libswscale-dev, libpng-dev,
-  libjpeg-dev, dpkg-dev (>= 1.16.1), dh-autoreconf
- Standards-Version: 3.9.5
++ libavcodec-dev (>= 4:0.6~svn20100505-1~), libavfilter-dev, libpng-dev,
++ libjpeg-dev, dpkg-dev (>= 1.16.1), cmake
++Standards-Version: 3.9.6
 +Homepage: http://code.google.com/p/ffmpegthumbnailer/
 +Vcs-Svn: https://bollin.googlecode.com/svn/ffmpegthumbnailer/trunk/
 +Vcs-Browser: http://bollin.googlecode.com/svn/ffmpegthumbnailer/trunk/
 +
 +Package: ffmpegthumbnailer
 +Architecture: any
 +Depends: ${shlibs:Depends}, ${misc:Depends}
 +Suggests: libglib2.0-0
 +Description: fast and lightweight video thumbnailer
 + FFmpegthumbnailer is a lightweight video thumbnailer that can be used by file
 + managers to create thumbnails for your video files. The thumbnailer uses ffmpeg
 + to decode frames from the video files, so supported videoformats depend on the
 + configuration flags of ffmpeg.
 + .
 + This package contains the ffmpegthumbnailer executable.
 +
- Package: libffmpegthumbnailer4
++Package: libffmpegthumbnailer4v5
 +Architecture: any
 +Depends: ${shlibs:Depends}, ${misc:Depends}
++Conflicts: libffmpegthumbnailer4
++Replaces: libffmpegthumbnailer4
 +Description: shared library for ffmpegthumbnailer
 + FFmpegthumbnailer is a lightweight video thumbnailer that can be used by file
 + managers to create thumbnails for your video files. The thumbnailer uses ffmpeg
 + to decode frames from the video files, so supported videoformats depend on the
 + configuration flags of ffmpeg.
 + .
 + This package contains the shared library for ffmpegthumbnailer framework.
 +
 +Package: libffmpegthumbnailer-dev
 +Section: libdevel
 +Architecture: any
- Depends: libffmpegthumbnailer4 (= ${binary:Version}), ${misc:Depends}
++Depends: libffmpegthumbnailer4v5 (= ${binary:Version}), ${misc:Depends}
 +Description: development files for ffmpegthumbnailer
 + FFmpegthumbnailer is a lightweight video thumbnailer that can be used by file
 + managers to create thumbnails for your video files. The thumbnailer uses ffmpeg
 + to decode frames from the video files, so supported videoformats depend on the
 + configuration flags of ffmpeg.
 + .
 + This package contains the development files distributed with ffmpegthumbnailer.
 +
 +Package: ffmpegthumbnailer-dbg
 +Section: debug
 +Priority: extra
 +Architecture: any
 +Depends: ${shlibs:Depends}, ${misc:Depends}, ffmpegthumbnailer (= ${binary:Version})
- Description: debugging informations for ffmpegthumbnailer
++Description: debugging information for ffmpegthumbnailer
 + FFmpegthumbnailer is a lightweight video thumbnailer that can be used by file
 + managers to create thumbnails for your video files. The thumbnailer uses ffmpeg
 + to decode frames from the video files, so supported videoformats depend on the
 + configuration flags of ffmpeg.
 + .
 + This package contains the debugging symbols for ffmpegthumbnailer.
diff --combined debian/ffmpegthumbnailer.install
index 2f03f55,0000000..d397167
mode 100644,000000..100644
--- a/debian/ffmpegthumbnailer.install
+++ b/debian/ffmpegthumbnailer.install
@@@ -1,3 -1,0 +1,2 @@@
 +usr/bin
 +usr/share/thumbnailers
- usr/share/man
diff --combined debian/libffmpegthumbnailer-dev.install
index b1acd40,0000000..4e1a5ef
mode 100644,000000..100644
--- a/debian/libffmpegthumbnailer-dev.install
+++ b/debian/libffmpegthumbnailer-dev.install
@@@ -1,4 -1,0 +1,3 @@@
 +usr/include/libffmpegthumbnailer
- usr/lib/*/libffmpegthumbnailer*.a
 +usr/lib/*/libffmpegthumbnailer*.so
 +usr/lib/*/pkgconfig
diff --combined debian/libffmpegthumbnailer4v5.install
index 3a09546,0000000..3a09546
mode 100644,000000..100644
--- a/debian/libffmpegthumbnailer4v5.install
+++ b/debian/libffmpegthumbnailer4v5.install
@@@ -1,1 -1,0 +1,1 @@@
 +usr/lib/*/libffmpegthumbnailer*.so.*
diff --combined debian/patches/Restored-deinterlace.patch
index 0000000,0000000..5cd6ab4
new file mode 100644
--- /dev/null
+++ b/debian/patches/Restored-deinterlace.patch
@@@ -1,0 -1,0 +1,376 @@@
++From a2a98bc5a5d809105586f3b6f33fa45ba80dc3fa Mon Sep 17 00:00:00 2001
++From: Dirk Vanden Boer <dirk.vdb at gmail.com>
++Date: Thu, 3 Mar 2016 20:53:34 +0100
++Subject: [PATCH] Restored deinterlace functionality using the libavfilter
++ library
++
++---
++ CMakeLists.txt                        |  20 ++--
++ libffmpegthumbnailer/moviedecoder.cpp | 177 ++++++++++++++++------------------
++ libffmpegthumbnailer/moviedecoder.h   |  12 ++-
++ 3 files changed, 101 insertions(+), 108 deletions(-)
++
++diff --git a/CMakeLists.txt b/CMakeLists.txt
++index 72a5169..7d6d370 100644
++--- a/CMakeLists.txt
+++++ b/CMakeLists.txt
++@@ -52,7 +52,7 @@ FIND_PACKAGE(PkgConfig)
++ PKG_CHECK_MODULES(AVCODEC_PKG libavcodec REQUIRED)
++ PKG_CHECK_MODULES(AVFORMAT_PKG libavformat REQUIRED)
++ PKG_CHECK_MODULES(AVUTIL_PKG libavutil REQUIRED)
++-PKG_CHECK_MODULES(SWSCALE_PKG libswscale REQUIRED)
+++PKG_CHECK_MODULES(AVFILTER_PKG libavfilter REQUIRED)
++ 
++ FIND_PATH(AVCODEC_INCLUDE_DIR
++     NAMES libavcodec/avcodec.h
++@@ -69,9 +69,9 @@ FIND_PATH(AVUTIL_INCLUDE_DIR
++     PATHS ${AVUTIL_PKG_INCLUDE_DIRS}
++ )
++ 
++-FIND_PATH(SWSCALE_INCLUDE_DIR
++-    NAMES libswscale/swscale.h
++-    PATHS ${SWSCALE_PKG_INCLUDE_DIRS}
+++FIND_PATH(AVFILTER_INCLUDE_DIR
+++    NAMES libavfilter/avfilter.h
+++    PATHS ${AVFILTER_PKG_INCLUDE_DIRS}
++ )
++ 
++ FIND_LIBRARY(AVCODEC_LIBRARY
++@@ -89,9 +89,9 @@ FIND_LIBRARY(AVUTIL_LIBRARY
++     PATHS ${AVUTIL_PKG_LIBRARY_DIRS}
++ )
++ 
++-FIND_LIBRARY(SWSCALE_LIBRARY
++-    NAMES ${SWSCALE_PKG_LIBRARIES}
++-    PATHS ${SWSCALE_PKG_LIBRARY_DIRS}
+++FIND_LIBRARY(AVFILTER_LIBRARY
+++    NAMES ${AVFILTER_PKG_LIBRARIES}
+++    PATHS ${AVFILTER_PKG_LIBRARY_DIRS}
++ )
++ 
++ IF (ENABLE_GIO)
++@@ -101,10 +101,10 @@ IF (ENABLE_GIO)
++     LIST(APPEND FFMPEGTHUMBNAILER_LIBRARIES ${DL_LIBRARY})
++ ENDIF ()
++ 
++-LIST(APPEND FFMPEGTHUMBNAILER_INCLUDE_DIRS ${AVFORMAT_INCLUDE_DIR} ${AVCODEC_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
++-LIST(APPEND FFMPEGTHUMBNAILER_LIBRARIES ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY})
+++LIST(APPEND FFMPEGTHUMBNAILER_INCLUDE_DIRS ${AVFORMAT_INCLUDE_DIR} ${AVCODEC_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVFILTER_INCLUDE_DIR})
+++LIST(APPEND FFMPEGTHUMBNAILER_LIBRARIES ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${AVFILTER_LIBRARY})
++ 
++-SET(FFMPEGTHUMBNAILER_PKG_LIBS "-L${AVCODEC_PKG_LIBRARY_DIRS} -l${AVCODEC_PKG_LIBRARIES} -l${AVUTIL_PKG_LIBRARIES} -l${AVFORMAT_PKG_LIBRARIES} -l${SWSCALE_PKG_LIBRARIES}")
+++SET(FFMPEGTHUMBNAILER_PKG_LIBS "-L${AVCODEC_PKG_LIBRARY_DIRS} -l${AVCODEC_PKG_LIBRARIES} -l${AVUTIL_PKG_LIBRARIES} -l${AVFILTER_PKG_LIBRARIES} -l${AVFORMAT_PKG_LIBRARIES}")
++ FOREACH(VAL ${JPEG_LIBRARIES})
++     SET(FFMPEGTHUMBNAILER_PKG_LIBS "${FFMPEGTHUMBNAILER_PKG_LIBS} ${VAL}")
++ ENDFOREACH()
++diff --git a/libffmpegthumbnailer/moviedecoder.cpp b/libffmpegthumbnailer/moviedecoder.cpp
++index f48aa80..d22c6b6 100644
++--- a/libffmpegthumbnailer/moviedecoder.cpp
+++++ b/libffmpegthumbnailer/moviedecoder.cpp
++@@ -23,12 +23,16 @@
++ #include <cassert>
++ #include <cstring>
++ #include <array>
+++#include <sstream>
+++#include <memory>
++ 
++ extern "C" {
++ #include <libavutil/opt.h>
++-#include <libswscale/swscale.h>
++ #include <libavutil/imgutils.h>
++-//#include <libavfilter/avfilter.h>
+++#include <libavfilter/avfilter.h>
+++#include <libavfilter/avfiltergraph.h>
+++#include <libavfilter/buffersink.h>
+++#include <libavfilter/buffersrc.h>
++ }
++ 
++ using namespace std;
++@@ -46,9 +50,11 @@ MovieDecoder::MovieDecoder(const string& filename, AVFormatContext* pavContext)
++ , m_pFormatContext(pavContext)
++ , m_pVideoCodecContext(nullptr)
++ , m_pVideoCodec(nullptr)
+++, m_pFilterGraph(nullptr)
+++, m_pFilterSource(nullptr)
+++, m_pFilterSink(nullptr)
++ , m_pVideoStream(nullptr)
++ , m_pFrame(nullptr)
++-, m_pFrameBuffer(nullptr)
++ , m_pPacket(nullptr)
++ , m_FormatContextWasGiven(pavContext != nullptr)
++ , m_AllowSeek(true)
++@@ -79,7 +85,7 @@ void MovieDecoder::initialize(const string& filename)
++     if (avformat_find_stream_info(m_pFormatContext, nullptr) < 0)
++     {
++         destroy();
++-        throw logic_error(string("Could not find stream information"));
+++        throw logic_error("Could not find stream information");
++     }
++ 
++     initializeVideo();
++@@ -111,12 +117,6 @@ void MovieDecoder::destroy()
++         av_frame_free(&m_pFrame);
++     }
++ 
++-    if (m_pFrameBuffer)
++-    {
++-        av_free(m_pFrameBuffer);
++-        m_pFrameBuffer = nullptr;
++-    }
++-
++     m_VideoStream = -1;
++ 
++     avformat_network_deinit();
++@@ -170,19 +170,54 @@ void MovieDecoder::initializeVideo()
++     }
++ }
++ 
++-void MovieDecoder::initializeFilterGraph()
+++void MovieDecoder::initializeFilterGraph(AVRational timeBase, int width, int height)
++ {
++-    // avfilter_register_all();
+++    static const AVPixelFormat pixelFormats[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE };
+++
+++    auto del = [] (AVBufferSinkParams* p) { av_freep(p); };
+++    std::unique_ptr<AVBufferSinkParams, decltype(del)> buffersinkParams(av_buffersink_params_alloc(), del);
+++
+++    avfilter_register_all();
+++
+++    m_pFilterGraph = avfilter_graph_alloc();
+++    assert(m_pFilterGraph);
+++
+++    std::stringstream ss;
+++    ss << "video_size=" << m_pVideoCodecContext->width << "x" << m_pVideoCodecContext->height
+++       << ":pix_fmt=" << m_pVideoCodecContext->pix_fmt
+++       << ":time_base=" << timeBase.num << "/" << timeBase.den
+++       << ":pixel_aspect=" << m_pVideoCodecContext->sample_aspect_ratio.num << "/" << FFMAX(m_pVideoCodecContext->sample_aspect_ratio.den, 1);
+++
+++    checkRc(avfilter_graph_create_filter(&m_pFilterSource, avfilter_get_by_name("buffer"), "thumb_buffer", ss.str().c_str(), nullptr, m_pFilterGraph),
+++            "Failed to create filter source");
+++    buffersinkParams->pixel_fmts = pixelFormats;
+++    checkRc(avfilter_graph_create_filter(&m_pFilterSink, avfilter_get_by_name("buffersink"), "thumb_buffersink", nullptr, buffersinkParams.get(), m_pFilterGraph),
+++            "Failed to create filter sink");
+++    buffersinkParams.release();
+++
+++    AVFilterContext* yadifFilter = nullptr;
+++    checkRc(avfilter_graph_create_filter(&yadifFilter, avfilter_get_by_name("yadif"), "thumb_deint", "deint=1", nullptr, m_pFilterGraph),
+++            "Failed to create deinterlace filter");
+++
+++    std::stringstream scale;
+++    scale << "w=" << width
+++          << ":h=" << height
+++          << ":sws_flags=bicubic";
+++
+++    AVFilterContext* scaleFilter = nullptr;
+++    checkRc(avfilter_graph_create_filter(&scaleFilter, avfilter_get_by_name("scale"), "thumb_scale", scale.str().c_str(), nullptr, m_pFilterGraph),
+++            "Failed to create scale filter");
++ 
++-    // auto yadifFilter = avfilter_get_by_name("yadif");
+++    AVFilterContext* formatFilter = nullptr;
+++    checkRc(avfilter_graph_create_filter(&formatFilter, avfilter_get_by_name("format"), "thumb_format", "pix_fmts=rgb24", nullptr, m_pFilterGraph),
+++            "Failed to create scale filter");
++ 
++-    // AVFilterContext* filterContext;
++-    // avfilter_open(&filterContext, yadifFilter, nullptr);
++-    // if (avfilter_init_str(filterContext, "\"yadif=1:-1\"") < 0)
++-    // {
++-    //     destroy();
++-    //     throw logic_error("Failed to initialize filter");
++-    // }
+++    checkRc(avfilter_link(formatFilter, 0, m_pFilterSink, 0), "Failed to link filters");
+++    checkRc(avfilter_link(scaleFilter, 0, formatFilter, 0), "Failed to link filters");
+++    checkRc(avfilter_link(yadifFilter, 0, scaleFilter, 0), "Failed to link filters");
+++    checkRc(avfilter_link(m_pFilterSource, 0, yadifFilter, 0), "Failed to link filters");
+++
+++    checkRc(avfilter_graph_config(m_pFilterGraph, nullptr), "Failed to configure filter graph");
++ }
++ 
++ int MovieDecoder::getWidth()
++@@ -229,15 +264,8 @@ void MovieDecoder::seek(int timeInSeconds)
++         timestamp = 0;
++     }
++ 
++-    int ret = av_seek_frame(m_pFormatContext, -1, timestamp, 0);
++-    if (ret >= 0)
++-    {
++-        avcodec_flush_buffers(m_pFormatContext->streams[m_VideoStream]->codec);
++-    }
++-    else
++-    {
++-        throw logic_error("Seeking in video failed");
++-    }
+++    checkRc(av_seek_frame(m_pFormatContext, -1, timestamp, 0), "Seeking in video failed");
+++    avcodec_flush_buffers(m_pFormatContext->streams[m_VideoStream]->codec);
++ 
++     int keyFrameAttempts = 0;
++     bool gotFrame = 0;
++@@ -267,12 +295,11 @@ void MovieDecoder::seek(int timeInSeconds)
++     }
++ }
++ 
++-
++ void MovieDecoder::decodeVideoFrame()
++ {
++     bool frameFinished = false;
++ 
++-    while(!frameFinished && getVideoPacket())
+++    while (!frameFinished && getVideoPacket())
++     {
++         frameFinished = decodeVideoPacket();
++     }
++@@ -336,71 +363,32 @@ bool MovieDecoder::getVideoPacket()
++ 
++ void MovieDecoder::getScaledVideoFrame(int scaledSize, bool maintainAspectRatio, VideoFrame& videoFrame)
++ {
++-    // TODO: deinterlacing
++-
++-
++-    int scaledWidth, scaledHeight;
++-    convertAndScaleFrame(AV_PIX_FMT_RGB24, scaledSize, maintainAspectRatio, scaledWidth, scaledHeight);
+++    int scaledWidth = 0;
+++    int scaledHeight = 0;
+++    calculateDimensions(scaledSize, maintainAspectRatio, scaledWidth, scaledHeight);
++ 
++-    videoFrame.width = scaledWidth;
++-    videoFrame.height = scaledHeight;
++-    videoFrame.lineSize = m_pFrame->linesize[0];
+++    initializeFilterGraph(m_pFormatContext->streams[m_VideoStream]->time_base, scaledWidth, scaledHeight);
++ 
++-    videoFrame.frameData.clear();
++-    videoFrame.frameData.resize(videoFrame.lineSize * videoFrame.height);
++-    memcpy((&(videoFrame.frameData.front())), m_pFrame->data[0], videoFrame.lineSize * videoFrame.height);
++-}
+++    checkRc(av_buffersrc_write_frame(m_pFilterSource, m_pFrame), "Failed to write frame tp filter graph");
+++    decodeVideoFrame();
+++    checkRc(av_buffersrc_write_frame(m_pFilterSource, m_pFrame), "Failed to write frame tp filter graph");
++ 
++-void MovieDecoder::convertAndScaleFrame(AVPixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight)
++-{
++-    calculateDimensions(scaledSize, maintainAspectRatio, scaledWidth, scaledHeight);
+++    auto del = [] (AVFrame* f) { av_frame_free(&f); };
+++    std::unique_ptr<AVFrame, decltype(del)> res(av_frame_alloc(), del);
+++    checkRc(av_buffersink_get_frame(m_pFilterSink, res.get()), "Failed to get buffer from filter");
++ 
++-    SwsContext* scaleContext = sws_alloc_context();
++-    if (scaleContext == nullptr)
++-    {
++-        throw std::logic_error("Failed to allocate scale context");
++-    }
+++    videoFrame.width = res->width;
+++    videoFrame.height = res->height;
+++    videoFrame.lineSize = res->linesize[0];
++ 
++-    av_opt_set_int(scaleContext, "srcw", m_pVideoCodecContext->width, 0);
++-    av_opt_set_int(scaleContext, "srch", m_pVideoCodecContext->height, 0);
++-    av_opt_set_int(scaleContext, "src_format", m_pVideoCodecContext->pix_fmt, 0);
++-    av_opt_set_int(scaleContext, "dstw", scaledWidth, 0);
++-    av_opt_set_int(scaleContext, "dsth", scaledHeight, 0);
++-    av_opt_set_int(scaleContext, "dst_format", format, 0);
++-    av_opt_set_int(scaleContext, "sws_flags", SWS_BICUBIC, 0);
+++    videoFrame.frameData.resize(videoFrame.lineSize * videoFrame.height);
+++    memcpy((videoFrame.frameData.data()), res->data[0], videoFrame.frameData.size());
++ 
++-    const int* coeff = sws_getCoefficients(SWS_CS_DEFAULT);
++-    if (sws_setColorspaceDetails(scaleContext, coeff, m_pVideoCodecContext->pix_fmt, coeff, format, 0, 1<<16, 1<<16) < 0)
++-    {
++-        sws_freeContext(scaleContext);
++-        throw std::logic_error("Failed to set colorspace details");
++-    }
++ 
++-    if (sws_init_context(scaleContext, nullptr, nullptr) < 0)
+++    if (m_pFilterGraph)
++     {
++-        sws_freeContext(scaleContext);
++-        throw std::logic_error("Failed to initialise scale context");
+++        avfilter_graph_free(&m_pFilterGraph);
++     }
++-
++-    if (nullptr == scaleContext)
++-    {
++-        throw logic_error("Failed to create resize context");
++-    }
++-
++-    AVFrame* convertedFrame = nullptr;
++-    uint8_t* convertedFrameBuffer = nullptr;
++-
++-    createAVFrame(&convertedFrame, &convertedFrameBuffer, scaledWidth, scaledHeight, format);
++-
++-    sws_scale(scaleContext, m_pFrame->data, m_pFrame->linesize, 0, m_pVideoCodecContext->height,
++-              convertedFrame->data, convertedFrame->linesize);
++-    sws_freeContext(scaleContext);
++-
++-    av_free(m_pFrame);
++-    av_free(m_pFrameBuffer);
++-
++-    m_pFrame        = convertedFrame;
++-    m_pFrameBuffer  = convertedFrameBuffer;
++ }
++ 
++ void MovieDecoder::calculateDimensions(int squareSize, bool maintainAspectRatio, int& destWidth, int& destHeight)
++@@ -444,14 +432,15 @@ void MovieDecoder::calculateDimensions(int squareSize, bool maintainAspectRatio,
++     }
++ }
++ 
++-void MovieDecoder::createAVFrame(AVFrame** pAvFrame, uint8_t** pFrameBuffer, int width, int height, AVPixelFormat format)
+++void MovieDecoder::checkRc(int ret, const std::string& message)
++ {
++-    *pAvFrame = av_frame_alloc();
++-    auto* avPicture = reinterpret_cast<AVPicture*>(*pAvFrame);
++-
++-    int numBytes = av_image_get_buffer_size(format, width, height, 1);
++-    *pFrameBuffer = reinterpret_cast<uint8_t*>(av_malloc(numBytes));
++-    av_image_fill_arrays(avPicture->data, avPicture->linesize, *pFrameBuffer, format, width, height, 1);
+++    if (ret < 0)
+++    {
+++        char buf[256];
+++        buf[0] = ' ';
+++        av_strerror(ret, &buf[1], sizeof(buf) - 1);
+++        throw std::logic_error(message + buf);
+++    }
++ }
++ 
++ }
++diff --git a/libffmpegthumbnailer/moviedecoder.h b/libffmpegthumbnailer/moviedecoder.h
++index 19581b2..638d7d1 100644
++--- a/libffmpegthumbnailer/moviedecoder.h
+++++ b/libffmpegthumbnailer/moviedecoder.h
++@@ -31,6 +31,9 @@ extern "C" {
++ #include <libavformat/avformat.h>
++ }
++ 
+++struct AVFilterGraph;
+++struct AVFilterContext;
+++
++ namespace ffmpegthumbnailer
++ {
++ 
++@@ -56,24 +59,25 @@ class MovieDecoder
++ 
++ private:
++     void initializeVideo();
++-    void initializeFilterGraph();
+++    void initializeFilterGraph(AVRational timeBase, int width, int height);
++ 
++     bool decodeVideoPacket();
++     bool getVideoPacket();
++-    void convertAndScaleFrame(AVPixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight);
++-    void createAVFrame(AVFrame** pAvFrame, uint8_t** pFrameBuffer, int width, int height, AVPixelFormat format);
++     void calculateDimensions(int squareSize, bool maintainAspectRatio, int& destWidth, int& destHeight);
++ 
++     void addLogCallback();
+++    void checkRc(int ret, const std::string& message);
++ 
++ private:
++     int                     m_VideoStream;
++     AVFormatContext*        m_pFormatContext;
++     AVCodecContext*         m_pVideoCodecContext;
++     AVCodec*                m_pVideoCodec;
+++    AVFilterGraph*          m_pFilterGraph;
+++    AVFilterContext*        m_pFilterSource;
+++    AVFilterContext*        m_pFilterSink;
++     AVStream*               m_pVideoStream;
++     AVFrame*                m_pFrame;
++-    uint8_t*                m_pFrameBuffer;
++     AVPacket*               m_pPacket;
++     bool                    m_FormatContextWasGiven;
++     bool                    m_AllowSeek;
diff --combined debian/patches/series
index 0000000,0000000..186cc7c
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++Restored-deinterlace.patch
diff --combined debian/rules
index c701ede,0000000..3975e74
mode 100755,000000..100755
--- a/debian/rules
+++ b/debian/rules
@@@ -1,17 -1,0 +1,17 @@@
 +#!/usr/bin/make -f
 +
 +export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -Wl,-O1 -Wl,-z,defs
- export DEB_BUILD_MAINT_OPTIONS=hardening=+all
++DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 +
 +%:
- 	dh $@ --parallel --with autoreconf
++	dh $@ --parallel
 +
 +override_dh_auto_configure:
- 	dh_auto_configure -- --enable-gio --enable-thumbnailer
++	dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON -DENABLE_TESTS=OFF
 +
 +override_dh_strip:
 +	dh_strip --dbg-package=ffmpegthumbnailer-dbg
 +
 +get-orig-source:
 +	-uscan --rename --upstream-version 0
 +	@echo successfully retrieved upstream tarball
diff --combined debian/watch
index 44c8a24,0000000..1d88c87
mode 100644,000000..100644
--- a/debian/watch
+++ b/debian/watch
@@@ -1,5 -1,0 +1,4 @@@
 +version=3
 +
- opts=downloadurlmangle=s#.*(ffmpegthumbnailer-([\d.]+)\.tar\.gz).*#http://ffmpegthumbnailer.googlecode.com/files/$1#,filenamemangle=s#.*(ffmpegthumbnailer-([\d.]+)\.tar\.gz).*#$1# \
- 	http://code.google.com/p/ffmpegthumbnailer/downloads/list ^.*detail\?name=ffmpegthumbnailer-([\d.]+)\.tar\.gz.* \
-     debian debian/orig-tar.sh
++opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/ffmpegthumbnailer-$1\.tar\.gz/ \
++  https://github.com/dirkvdb/ffmpegthumbnailer/tags .*/v?(\d\S*)\.tar\.gz	debian debian/orig-tar.sh

-- 
ffmpegthumbnailer packaging



More information about the pkg-multimedia-commits mailing list