MantisBT - VCMI
View Issue Details
0000763VCMIOtherpublic2011-07-03 09:152011-07-21 20:49
andreas 
Ivan 
normalblockalways
closedfixed 
LinuxUbuntu 64 bits10.04
0.85 
0.86 
0000763: Compilation of vcmiclient-CVideoHandler.o fails
After getting the sources from the SVN and launching the configure script, the compilation fails with the following message:

CVideoHandler.cpp: In constructor ‘CVideoPlayer::CVideoPlayer()’:
CVideoHandler.cpp:660: error: ‘av_register_protocol’ was not declared in this scope
CVideoHandler.cpp: In member function ‘bool CVideoPlayer::open(std::string, bool, bool)’:
CVideoHandler.cpp:689: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:689: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:694: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:694: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:707: error: ‘CODEC_TYPE_VIDEO’ was not declared in this scope
make[1]: *** [vcmiclient-CVideoHandler.o] Error 1
Follow the steps described here: https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk/README.linux [^]

Specifically:

svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk [^] vcmi
./configure --datadir=/YOUR_INSTALL_PATH/ --bindir=/YOUR_INSTALL_PATH/vcmi --libdir=/YOUR_INSTALL_PATH/
make
VCMI version: SVN revision 2228
libavformat-dev: 4:0.7-1u1
gcc: 4.4.3
No tags attached.
Issue History
2011-07-03 09:15andreasNew Issue
2011-07-03 10:05IvanStatusnew => assigned
2011-07-03 10:05IvanAssigned To => Ivan
2011-07-03 10:07IvanNote Added: 0001834
2011-07-03 10:21andreasNote Added: 0001836
2011-07-03 15:28IvanNote Added: 0001837
2011-07-04 00:06andreasNote Added: 0001838
2011-07-04 09:28IvanNote Added: 0001839
2011-07-04 09:28IvanStatusassigned => resolved
2011-07-04 09:28IvanFixed in Version => 0.89
2011-07-04 09:28IvanResolutionopen => fixed
2011-07-21 20:49IvanStatusresolved => closed

Notes
(0001834)
Ivan   
2011-07-03 10:07   
Should be fixed now. Check revision 2229.
(0001836)
andreas   
2011-07-03 10:21   
Hi Ivan, thanks for your quick fix.

Unfortunately, there is another error now, with the function 'avcodec_decode_video'. There were many warnings before, I pasted them in case they are useful.

CVideoHandler.cpp: In constructor ‘CVideoPlayer::CVideoPlayer()’:
CVideoHandler.cpp:661: warning: ‘int av_register_protocol2(URLProtocol*, int)’ is deprecated (declared at /usr/include/libavformat/avio.h:211)
CVideoHandler.cpp:661: warning: ‘int av_register_protocol2(URLProtocol*, int)’ is deprecated (declared at /usr/include/libavformat/avio.h:211)
CVideoHandler.cpp: In member function ‘bool CVideoPlayer::open(std::string, bool, bool)’:
CVideoHandler.cpp:693: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:693: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:698: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp:698: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043)
CVideoHandler.cpp: In member function ‘bool CVideoPlayer::nextFrame()’:
CVideoHandler.cpp:817: error: ‘avcodec_decode_video’ was not declared in this scope
make[1]: *** [vcmiclient-CVideoHandler.o] Error 1
(0001837)
Ivan   
2011-07-03 15:28   
Found it. Check revision 2230 - it should remove that error.
Ignore the warnings - fixing them may create more troubles with other versions of libavformat
(0001838)
andreas   
2011-07-04 00:06   
Problem solved :)
(0001839)
Ivan   
2011-07-04 09:28   
Ok. To resolved then.