bugGnash - The GNU Flash player - Bugs: bug #47301, cannot build against ffmpeg-3.0

 
 

bug #47301: cannot build against ffmpeg-3.0

Submitter:  None
Submitted:  Sun 28 Feb 2016 08:35:48 PM UTC
   
 
Category:  video-ffmpeg Severity:  3 - Normal
Release:  master Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 03 Mar 2016 03:21:05 PM UTC, comment #7: 

Thanks for testing.

Sandro Santilli <strk>
Group Member
Thu 03 Mar 2016 01:26:42 PM UTC, comment #6: 

master builds and works now, thank you

Real Name <l29ah>
Thu 03 Mar 2016 01:20:34 PM UTC, comment #5: 

Your welcome :)

Abdel-Rahman <abogical>
Thu 03 Mar 2016 09:47:56 AM UTC, comment #4: 

Sounds good, pushed as commit 9229f6fa59061eb930179c6f6a616be541d1139f

Thanks.

Sandro Santilli <strk>
Group Member
Wed 02 Mar 2016 03:15:26 PM UTC, comment #3: 

That is a nice idea, I've Implenented what you've said in a new patch I've attached. The enums will still be renamed for newer version of ffmpeg, but if it's an old version of ffmpeg, We would define macros that would replace the new names with older ones.

However, I haven't tested this out yet on older ffmpeg libraries.

