scottdraves / electricsheep

infinite evolving crowdsourced artwork
http://electricsheep.org
561 stars 70 forks source link

Compile errors on debian sid #38

Closed vayulove closed 7 years ago

vayulove commented 7 years ago

Can someone please help me? I've used electric sheep for years and now it's not in the repositories and I'm not great at figuring out compile problems. I installed the dependencies to get through .configure but I get make errors. I believe they're the ffmpeg ones but I don't know how to fix them.

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/x86_64-linux-gnu/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] 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/x86_64-linux-gnu/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] 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/x86_64-linux-gnu/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, _pCodecContext->height ); ^~~~~~~~~~~~~~ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/include/x86_64-linux-gnu/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] er->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/x86_64-linux-gnu/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] er->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/x86_64-linux-gnu/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 tartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB24 ); ^~~~~~~~~~~ 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 ions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB24 ); ^~~~~~~~~~~~~ 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 , (uint32)abs(g_Settings()->Get( "settings.player.BufferLength", 25 )), pf ); ^~ Makefile:629: recipe for target 'Player.o' failed make[1]: *** [Player.o] Error 1 make[1]: Leaving directory '/mnt/local/satyam/satyam/apps/electricsheep/client_generic/Client' Makefile:510: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

dasvo commented 7 years ago

Looks like that we were using deprecated PixelFormat type. Thanks for the report. I've fixed the code to use the proper AVPixelFormat instead.

vayulove commented 7 years ago

Fixed for me, thanks.