zoneminder icon indicating copy to clipboard operation
zoneminder copied to clipboard

cmake: avcodec should be mandatory

Open epruesse opened this issue 9 years ago • 3 comments

AVFormat, AVCodec and AVUtil are mandatory for compile. Missing them, the macro getting the version doesn't expand correctly (plus other errors):

.../ZoneMinder/src/zm_ffmpeg.h:327:29: error: missing binary operator before token "("
 #if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)

EDIT: AVDevice as well. Error without:

 CXX object src/CMakeFiles/zm.dir/zm_ffmpeg_camera.cpp.o
.../ZoneMinder/src/zm_ffmpeg_camera.cpp: In member function ‘virtual int FfmpegCamera::CaptureAndRecord(Image&, timeval, char*)’:
.../ZoneMinder/src/zm_ffmpeg_camera.cpp:805:23: error: ‘mConvertContext’ was not declared in this scope
         if (sws_scale(mConvertContext, mRawFrame->data, mRawFrame->linesize,
                       ^
.../ZoneMinder/src/zm_ffmpeg_camera.cpp:806:84: error: ‘sws_scale’ was not declared in this scope
                       0, mVideoCodecContext->height, mFrame->data, mFrame->linesize) < 0) {

epruesse avatar Jul 25 '17 03:07 epruesse

Thanks for this. building zoneminder from scratch for the first time and would never have found those libraries without this post.

calguy1000 avatar Oct 22 '17 20:10 calguy1000

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 15 '18 20:06 stale[bot]

Please don't close this post - it's the only one that solves this issue.

pmoerschell avatar Feb 26 '20 00:02 pmoerschell