Bug 214192 - multimedia/bino: fails to build with ffmpeg 3.x
Summary: multimedia/bino: 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: Jan Beich
URL:
Keywords: needs-patch
Depends on:
Blocks: 207547
  Show dependency treegraph
 
Reported: 2016-11-04 05:12 UTC by Jan Beich
Modified: 2016-11-18 22:03 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (i)


Attachments

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:12:19 UTC
src/media_object.cpp:435:41: error: use of undeclared identifier 'PIX_FMT_YUV444P'; did you mean 'AV_PIX_FMT_YUV444P'?
        if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
                                        ^~~~~~~~~~~~~~~
                                        AV_PIX_FMT_YUV444P
/usr/local/include/libavutil/pixfmt.h:67:5: note: 'AV_PIX_FMT_YUV444P' declared here
    AV_PIX_FMT_YUV444P,   ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
    ^
src/media_object.cpp:1943:92: error: use of undeclared identifier 'CODEC_ID_TEXT'; did you mean 'AV_CODEC_ID_TEXT'?
        if (_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec->codec_id != CODEC_ID_TEXT)
                                                                                           ^~~~~~~~~~~~~
                                                                                           AV_CODEC_ID_TEXT
/usr/local/include/libavcodec/avcodec.h:606:5: note: 'AV_CODEC_ID_TEXT' declared here
    AV_CODEC_ID_TEXT,  ///< raw UTF-8 text
    ^
src/media_object.cpp:935:45: error: use of undeclared identifier 'avcodec_alloc_frame'
            _ffmpeg->video_frames.push_back(avcodec_alloc_frame());
                                            ^
src/media_object.cpp:937:18: error: ISO C++ forbids forward references to 'enum' types
            enum PixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
                 ^

http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/bino-1.4.2_3.log
Comment 1 Thomas Zander freebsd_committer 2016-11-13 15:35:36 UTC
This does not need a fix only for ffmpeg 3, but also for libc++ 3.8+:

...
str.cpp:97:11: error: call to member function 'insert' is ambiguous
        s.insert(0, 1, (negative ? ('0' - x % 10) : ('0' + x % 10)));
        ~~^~~~~~
...
Comment 2 Jan Beich freebsd_committer 2016-11-18 21:43:14 UTC
(In reply to Thomas Zander from comment #1)
> also for libc++ 3.8+

Outside of scope. Please, file a separate bug and maybe CC dim@ for help.
Comment 3 commit-hook freebsd_committer 2016-11-18 22:02:43 UTC
A commit references this bug:

Author: jbeich
Date: Fri Nov 18 22:01:35 UTC 2016
New revision: 426347
URL: https://svnweb.freebsd.org/changeset/ports/426347

Log:
  multimedia/bino: unbreak build with ffmpeg 3.x

  src/media_object.cpp:435:41: error: use of undeclared identifier 'PIX_FMT_YUV444P'; did you mean 'AV_PIX_FMT_YUV444P'?
          if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
                                          ^~~~~~~~~~~~~~~
                                          AV_PIX_FMT_YUV444P
  /usr/local/include/libavutil/pixfmt.h:67:5: note: 'AV_PIX_FMT_YUV444P' declared here
      AV_PIX_FMT_YUV444P,   ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
      ^
  src/media_object.cpp:1943:92: error: use of undeclared identifier 'CODEC_ID_TEXT'; did you mean 'AV_CODEC_ID_TEXT'?
          if (_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec->codec_id != CODEC_ID_TEXT)
                                                                                             ^~~~~~~~~~~~~
                                                                                             AV_CODEC_ID_TEXT
  /usr/local/include/libavcodec/avcodec.h:606:5: note: 'AV_CODEC_ID_TEXT' declared here
      AV_CODEC_ID_TEXT,  ///< raw UTF-8 text
      ^
  src/media_object.cpp:935:45: error: use of undeclared identifier 'avcodec_alloc_frame'
              _ffmpeg->video_frames.push_back(avcodec_alloc_frame());
                                              ^
  src/media_object.cpp:937:18: error: ISO C++ forbids forward references to 'enum' types
              enum PixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
                   ^

  PR:		214192
  Obtained from:	upstream (based on)
  Approved by:	portmgr blanket

Changes:
  head/multimedia/bino/Makefile
  head/multimedia/bino/files/patch-src-media_object.cpp
  head/multimedia/bino/files/patch-src_media__object.cpp