[MacPorts] #51223: OpenSceneGraph, OpenSceneGraph-devel: build of ffmpeg plugin fails when using ffmpeg-3.0+

MacPorts noreply at macports.org
Sun Apr 24 11:43:56 PDT 2016


#51223: OpenSceneGraph, OpenSceneGraph-devel: build of ffmpeg plugin fails when
using ffmpeg-3.0+
----------------------+--------------------------------------------------
 Reporter:  devans@…  |      Owner:  macports-tickets@…
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:
 Keywords:            |       Port:  OpenSceneGraph, OpenSceneGraph-devel
----------------------+--------------------------------------------------
 Taking OpenSceneGraph-devel as an example (OpenSceneGraph fails is the
 same fashion and OpenSceneGraph-devel represents the latest git master)

 {{{
 :info:build [ 61%] Building CXX object
 src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderAudio.cpp.o
 :info:build cd /opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/build/src/osgPlugins/ffmpeg &&
 /Applications/Xcode-7.2/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
 -DUSE_AVRESAMPLE -DUSE_SWRESAMPLE -DUSE_SWSCALE -D__STDC_CONSTANT_MACROS
 -Dosgdb_ffmpeg_EXPORTS -I/opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/OpenSceneGraph-ae9b9c57b65723fa0cbd4d55bbe7e235e32d89b5/include
 -F//System/Library/Frameworks -I/opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/build/include -I/opt/local/include
 -I/opt/local/include/libswscale -I/opt/local/include/libswresample
 -I/opt/local/include/libavresample  -pipe -Os   -std=c++11 -stdlib=libc++
 -Wno-conversion -Wno-deprecated-declarations -DNDEBUG -arch x86_64
 -mmacosx-version-min=10.10 -fPIC   -o
 CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderAudio.cpp.o -c
 /opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/OpenSceneGraph-
 ae9b9c57b65723fa0cbd4d55bbe7e235e32d89b5/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
 :info:build /opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/OpenSceneGraph-
 ae9b9c57b65723fa0cbd4d55bbe7e235e32d89b5/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:230:20:
 error: no member named 'get_buffer' in 'AVCodecContext'; did you mean
 'get_buffer2'?
 :info:build         m_context->get_buffer = avcodec_default_get_buffer;
 :info:build                    ^~~~~~~~~~
 :info:build                    get_buffer2
 :info:build /opt/local/include/libavcodec/avcodec.h:2442:11: note:
 'get_buffer2' declared here
 :info:build     int (*get_buffer2)(struct AVCodecContext *s, AVFrame
 *frame, int flags);
 :info:build           ^
 :info:build /opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/OpenSceneGraph-
 ae9b9c57b65723fa0cbd4d55bbe7e235e32d89b5/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:230:33:
 error: use of undeclared identifier 'avcodec_default_get_buffer'; did you
 mean 'avcodec_default_get_buffer2'?
 :info:build         m_context->get_buffer = avcodec_default_get_buffer;
 :info:build                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
 :info:build                                 avcodec_default_get_buffer2
 :info:build /opt/local/include/libavcodec/avcodec.h:4219:5: note:
 'avcodec_default_get_buffer2' declared here
 :info:build int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame
 *frame, int flags);
 :info:build     ^
 :info:build /opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/OpenSceneGraph-
 ae9b9c57b65723fa0cbd4d55bbe7e235e32d89b5/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:231:20:
 error: no member named 'release_buffer' in 'AVCodecContext'
 :info:build         m_context->release_buffer =
 avcodec_default_release_buffer;
 :info:build         ~~~~~~~~~  ^
 :info:build 1 warning generated.
 :info:build /opt/local/var/macports/build
 /_opt_macports_trunk_dports_graphics_OpenSceneGraph-devel/OpenSceneGraph-
 devel/work/OpenSceneGraph-
 ae9b9c57b65723fa0cbd4d55bbe7e235e32d89b5/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:231:37:
 error: use of undeclared identifier 'avcodec_default_release_buffer'; did
 you mean 'avcodec_default_get_buffer2'?
 :info:build         m_context->release_buffer =
 avcodec_default_release_buffer;
 :info:build
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 :info:build
 avcodec_default_get_buffer2
 :info:build /opt/local/include/libavcodec/avcodec.h:4219:5: note:
 'avcodec_default_get_buffer2' declared here
 :info:build int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame
 *frame, int flags);
 :info:build     ^
 }}}

 In ffmpeg-3.0, the deprecated get_buffer, release_buffer API has been
 removed in favor of the newer get_buffer2 and friends.  The newer API
 introduces refcounted buffers and, therefore, behaves in a somewhat
 different manner. The solution here will require a more extensive
 rewrite/redesign than most.

 For more details on the necessary changes, see
 [https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges FFmpeg
 APIchanges] under `Reference counted buffers` circa 2013-03-08.

 Note also that these errors effect the FFmpeg audio module.  It's likely
 that there are other issues in the FFmpeg video module and perhaps
 elsewhere as well.

 I'm reporting this upstream for action by someone who understands the code
 better than I.  Until this is resolved, after upgrading ffmpeg to the
 version 3.0 series, the only choice will be to disable the FFmpeg plugin.
 I'd be interested in some feedback from actual OSG users who could
 quantify what the impact would be if this were the case.

-- 
Ticket URL: <https://trac.macports.org/ticket/51223>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list