Jose Manuel Santamaria Lema has proposed merging ~panfaust/kubuntu-packaging/+git/ffmpegthumbs:work into ~kubuntu-packagers/kubuntu-packaging/+git/ffmpegthumbs:kubuntu_yakkety_archive.
Requested reviews: Kubuntu Packagers (kubuntu-packagers) For more details, see: https://code.launchpad.net/~panfaust/kubuntu-packaging/+git/ffmpegthumbs/+merge/300788 Right now ffmpegthumbs 16.04.3 is failing to build in staging, there is an upstream patch for this included in debian which solves the issue. -- Your team Kubuntu Packagers is requested to review the proposed merge of ~panfaust/kubuntu-packaging/+git/ffmpegthumbs:work into ~kubuntu-packagers/kubuntu-packaging/+git/ffmpegthumbs:kubuntu_yakkety_archive.
diff --git a/debian/changelog b/debian/changelog index 390a1ee..080d3e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,18 @@ ffmpegthumbs (4:16.04.3-0ubuntu1) UNRELEASED; urgency=medium * Removing patch ffmpeg_2.9.patch * New upstream release (16.04.3) + [ José Manuel SantamarÃa Lema ] + * Merge with debian, fixing a FTBFS. + -- Clive Johnston <[email protected]> Fri, 08 Jul 2016 00:44:44 +0100 +ffmpegthumbs (4:16.04.2-1) unstable; urgency=medium + + [ Automatic packaging ] + * Refresh patches + + -- Maximiliano Curia <[email protected]> Wed, 22 Jun 2016 16:18:03 +0200 + ffmpegthumbs (4:15.12.3-0ubuntu1) xenial; urgency=medium * New upstream bugfix release @@ -36,12 +46,20 @@ ffmpegthumbs (4:15.12.1-0ubuntu1) xenial; urgency=medium -- Clive Johnston <[email protected]> Wed, 09 Mar 2016 10:23:59 +0100 -ffmpegthumbs (4:15.12.0-2~) UNRELEASED; urgency=medium +ffmpegthumbs (4:15.12.0-2) unstable; urgency=medium + [ Maximiliano Curia ] * Add new patch: ffmpeg2.9_support.patch (Closes: #803813) Thanks to Andreas Cadhalpun + * debian/control: Update Vcs-Browser and Vcs-Git fields + * Add upstream metadata (DEP-12) + * Use the newer debian-qt-kde.mk + * Use upstream ffmpeg 2.9 patch + + [ Automatic packaging ] + * Bump Standards-Version to 3.9.8 - -- Maximiliano Curia <[email protected]> Fri, 05 Feb 2016 10:42:11 +0100 + -- Maximiliano Curia <[email protected]> Sun, 29 May 2016 15:40:55 +0200 ffmpegthumbs (4:15.12.0-1) experimental; urgency=medium diff --git a/debian/control b/debian/control index 4cc4a18..0e0a3d2 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Build-Depends: cmake (>= 2.8.12~), pkg-config, pkg-kde-tools (>= 0.12), qtbase5-dev (>= 5.2.0~) -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Homepage: http://www.kde.org/ Vcs-Browser: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/ffmpegthumbs Vcs-Git: git://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/ffmpegthumbs diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..b9788e9 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +upstream_port_to_libavfilter.patch diff --git a/debian/patches/upstream_port_to_libavfilter.patch b/debian/patches/upstream_port_to_libavfilter.patch new file mode 100644 index 0000000..0bdc4c4 --- /dev/null +++ b/debian/patches/upstream_port_to_libavfilter.patch @@ -0,0 +1,321 @@ +From: Debian/Kubuntu Qt/KDE Maintainers <[email protected]> +Date: Wed, 15 Jun 2016 01:53:13 +0200 +Subject: upstream_port_to_libavfilter + +commit 3978c762072b7bc16b2096819b7cfa2052deaf5e +Author: Martin T. H. Sandsmark <[email protected]> +Date: Fri May 27 22:29:11 2016 +0200 + + Port to libavfilter for deinterlacing. + + Based on a patch from Andreas Cadhalpun + <[email protected]>. +--- + CMakeLists.txt | 2 +- + cmake/FindFFmpeg.cmake | 1 + + ffmpegthumbnailer/moviedecoder.cpp | 117 +++++++++++++++++++++++++++++++++---- + ffmpegthumbnailer/moviedecoder.h | 18 +++++- + tests/CMakeLists.txt | 2 +- + 5 files changed, 124 insertions(+), 16 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7a025d4..1fab769 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ set( ffmpegthumbs_PART_SRCS + + add_library(ffmpegthumbs MODULE ${ffmpegthumbs_PART_SRCS}) + +-target_link_libraries(ffmpegthumbs Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} ) ++target_link_libraries(ffmpegthumbs Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFILTER_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} ) + + install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR}) + +diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake +index 27c6b16..915ab5f 100644 +--- a/cmake/FindFFmpeg.cmake ++++ b/cmake/FindFFmpeg.cmake +@@ -99,6 +99,7 @@ if (NOT FFMPEG_LIBRARIES) + + # Check for all possible component. + find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h) ++ find_component(AVFILTER libavfilter avfilter libavfilter/avfilter.h) + find_component(AVFORMAT libavformat avformat libavformat/avformat.h) + find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h) + find_component(AVUTIL libavutil avutil libavutil/avutil.h) +diff --git a/ffmpegthumbnailer/moviedecoder.cpp b/ffmpegthumbnailer/moviedecoder.cpp +index c8ae6d1..b2e7551 100644 +--- a/ffmpegthumbnailer/moviedecoder.cpp ++++ b/ffmpegthumbnailer/moviedecoder.cpp +@@ -40,6 +40,10 @@ MovieDecoder::MovieDecoder(const QString& filename, AVFormatContext* pavContext) + , m_FormatContextWasGiven(pavContext != NULL) + , m_AllowSeek(true) + , m_initialized(false) ++ , m_bufferSinkContext(nullptr) ++ , m_bufferSourceContext(nullptr) ++ , m_filterGraph(nullptr) ++ , m_filterFrame(nullptr) + { + initialize(filename); + } +@@ -51,6 +55,9 @@ MovieDecoder::~MovieDecoder() + + void MovieDecoder::initialize(const QString& filename) + { ++ m_lastWidth = -1; ++ m_lastHeight = -1; ++ m_lastPixfmt = AV_PIX_FMT_NONE; + av_register_all(); + avcodec_register_all(); + +@@ -67,7 +74,7 @@ void MovieDecoder::initialize(const QString& filename) + } + + initializeVideo(); +- m_pFrame = avcodec_alloc_frame(); ++ m_pFrame = av_frame_alloc(); + + if (m_pFrame) { + m_initialized=true; +@@ -82,6 +89,7 @@ bool MovieDecoder::getInitialized() + + void MovieDecoder::destroy() + { ++ deleteFilterGraph(); + if (m_pVideoCodecContext) { + avcodec_close(m_pVideoCodecContext); + m_pVideoCodecContext = NULL; +@@ -93,13 +101,13 @@ void MovieDecoder::destroy() + } + + if (m_pPacket) { +- av_free_packet(m_pPacket); ++ av_packet_unref(m_pPacket); + delete m_pPacket; + m_pPacket = NULL; + } + + if (m_pFrame) { +- av_free(m_pFrame); ++ av_frame_free(&m_pFrame); + m_pFrame = NULL; + } + +@@ -239,7 +247,7 @@ bool MovieDecoder::decodeVideoPacket() + return false; + } + +- avcodec_get_frame_defaults(m_pFrame); ++ av_frame_unref(m_pFrame); + + int frameFinished = 0; + +@@ -264,7 +272,7 @@ bool MovieDecoder::getVideoPacket() + int attempts = 0; + + if (m_pPacket) { +- av_free_packet(m_pPacket); ++ av_packet_unref(m_pPacket); + delete m_pPacket; + } + +@@ -275,7 +283,7 @@ bool MovieDecoder::getVideoPacket() + if (framesAvailable) { + frameDecoded = m_pPacket->stream_index == m_VideoStream; + if (!frameDecoded) { +- av_free_packet(m_pPacket); ++ av_packet_unref(m_pPacket); + } + } + } +@@ -283,15 +291,100 @@ bool MovieDecoder::getVideoPacket() + return frameDecoded; + } + ++void MovieDecoder::deleteFilterGraph() ++{ ++ if (m_filterGraph) { ++ av_frame_free(&m_filterFrame); ++ avfilter_graph_free(&m_filterGraph); ++ m_filterGraph = nullptr; ++ } ++} ++ ++bool MovieDecoder::initFilterGraph(enum AVPixelFormat pixfmt, int width, int height) ++{ ++ AVFilterInOut *inputs = nullptr, *outputs = nullptr; ++ ++ deleteFilterGraph(); ++ m_filterGraph = avfilter_graph_alloc(); ++ ++ QByteArray arguments("buffer="); ++ arguments += "video_size=" + QByteArray::number(width) + "x" + QByteArray::number(height) + ":"; ++ arguments += "pix_fmt=" + QByteArray::number(pixfmt) + ":"; ++ arguments += "time_base=1/1:pixel_aspect=0/1[in];"; ++ arguments += "[in]yadif[out];"; ++ arguments += "[out]buffersink"; ++ ++ int ret = avfilter_graph_parse2(m_filterGraph, arguments.constData(), &inputs, &outputs); ++ if (ret < 0) { ++ qWarning() << "Unable to parse filter graph"; ++ return false; ++ } ++ ++ if(inputs || outputs) ++ return -1; ++ ++ ret = avfilter_graph_config(m_filterGraph, nullptr); ++ if (ret < 0) { ++ qWarning() << "Unable to validate filter graph"; ++ return false; ++ } ++ ++ m_bufferSourceContext = avfilter_graph_get_filter(m_filterGraph, "Parsed_buffer_0"); ++ m_bufferSinkContext = avfilter_graph_get_filter(m_filterGraph, "Parsed_buffersink_2"); ++ if (!m_bufferSourceContext || !m_bufferSinkContext) { ++ qWarning() << "Unable to get source or sink"; ++ return false; ++ } ++ m_filterFrame = av_frame_alloc(); ++ m_lastWidth = width; ++ m_lastHeight = height; ++ m_lastPixfmt = pixfmt; ++ ++ return true; ++} ++ ++bool MovieDecoder::processFilterGraph(AVPicture *dst, const AVPicture *src, ++ enum AVPixelFormat pixfmt, int width, int height) ++{ ++ if (!m_filterGraph || width != m_lastWidth || ++ height != m_lastHeight || pixfmt != m_lastPixfmt) { ++ ++ if (!initFilterGraph(pixfmt, width, height)) { ++ return false; ++ } ++ } ++ ++ memcpy(m_filterFrame->data, src->data, sizeof(src->data)); ++ memcpy(m_filterFrame->linesize, src->linesize, sizeof(src->linesize)); ++ m_filterFrame->width = width; ++ m_filterFrame->height = height; ++ m_filterFrame->format = pixfmt; ++ ++ int ret = av_buffersrc_add_frame(m_bufferSourceContext, m_filterFrame); ++ if (ret < 0) { ++ return false; ++ } ++ ++ ret = av_buffersink_get_frame(m_bufferSinkContext, m_filterFrame); ++ if (ret < 0) { ++ return false; ++ } ++ ++ av_picture_copy(dst, (const AVPicture *) m_filterFrame, pixfmt, width, height); ++ av_frame_unref(m_filterFrame); ++ ++ return true; ++} ++ + void MovieDecoder::getScaledVideoFrame(int scaledSize, bool maintainAspectRatio, VideoFrame& videoFrame) + { + if (m_pFrame->interlaced_frame) { +- avpicture_deinterlace((AVPicture*) m_pFrame, (AVPicture*) m_pFrame, m_pVideoCodecContext->pix_fmt, ++ processFilterGraph((AVPicture*) m_pFrame, (AVPicture*) m_pFrame, m_pVideoCodecContext->pix_fmt, + m_pVideoCodecContext->width, m_pVideoCodecContext->height); + } + + int scaledWidth, scaledHeight; +- convertAndScaleFrame(PIX_FMT_RGB24, scaledSize, maintainAspectRatio, scaledWidth, scaledHeight); ++ convertAndScaleFrame(AV_PIX_FMT_RGB24, scaledSize, maintainAspectRatio, scaledWidth, scaledHeight); + + videoFrame.width = scaledWidth; + videoFrame.height = scaledHeight; +@@ -302,7 +395,7 @@ void MovieDecoder::getScaledVideoFrame(int scaledSize, bool maintainAspectRatio, + memcpy((&(videoFrame.frameData.front())), m_pFrame->data[0], videoFrame.lineSize * videoFrame.height); + } + +-void MovieDecoder::convertAndScaleFrame(PixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight) ++void MovieDecoder::convertAndScaleFrame(AVPixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight) + { + calculateDimensions(scaledSize, maintainAspectRatio, scaledWidth, scaledHeight); + SwsContext* scaleContext = sws_getContext(m_pVideoCodecContext->width, m_pVideoCodecContext->height, +@@ -323,7 +416,7 @@ void MovieDecoder::convertAndScaleFrame(PixelFormat format, int scaledSize, bool + convertedFrame->data, convertedFrame->linesize); + sws_freeContext(scaleContext); + +- av_free(m_pFrame); ++ av_frame_free(&m_pFrame); + av_free(m_pFrameBuffer); + + m_pFrame = convertedFrame; +@@ -355,9 +448,9 @@ void MovieDecoder::calculateDimensions(int squareSize, bool maintainAspectRatio, + } + } + +-void MovieDecoder::createAVFrame(AVFrame** avFrame, quint8** frameBuffer, int width, int height, PixelFormat format) ++void MovieDecoder::createAVFrame(AVFrame** avFrame, quint8** frameBuffer, int width, int height, AVPixelFormat format) + { +- *avFrame = avcodec_alloc_frame(); ++ *avFrame = av_frame_alloc(); + + int numBytes = avpicture_get_size(format, width, height); + *frameBuffer = reinterpret_cast<quint8*>(av_malloc(numBytes)); +diff --git a/ffmpegthumbnailer/moviedecoder.h b/ffmpegthumbnailer/moviedecoder.h +index 2888926..788ce43 100644 +--- a/ffmpegthumbnailer/moviedecoder.h ++++ b/ffmpegthumbnailer/moviedecoder.h +@@ -23,6 +23,9 @@ + extern "C" { + #include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> ++#include <libavfilter/avfilter.h> ++#include <libavfilter/buffersrc.h> ++#include <libavfilter/buffersink.h> + } + + namespace ffmpegthumbnailer +@@ -52,10 +55,14 @@ private: + + bool decodeVideoPacket(); + bool getVideoPacket(); +- void convertAndScaleFrame(PixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight); +- void createAVFrame(AVFrame** avFrame, quint8** frameBuffer, int width, int height, PixelFormat format); ++ void convertAndScaleFrame(AVPixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight); ++ void createAVFrame(AVFrame** avFrame, quint8** frameBuffer, int width, int height, AVPixelFormat format); + void calculateDimensions(int squareSize, bool maintainAspectRatio, int& destWidth, int& destHeight); + ++ void deleteFilterGraph(); ++ bool initFilterGraph(enum AVPixelFormat pixfmt, int width, int height); ++ bool processFilterGraph(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pixfmt, int width, int height); ++ + private: + int m_VideoStream; + AVFormatContext* m_pFormatContext; +@@ -68,6 +75,13 @@ private: + bool m_FormatContextWasGiven; + bool m_AllowSeek; + bool m_initialized; ++ AVFilterContext* m_bufferSinkContext; ++ AVFilterContext* m_bufferSourceContext; ++ AVFilterGraph* m_filterGraph; ++ AVFrame* m_filterFrame; ++ int m_lastWidth; ++ int m_lastHeight; ++ enum AVPixelFormat m_lastPixfmt; + }; + + } +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 1728fcd..b46169a 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -19,7 +19,7 @@ set(ffmpegthumbtest_SRCS ffmpegthumbtest.cpp + + add_executable(ffmpegthumbtest ${ffmpegthumbtest_SRCS} ) + +-target_link_libraries(ffmpegthumbtest Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES}) ++target_link_libraries(ffmpegthumbtest Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFILTER_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES}) + + + diff --git a/debian/rules b/debian/rules index 169ddd7..4c9ce6a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,4 @@ #!/usr/bin/make -f -include /usr/share/pkg-kde-tools/qt-kde-team/2/debian-qt-kde.mk +include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..a03b122 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,7 @@ +Name: ffmpegthumbs +Changelog: https://quickgit.kde.org/?p=ffmpegthumbs.git&a=log +Contact: [email protected] +Donation: https://www.kde.org/community/donations/index.php +Repository: https://anongit.kde.org/ffmpegthumbs.git +Repository-Browse: https://quickgit.kde.org/?p=ffmpegthumbs.git +Security-Contact: [email protected]
-- kubuntu-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
