Bug 214194 - multimedia/kdemultimedia4-ffmpegthumbs: fails to build with ffmpeg 3.x
Summary: multimedia/kdemultimedia4-ffmpegthumbs: fails to build with ffmpeg 3.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: kde
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 207547
  Show dependency treegraph
 
Reported: 2016-11-04 05:19 UTC by Jan Beich
Modified: 2016-12-07 11:52 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
patch kdemultimedia4-ffmpegthumbs for ffmpeg3.x (12.37 KB, patch)
2016-11-04 13:58 UTC, Matthew Rezny
no flags Details | Diff
patch kdemultimedia4-ffmpegthumbs for FFmpeg 3.x (12.67 KB, patch)
2016-11-13 19:13 UTC, Matthew Rezny
no flags Details | Diff
Same as previous patch but s/nullptr/NULL/g (12.65 KB, patch)
2016-11-28 21:10 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2016-11-04 05:19:57 UTC
ffmpegthumbnailer/moviedecoder.h:55:31: error: unknown type name 'PixelFormat'; did you mean 'AVPixelFormat'?
    void convertAndScaleFrame(PixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight);
                              ^~~~~~~~~~~
                              AVPixelFormat
/usr/local/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
     ^
ffmpegthumbnailer/moviedecoder.cpp:70:16: error: use of undeclared identifier 'avcodec_alloc_frame'
    m_pFrame = avcodec_alloc_frame();
               ^
ffmpegthumbnailer/moviedecoder.cpp:242:5: error: use of undeclared identifier 'avcodec_get_frame_defaults'
    avcodec_get_frame_defaults(m_pFrame);
    ^
ffmpegthumbnailer/moviedecoder.cpp:289:9: error: use of undeclared identifier 'avpicture_deinterlace'
        avpicture_deinterlace((AVPicture*) m_pFrame, (AVPicture*) m_pFrame, m_pVideoCodecContext->pix_fmt,
        ^
ffmpegthumbnailer/moviedecoder.cpp:305:41: error: unknown type name 'PixelFormat'; did you mean 'AVPixelFormat'?
void MovieDecoder::convertAndScaleFrame(PixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight)
                                        ^~~~~~~~~~~
                                        AVPixelFormat
/usr/local/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
     ^

http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/kdemultimedia-ffmpegthumbs-4.14.3.log
Comment 1 Tobias C. Berner freebsd_committer 2016-11-04 08:15:09 UTC
Maybe we need to grab: https://git.reviewboard.kde.org/r/126992
Comment 2 Matthew Rezny freebsd_committer 2016-11-04 13:58:31 UTC
Created attachment 176620 [details]
patch kdemultimedia4-ffmpegthumbs for ffmpeg3.x

The attached patch is based on the KDE ReviewBoard submission and modified to work with the kde4 version. While here, I also added a patch to fix a type error and added the all the missing USE_QT4 bits caught by QA. This patch has been compile tested on 11amd64 with both ffmpeg 2.8.8 and ffmpeg 3.2.
Comment 3 Matthew Rezny freebsd_committer 2016-11-13 19:13:33 UTC
Created attachment 176963 [details]
patch kdemultimedia4-ffmpegthumbs for FFmpeg 3.x

I have refreshed the patch using what was committed to KDE's git repo rather than the patch from their ReviewBoard. Minor adjustments were made to apply to KDE4.
Comment 4 Jan Beich freebsd_committer 2016-11-26 10:27:20 UTC
Comment on attachment 176963 [details]
patch kdemultimedia4-ffmpegthumbs for FFmpeg 3.x

Fails to build on 9.x:

  ffmpegthumbnailer/moviedecoder.cpp: In constructor 'ffmpegthumbnailer::MovieDecoder::MovieDecoder(const QString&, AVFormatContext*)':
  ffmpegthumbnailer/moviedecoder.cpp:43: error: 'nullptr' was not declared in this scope
  ffmpegthumbnailer/moviedecoder.cpp: In member function 'void ffmpegthumbnailer::MovieDecoder::deleteFilterGraph()':
  ffmpegthumbnailer/moviedecoder.cpp:299: error: 'nullptr' was not declared in this scope
  ffmpegthumbnailer/moviedecoder.cpp: In member function 'bool ffmpegthumbnailer::MovieDecoder::initFilterGraph(AVPixelFormat, int, int)':
  ffmpegthumbnailer/moviedecoder.cpp:305: error: 'nullptr' was not declared in this scope

http://package23.nyi.freebsd.org/data/93i386-default-PR207547/2016-11-25_15h17m51s/logs/errors/kdemultimedia-ffmpegthumbs-4.14.3.log
Comment 5 Tobias C. Berner freebsd_committer 2016-11-28 21:05:57 UTC
Just replacing 'nullptr' by 'NULL' in the patch should work fine, I think.
Comment 6 Tobias C. Berner freebsd_committer 2016-11-28 21:10:08 UTC
Created attachment 177494 [details]
Same as previous patch but s/nullptr/NULL/g
Comment 7 Thomas Zander freebsd_committer 2016-12-03 16:46:07 UTC
(In reply to Tobias C. Berner from comment #6)

Is there anything stopping kde@ from committing this? This is the last PR considered mandatory by portmgr before the ffmpeg3 update can hit the tree.
Comment 8 commit-hook freebsd_committer 2016-12-05 14:44:18 UTC
A commit references this bug:

Author: tcberner
Date: Mon Dec  5 14:43:13 UTC 2016
New revision: 427900
URL: https://svnweb.freebsd.org/changeset/ports/427900

Log:
  Fix build with ffmpeg-3.x

  Import slightly modified version from upstream
  https://git.reviewboard.kde.org/r/126992/

  With this patch the port still works with ffmpeg-2.x.
  PORTREVISION is being bumped for two reasons: the dependencies have been
  changed (aka "make stage-qa happy") but also the ffmpeg3 patch causes the
  library to change (it links against libavfilter at the very least)

  PR:		214194
  Submitted by:	Matthew Rezny <matthew@reztek.cz>
  Reported by:	jbeich
  Approved by:	rakuco (mentor)

Changes:
  head/multimedia/kdemultimedia4-ffmpegthumbs/Makefile
  head/multimedia/kdemultimedia4-ffmpegthumbs/files/patch-kde_rb-126992
Comment 9 Tobias C. Berner freebsd_committer 2016-12-05 14:45:25 UTC
Committed. Thanks again to Matthew for addapting the patch :).
Comment 10 Matthew Rezny freebsd_committer 2016-12-07 11:52:47 UTC
(In reply to Tobias C. Berner from comment #9)

The commit appears to be based on the obsolete patch from ReviewBoard rather than either of the active attachments which use the later patch from git.