stefantalpalaru / gentoo-overlay

Gentoo overlay
GNU General Public License v2.0
43 stars 11 forks source link

x11-misc/electricsheep - compile fails against ffmpeg-3.2.2 #9

Closed ExecutorElassus closed 7 years ago

ExecutorElassus commented 7 years ago

Compile against recent ffmpeg fails with the following errors:

In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:78:48: error: ‘PixelFormat’ has not been declared CVideoFrame( AVCodecContext _pCodecContext, PixelFormat _format, std::string _filename ) : m_pFrame(NULL) ^ ../ContentDecoder/Frame.h: In constructor ‘ContentDecoder::CVideoFrame::CVideoFrame(AVCodecContext, int, std::cxx11::string)’: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:106:98: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5468:5: note: initializing argument 1 of ‘int avpicture_get_size(AVPixelFormat, int, int)’ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:106:98: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecCont ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecCont ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:128: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] _fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5453:5: note: initializing argument 3 of ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:128: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int ’ is deprecated [-Wdeprecated-declarations] _fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from Player.h:11:0, from Player.cpp:37: ../ContentDecoder/ContentDecoder.h: At global scope: ../ContentDecoder/ContentDecoder.h:199:2: error: ‘PixelFormat’ does not name a type PixelFormat m_WantedPixelFormat; ^ ../ContentDecoder/ContentDecoder.h:233:120: error: ‘PixelFormat’ has not been declared der( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat ^ In file included from Player.h:11:0, from Player.cpp:37: ../ContentDecoder/ContentDecoder.h:233:153: error: ‘PIX_FMT_RGB24’ was not declared in this scope l _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:78:48: error: ‘PixelFormat’ has not been declared CVideoFrame( AVCodecContext _pCodecContext, PixelFormat _format, std::string _filename ) : m_pFrame(NULL) ^ ../ContentDecoder/Frame.h: In constructor ‘ContentDecoder::CVideoFrame::CVideoFrame(AVCodecContext, int, std::__cxx11::string)’: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:106:98: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5468:5: note: initializing argument 1 of ‘int avpicture_get_size(AVPixelFormat, int, int)’ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:106:98: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecCont ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecCont ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:108:128: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] _fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5453:5: note: initializing argument 3 of ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Voting.cpp:17: ../ContentDecoder/Frame.h:108:128: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int ’ is deprecated [-Wdeprecated-declarations] _fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Voting.cpp:17: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from Player.h:11:0, from Voting.cpp:17: ../ContentDecoder/ContentDecoder.h: At global scope: ../ContentDecoder/ContentDecoder.h:199:2: error: ‘PixelFormat’ does not name a type PixelFormat m_WantedPixelFormat; ^ ../ContentDecoder/ContentDecoder.h:233:120: error: ‘PixelFormat’ has not been declared der( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat ^ In file included from Player.h:11:0, from Voting.cpp:17: ../ContentDecoder/ContentDecoder.h:233:153: error: ‘PIX_FMT_RGB24’ was not declared in this scope l _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:78:48: error: ‘PixelFormat’ has not been declared CVideoFrame( AVCodecContext _pCodecContext, PixelFormat _format, std::string _filename ) : m_pFrame(NULL) ^ ../ContentDecoder/Frame.h: In constructor ‘ContentDecoder::CVideoFrame::CVideoFrame(AVCodecContext, int, std::cxx11::string)’: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:106:98: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5468:5: note: initializing argument 1 of ‘int avpicture_get_size(AVPixelFormat, int, int)’ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:106:98: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5468:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecCont ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecCont ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:108:128: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] _fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5453:5: note: initializing argument 3 of ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int)’ int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from client.h:10, from main.cpp:16: ../ContentDecoder/Frame.h:108:128: warning: ‘int avpicture_fill(AVPicture, const uint8_t, AVPixelFormat, int, int ’ is deprecated [-Wdeprecated-declarations] _fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from client.h:10, from main.cpp:16: /usr/include/libavcodec/avcodec.h:5453:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from Player.h:11:0, from client.h:10, from main.cpp:16: ../ContentDecoder/ContentDecoder.h: At global scope: ../ContentDecoder/ContentDecoder.h:199:2: error: ‘PixelFormat’ does not name a type PixelFormat m_WantedPixelFormat; ^ ../ContentDecoder/ContentDecoder.h:233:120: error: ‘PixelFormat’ has not been declared der( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat ^ In file included from Player.h:11:0, from client.h:10, from main.cpp:16: ../ContentDecoder/ContentDecoder.h:233:153: error: ‘PIX_FMT_RGB24’ was not declared in this scope l _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB ^ ../DisplayOutput/LoadDDS.cpp: In member function ‘bool DisplayOutput::CImage::LoadDDS(const string&, bool)’: ../DisplayOutput/LoadDDS.cpp:52:48: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( &header, sizeof(header), 1, pFileData ); ^ ../DisplayOutput/LoadDDS.cpp:113:59: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] fread( m_spData->GetBufferPtr(), readSize, 1, pFileData ); ^ In file included from Player.h:14:0, from Player.cpp:37: FrameDisplay.h:32:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 const fp8 TEX_MOVE_SECS = 60.f 30.f; //30 minutes ^ In file included from Player.h:14:0, from Voting.cpp:17: FrameDisplay.h:32:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 const fp8 TEX_MOVE_SECS = 60.f 30.f; //30 minutes ^ Player.cpp: In member function ‘ContentDecoder::CContentDecoder CPlayer::CreateContentDecoder(bool)’: Player.cpp:377:2: error: ‘PixelFormat’ was not declared in this scope PixelFormat pf = PIX_FMT_BGR32; ^ Player.cpp:384:214: error: ‘pf’ was not declared in this scope s.player.CalculateTransitions", true ), (uint32)abs(g_Settings()->Get( "settings.player.BufferLength", 25 )), pf ); ^ In file included from Player.h:14:0, from client.h:10, from main.cpp:16: FrameDisplay.h:32:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 const fp8 TEX_MOVE_SECS = 60.f 30.f; //30 minutes ^ make[1]: [Makefile:634: Player.o] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: [Makefile:634: Voting.o] Error 1 make[1]: [Makefile:634: main.o] Error 1

For what it's worth, I'm doing this on a gentoo system, which has yanked electricsheep from its repository, so your overlay is now the only version that's available.

(fortunately, gentoo also preserves the libraries from ffmpeg that electricsheep needs, so it still runs fine)

stefantalpalaru commented 7 years ago

Fixed by making it depend on the older ffmpeg.