(file #36528)

Abdel-Rahman <abogical>
Wed 02 Mar 2016 07:14:26 AM UTC, comment #2: 

We need an approach that retains backward compatibility.
One idea would be that, based on ffmpeg version, macros withouth the AV prefix are mapped to the AV prefixed ones. Ideally in the libmedia/ffmpeg/ffmpegHeaders.h file, where you'll find more similar mappings.

Sandro Santilli <strk>
Group Member
Tue 01 Mar 2016 07:37:09 PM UTC, comment #1: 

he class and enum names that gnash has used in ffmpeg has been changed since version 3.0, I attached a patch that would rename those classes and fix them.

Abdel-Rahman <abogical>
Sun 28 Feb 2016 08:35:48 PM UTC, original submission:  

Making all in libmedia
make[2]: Entering directory `/home/l29ah/tmp/gnash/libmedia'
  CXX      libgnashmedia_la-VideoDecoderFfmpeg.lo
  CXX      libgnashmedia_la-VideoConverterFfmpeg.lo
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
ffmpeg/VideoConverterFfmpeg.cpp:60:1: error: 'PixelFormat' does not name a type
 PixelFormat
 ^
ffmpeg/VideoConverterFfmpeg.cpp: In constructor 'gnash::media::ffmpeg::VideoConverterFfmpeg::VideoConverterFfmpeg(gnash::media::ImgBuf::Type4CC, gnash::media::ImgBuf::Type4CC)':
ffmpeg/VideoConverterFfmpeg.cpp:121:34: error: 'fourcc_to_ffmpeg' was not declared in this scope
      if(fourcc_to_ffmpeg(_dst_fmt) == PIX_FMT_NONE) {
                                  ^
ffmpeg/VideoConverterFfmpeg.cpp:121:39: error: 'PIX_FMT_NONE' was not declared in this scope
      if(fourcc_to_ffmpeg(_dst_fmt) == PIX_FMT_NONE) {
                                       ^
ffmpeg/VideoConverterFfmpeg.cpp: In member function 'virtual std::unique_ptr<gnash::media::ImgBuf> gnash::media::ffmpeg::VideoConverterFfmpeg::convert(const gnash::media::ImgBuf&)':
ffmpeg/VideoConverterFfmpeg.cpp:141:5: error: 'PixelFormat' was not declared in this scope
     PixelFormat dst_pixFmt = fourcc_to_ffmpeg(_dst_fmt);
     ^
In file included from /usr/include/boost/assert.hpp:54:0,
                 from /usr/include/boost/format/parsing.hpp:21,
                 from /usr/include/boost/format.hpp:50,
                 from ../libbase/log.h:31,
                 from ffmpeg/VideoConverterFfmpeg.cpp:27:
ffmpeg/VideoConverterFfmpeg.cpp:142:12: error: 'dst_pixFmt' was not declared in this scope
     assert(dst_pixFmt != PIX_FMT_NONE);
            ^
ffmpeg/VideoConverterFfmpeg.cpp:142:26: error: 'PIX_FMT_NONE' was not declared in this scope
     assert(dst_pixFmt != PIX_FMT_NONE);
                          ^
ffmpeg/VideoConverterFfmpeg.cpp:143:17: error: expected ';' before 'src_pixFmt'
     PixelFormat src_pixFmt = PIX_FMT_RGB24;
                 ^
ffmpeg/VideoConverterFfmpeg.cpp:150:13: error: 'src_pixFmt' was not declared in this scope
             src_pixFmt, width, height, dst_pixFmt, SWS_BILINEAR, nullptr, nullptr,
             ^
ffmpeg/VideoConverterFfmpeg.cpp:169:19: warning: 'int avpicture_get_size(AVPixelFormat, int, int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4898) [-Wdeprecated-declarations]
     int bufsize = avpicture_get_size(dst_pixFmt, width, height);
                   ^
ffmpeg/VideoConverterFfmpeg.cpp:177:5: warning: 'int avpicture_fill(AVPicture*, const uint8_t*, AVPixelFormat, int, int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4883) [-Wdeprecated-declarations]
     avpicture_fill(&dstpicture, dstbuffer, dst_pixFmt, width, height);
     ^
ffmpeg/VideoConverterFfmpeg.cpp:185:62: warning: 'AVPicture::data' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3668) [-Wdeprecated-declarations]
     int rv = sws_scale(_swsContext->getContext(), srcpicture.data,
                                                              ^
ffmpeg/VideoConverterFfmpeg.cpp:185:62: warning: 'AVPicture::data' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3668) [-Wdeprecated-declarations]
ffmpeg/VideoConverterFfmpeg.cpp:186:35: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
                        srcpicture.linesize, 0, height, dstpicture.data,
                                   ^
ffmpeg/VideoConverterFfmpeg.cpp:186:35: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
ffmpeg/VideoConverterFfmpeg.cpp:186:67: warning: 'AVPicture::data' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3668) [-Wdeprecated-declarations]
                        srcpicture.linesize, 0, height, dstpicture.data,
                                                                   ^
ffmpeg/VideoConverterFfmpeg.cpp:186:67: warning: 'AVPicture::data' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3668) [-Wdeprecated-declarations]
ffmpeg/VideoConverterFfmpeg.cpp:187:35: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
                        dstpicture.linesize);
                                   ^
ffmpeg/VideoConverterFfmpeg.cpp:187:35: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
ffmpeg/VideoConverterFfmpeg.cpp:195:26: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
     std::copy(dstpicture.linesize, dstpicture.linesize+4, ret->stride.begin());
                          ^
ffmpeg/VideoConverterFfmpeg.cpp:195:26: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
ffmpeg/VideoConverterFfmpeg.cpp:195:47: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
     std::copy(dstpicture.linesize, dstpicture.linesize+4, ret->stride.begin());
                                               ^
ffmpeg/VideoConverterFfmpeg.cpp:195:47: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
make[2]: * [libgnashmedia_la-VideoConverterFfmpeg.lo] Error 1
make[2]: * Waiting for unfinished jobs....
ffmpeg/VideoDecoderFfmpeg.cpp:54:5: error: 'PixelFormat' does not name a type
     PixelFormat get_format(AVCodecContext* avctx, const PixelFormat* fmt);
     ^
ffmpeg/VideoDecoderFfmpeg.cpp: In member function 'void gnash::media::ffmpeg::VideoDecoderFfmpeg::init(AVCodecID, int, int, uint8_t*, int)':
ffmpeg/VideoDecoderFfmpeg.cpp:199:27: error: 'get_format' was not declared in this scope
     ctx->get_format     = get_format;
                           ^
ffmpeg/VideoDecoderFfmpeg.cpp: In member function 'std::unique_ptr<gnash::image::GnashImage> gnash::media::ffmpeg::VideoDecoderFfmpeg::frameToImage(AVCodecContext*, const AVFrame&)':
ffmpeg/VideoDecoderFfmpeg.cpp:254:5: error: 'PixelFormat' was not declared in this scope
     PixelFormat srcPixFmt = srcCtx->pix_fmt;
     ^
ffmpeg/VideoDecoderFfmpeg.cpp:263:17: error: expected ';' before 'pixFmt'
     PixelFormat pixFmt = PIX_FMT_RGB24;
                 ^
ffmpeg/VideoDecoderFfmpeg.cpp:287:43: error: 'srcPixFmt' was not declared in this scope
             sws_getContext(width, height, srcPixFmt, width, height,
                                           ^
ffmpeg/VideoDecoderFfmpeg.cpp:288:17: error: 'pixFmt' was not declared in this scope
                 pixFmt, SWS_BILINEAR, nullptr, nullptr, nullptr)
                 ^
ffmpeg/VideoDecoderFfmpeg.cpp:304:19: warning: 'int avpicture_get_size(AVPixelFormat, int, int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4898) [-Wdeprecated-declarations]
     int bufsize = avpicture_get_size(pixFmt, width, height);
                   ^
ffmpeg/VideoDecoderFfmpeg.cpp:304:38: error: 'pixFmt' was not declared in this scope
     int bufsize = avpicture_get_size(pixFmt, width, height);
                                      ^
ffmpeg/VideoDecoderFfmpeg.cpp:309:14: error: 'PIX_FMT_RGBA' was not declared in this scope
         case PIX_FMT_RGBA:
              ^
ffmpeg/VideoDecoderFfmpeg.cpp:312:14: error: 'PIX_FMT_RGB24' was not declared in this scope
         case PIX_FMT_RGB24:
              ^
ffmpeg/VideoDecoderFfmpeg.cpp:325:5: warning: 'int avpicture_fill(AVPicture*, const uint8_t*, AVPixelFormat, int, int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4883) [-Wdeprecated-declarations]
     avpicture_fill(&picture, im->begin(), pixFmt, width, height);
     ^
ffmpeg/VideoDecoderFfmpeg.cpp:338:70: warning: 'AVPicture::data' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3668) [-Wdeprecated-declarations]
             const_cast<int*>(srcFrame->linesize), 0, height, picture.data,
                                                                      ^
ffmpeg/VideoDecoderFfmpeg.cpp:338:70: warning: 'AVPicture::data' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3668) [-Wdeprecated-declarations]
ffmpeg/VideoDecoderFfmpeg.cpp:339:21: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
             picture.linesize);
                     ^
ffmpeg/VideoDecoderFfmpeg.cpp:339:21: warning: 'AVPicture::linesize' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3670) [-Wdeprecated-declarations]
ffmpeg/VideoDecoderFfmpeg.cpp: At global scope:
ffmpeg/VideoDecoderFfmpeg.cpp:502:1: error: 'PixelFormat' does not name a type
 PixelFormat
 ^
ffmpeg/VideoDecoderFfmpeg.cpp:488:1: warning: 'void gnash::media::ffmpeg::{anonymous}::reset_context(AVCodecContext*, gnash::media::ffmpeg::VaapiContextFfmpeg*)' defined but not used [-Wunused-function]
 reset_context(AVCodecContext* avctx, VaapiContextFfmpeg* vactx)
 ^
make[2]: * [libgnashmedia_la-VideoDecoderFfmpeg.lo] Error 1

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #36528:  pixfmt_gnash.patch added by abogical (8KiB - text/x-patch)
file #36522:  pixelformat_gnash.patch added by abogical (7KiB - text/x-patch - The class and enum names that gnash has used in ffmpeg has been changed since version 3.0, I made a patch that would rename those classes and fix them.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by l29ah (Posted a comment)
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by abogical (Updated the item)
  • -email is unavailable- added by l29ah (reporter)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-03 strk StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-03-03 strk StatusNone Ready For Test
    2016-03-02 abogical Attached File- Added pixfmt_gnash.patch, #36528
    2016-03-02 strk Assigned toNone strk
    2016-03-01 abogical Attached File- Added pixelformat_gnash.patch, #36522
    2016-02-28 l29ah Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code