|
From: Max A. <arg...@gm...> - 2010-12-04 03:49:09
|
Hello,
There is some difference between the OpenRAVE and the
OpenRAVE_Modified package that causes it to fail when trying to
compile qtcoinrave. The problem seems to lie in a reference to a
ffmpeg library. I upgraded from ffmpeg 0.6 to ffmpeg 0.6_p25767 and I
got the same error:
>In file included from /usr/include/libavutil/avutil.h:96,
> from /usr/include/libavcodec/avcodec.h:31,
> from /usr/include/libavformat/avformat.h:106,
> from /home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp:427:
>/usr/include/libavutil/common.h: In function 'int32_t av_clipl_int32_c(int64_t)':
>/usr/include/libavutil/common.h:168: error: 'UINT64_C' was not declared in this scope
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp: In function 'std::list<std::pair<int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, >std::allocator<std::pair<int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > GET_CODECS()':
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp:474: warning: 'first_oformat' is deprecated (declared at /usr/include/libavformat/avformat.h:908)
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp: In function 'bool START_AVI(const char*, double, int, int, int, int)':
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp:498: warning: 'first_oformat' is deprecated (declared at /usr/include/libavformat/avformat.h:908)
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp: In function 'bool ADD_FRAME_FROM_DIB_TO_AVI(void*)':
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp:606: warning: 'SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, const double*)' is deprecated (declared at /usr/include/libswscale/swscale.h:191)
>/home/hasimir/lang/phys/opengrasp/trunk/OpenRAVE_Modified/plugins/qtcoinrave/aviUtil.cpp:613: warning: 'SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, const double*)' is deprecated (declared at /usr/include/libswscale/swscale.h:191)
>make[2]: *** [plugins/qtcoinrave/CMakeFiles/qtcoinrave.dir/aviUtil.o] Error 1
>make[1]: *** [plugins/qtcoinrave/CMakeFiles/qtcoinrave.dir/all] Error 2
>make: *** [all] Error 2
I had a brief look at the difference between the aviUtil.cpp files in
OpenRAVE and OpenGrasp and I am guessing the problem lies in the
OpenGrasp aviUtil.cpp file not defining "__STDC_CONSTANT_MACROS"
which prevents the ffmpeg library from crashing. That said I don't
really understand either pieces of software. If this is the case could
the OpenGrasp copy of aviUtil.cpp simply be updated or are there any
dependencies that I am not aware of?
Here is a diff between the two files.
15a16,36
> #define __STDC_CONSTANT_MACROS
> #ifndef ENABLE_VIDEORECORDING
>
> #include "qtcoin.h"
> #include <list>
>
> // no recording
> bool STOP_AVI() { return false; }
> std::list<std::pair<int,string> > GET_CODECS() { return std::list<std::pair<int,string> >(); }
> bool START_AVI(const char* filename, double _frameRate, int width, int height, int bits,int)
> {
> RAVELOG_WARNA("avi recording to file %s not enabled\n", filename);
> return false;
> }
> bool ADD_FRAME_FROM_DIB_TO_AVI(void* pdata)
> {
> return false;
> }
>
> #else // ENABLE_VIDEORECORDING
>
665a687,688
>
> #endif // ENABLE_VIDEORECORDING
BR, Max
|