Code: Select all
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin ZM_DB_HOST=localhost ZM_DB_NAME=*** ZM_DB_USER=*** ZM_DB_PASS=*** --enable-debug=no --with-webgroup=apache --with-webuser=apache --enable-mmap CPPFLAGS="-D__STDC_CONSTANT_MACROS ${CPPFLAGS}"
When I try to compile:
Code: Select all
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -finline-functions -I/usr/include -D__STDC_CONSTANT_MACROS -g -O2 -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.cpp:122:44: error: missing binary operator before token "("
zm_mem_utils.h: In function 'void* zm_mallocaligned(unsigned int, size_t)':
zm_mem_utils.h:29: warning: dereferencing type-punned pointer will break strict-aliasing rules
zm_ffmpeg_camera.h: At global scope:
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of 'AVFormatContext' with no type
zm_ffmpeg_camera.h:41: error: expected ';' before '*' token
zm_ffmpeg_camera.h:43: error: ISO C++ forbids declaration of 'AVCodecContext' with no type
zm_ffmpeg_camera.h:43: error: expected ';' before '*' token
zm_ffmpeg_camera.h:44: error: ISO C++ forbids declaration of 'AVCodec' with no type
zm_ffmpeg_camera.h:44: error: expected ';' before '*' token
zm_ffmpeg_camera.h:45: error: ISO C++ forbids declaration of 'AVFrame' with no type
zm_ffmpeg_camera.h:45: error: expected ';' before '*' token
zm_ffmpeg_camera.h:46: error: ISO C++ forbids declaration of 'AVFrame' with no type
zm_ffmpeg_camera.h:46: error: expected ';' before '*' token
zm_ffmpeg_camera.h:47: error: 'PixelFormat' does not name a type
zm_ffmpeg_camera.cpp: In constructor 'FfmpegCamera::FfmpegCamera(int, const std::string&, int, int, int, int, int, int, int, bool)':
zm_ffmpeg_camera.cpp:35: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:37: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:38: error: 'mCodec' was not declared in this scope
zm_ffmpeg_camera.cpp:39: error: 'mRawFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:40: error: 'mFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:49: error: 'imagePixFormat' was not declared in this scope
zm_ffmpeg_camera.cpp:49: error: 'PIX_FMT_RGBA' was not declared in this scope
zm_ffmpeg_camera.cpp:52: error: 'imagePixFormat' was not declared in this scope
zm_ffmpeg_camera.cpp:52: error: 'PIX_FMT_RGB24' was not declared in this scope
zm_ffmpeg_camera.cpp:55: error: 'imagePixFormat' was not declared in this scope
zm_ffmpeg_camera.cpp:55: error: 'PIX_FMT_GRAY8' was not declared in this scope
zm_ffmpeg_camera.cpp: In destructor 'virtual FfmpegCamera::~FfmpegCamera()':
zm_ffmpeg_camera.cpp:64: error: 'mFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:64: error: 'av_freep' was not declared in this scope
zm_ffmpeg_camera.cpp:65: error: 'mRawFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:70: error: 'sws_freeContext' was not declared in this scope
zm_ffmpeg_camera.cpp:75: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:77: error: 'avcodec_close' was not declared in this scope
zm_ffmpeg_camera.cpp:80: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:82: error: 'av_close_input_file' was not declared in this scope
zm_ffmpeg_camera.cpp: In member function 'void FfmpegCamera::Initialise()':
zm_ffmpeg_camera.cpp:95: error: 'AV_LOG_DEBUG' was not declared in this scope
zm_ffmpeg_camera.cpp:95: error: 'av_log_set_level' was not declared in this scope
zm_ffmpeg_camera.cpp:97: error: 'AV_LOG_QUIET' was not declared in this scope
zm_ffmpeg_camera.cpp:97: error: 'av_log_set_level' was not declared in this scope
zm_ffmpeg_camera.cpp:99: error: 'av_register_all' was not declared in this scope
zm_ffmpeg_camera.cpp: In member function 'virtual int FfmpegCamera::PrimeCapture()':
zm_ffmpeg_camera.cpp:111: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:111: error: 'av_open_input_file' was not declared in this scope
zm_ffmpeg_camera.cpp:115: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:115: error: 'av_find_stream_info' was not declared in this scope
zm_ffmpeg_camera.cpp:120: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:125: error: 'CODEC_TYPE_VIDEO' was not declared in this scope
zm_ffmpeg_camera.cpp:135: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:135: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:138: error: 'mCodec' was not declared in this scope
zm_ffmpeg_camera.cpp:138: error: 'avcodec_find_decoder' was not declared in this scope
zm_ffmpeg_camera.cpp:142: error: 'mCodec' was not declared in this scope
zm_ffmpeg_camera.cpp:142: error: 'avcodec_open' was not declared in this scope
zm_ffmpeg_camera.cpp:146: error: 'mRawFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:146: error: 'avcodec_alloc_frame' was not declared in this scope
zm_ffmpeg_camera.cpp:149: error: 'mFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:154: error: 'imagePixFormat' was not declared in this scope
zm_ffmpeg_camera.cpp:154: error: 'avpicture_get_size' was not declared in this scope
zm_ffmpeg_camera.cpp:160: error: 'sws_isSupportedInput' was not declared in this scope
zm_ffmpeg_camera.cpp:164: error: 'sws_isSupportedOutput' was not declared in this scope
zm_ffmpeg_camera.cpp: In member function 'virtual int FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:183: error: 'AVPacket' was not declared in this scope
zm_ffmpeg_camera.cpp:183: error: expected `;' before 'packet'
zm_ffmpeg_camera.cpp:196: error: 'mFormatContext' was not declared in this scope
zm_ffmpeg_camera.cpp:196: error: 'packet' was not declared in this scope
zm_ffmpeg_camera.cpp:196: error: 'av_read_frame' was not declared in this scope
zm_ffmpeg_camera.cpp:205: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:205: error: 'mRawFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:205: error: 'avcodec_decode_video2' was not declared in this scope
zm_ffmpeg_camera.cpp:214: error: 'AVPicture' was not declared in this scope
zm_ffmpeg_camera.cpp:214: error: expected primary-expression before ')' token
zm_ffmpeg_camera.cpp:214: error: 'imagePixFormat' was not declared in this scope
zm_ffmpeg_camera.cpp:214: error: 'avpicture_fill' was not declared in this scope
zm_ffmpeg_camera.cpp:219: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:219: error: 'SWS_BICUBIC' was not declared in this scope
zm_ffmpeg_camera.cpp:219: error: 'SWS_CPU_CAPS_SSE2' was not declared in this scope
zm_ffmpeg_camera.cpp:219: error: 'sws_getContext' was not declared in this scope
zm_ffmpeg_camera.cpp:221: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:221: error: 'SWS_BICUBIC' was not declared in this scope
zm_ffmpeg_camera.cpp:221: error: 'sws_getContext' was not declared in this scope
zm_ffmpeg_camera.cpp:227: error: 'mRawFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:227: error: 'mCodecContext' was not declared in this scope
zm_ffmpeg_camera.cpp:227: error: 'mFrame' was not declared in this scope
zm_ffmpeg_camera.cpp:227: error: 'sws_scale' was not declared in this scope
zm_ffmpeg_camera.cpp:236: error: 'av_free_packet' was not declared in this scope
Any idea?
Thanks in advance.