Page 1 of 1

AVCodecContext problem wehn make install

Posted: Tue Nov 21, 2006 10:27 am
by Manwe
I have a problem compiling the latest version of ZM,
configure runs ok
make runs ok
make install gives me the following error:

if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include -g -O2 -MT zm_mpeg.o -MD -MP -MF ".deps/zm_mpeg.Tpo" -c -o zm_mpeg.o zm_mpeg.cpp; \
then mv -f ".deps/zm_mpeg.Tpo" ".deps/zm_mpeg.Po"; else rm -f ".deps/zm_mpeg.Tpo"; exit 1; fi
zm_mpeg.cpp: In member function ‘void VideoStream::SetupCodec(int, int, int, int, int)’:
zm_mpeg.cpp:88: error: cannot convert ‘AVCodecContext**’ to ‘AVCodecContext*’ in initialization
zm_mpeg.cpp:109: error: ‘struct AVCodecContext’ has no member named ‘frame_rate’
zm_mpeg.cpp:110: error: ‘struct AVCodecContext’ has no member named ‘frame_rate_base’
zm_mpeg.cpp: In member function ‘void VideoStream::OpenStream()’:
zm_mpeg.cpp:161: error: cannot convert ‘AVCodecContext**’ to ‘AVCodecContext*’ in initialization
zm_mpeg.cpp: In destructor ‘VideoStream::~VideoStream()’:
zm_mpeg.cpp:256: error: cannot convert ‘AVCodecContext**’ to ‘AVCodecContext*’ for argument ‘1’ to ‘int avcodec_close(AVCodecContext*)’
zm_mpeg.cpp: In member function ‘double VideoStream::EncodeFrame(uint8_t*, int, bool, unsigned int)’:
zm_mpeg.cpp:303: error: cannot convert ‘AVCodecContext**’ to ‘AVCodecContext*’ in initialization
make[1]: *** [zm_mpeg.o] Error 1

I haven't touched the source code at all, does anybody know that problem?

Thanks in advance

Posted: Tue Nov 21, 2006 10:56 am
by cordel
Assuming that you installed a version of ffmpeg from cvs in the last 7 months or so... See the ffmpeg patch in the wiki.
Regards,
Corey

Posted: Tue Nov 21, 2006 11:47 am
by Manwe
The patch worked for that problem but another one comes after a while with the file:

if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include -g -O2 -MT zm_buffer.o -MD -MP -MF ".deps/zm_buffer.Tpo" -c -o zm_buffer.o zm_buffer.cpp; \
then mv -f ".deps/zm_buffer.Tpo" ".deps/zm_buffer.Po"; else rm -f ".deps/zm_buffer.Tpo"; exit 1; fi
g++ -g -O2 -L/usr/lib -L/usr/lib/mysql -o zmc zmc.o zm.o zm_db.o zm_config.o zm_coord.o zm_box.o zm_poly.o zm_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_file_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_signal.o zm_buffer.o zm_debug.o -lavcodec -lavutil -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
zm_mpeg.o: In function `~VideoStream':
/root/Desktop/Zone.Minder/ZoneMinder-1.22.2/src/zm_mpeg.cpp:269: referencia a `av_write_trailer' sin definir

any idea?

Thanks

Posted: Thu Nov 23, 2006 10:58 am
by zoneminder
I have not seen this. What version of ffmpeg do you have?