zm_mpeg compile error: 'struct AVCodecContext**"
zm_mpeg compile error: 'struct AVCodecContext**"
This issue has previously cropped up here but as the last post in the thread was in april with a complaint of the issue resurfacing I am starting a new thread:
http://www.zoneminder.com/forums/viewto ... deccontext
I am using ZoneMinder-1.22.2, and ffmpeg from SVN (centos 4.3 on a P3) checked out this morning. The compile is dieing as follows:
then mv -f ".deps/zm_user.Tpo" ".deps/zm_user.Po"; else rm -f ".deps/zm_user.Tpo"; exit 1; fi
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[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.22.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.22.2'
http://www.zoneminder.com/forums/viewto ... deccontext
I am using ZoneMinder-1.22.2, and ffmpeg from SVN (centos 4.3 on a P3) checked out this morning. The compile is dieing as follows:
then mv -f ".deps/zm_user.Tpo" ".deps/zm_user.Po"; else rm -f ".deps/zm_user.Tpo"; exit 1; fi
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[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.22.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.22.2'
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 27
- Joined: Fri Sep 08, 2006 7:15 pm
zm_mpeg.h
Well here is the garbage that spewed forth AFTER I applied the patch with no reported error. This has turned into a real science project.
m_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[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/usr/local/ZoneMinder-1.22.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/ZoneMinder-1.22.2'
make: *** [all] Error 2
DidI apply the patch wrong? WTF?
Anyway, HELP!
m_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[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/usr/local/ZoneMinder-1.22.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/ZoneMinder-1.22.2'
make: *** [all] Error 2
DidI apply the patch wrong? WTF?
Anyway, HELP!
-
- Posts: 27
- Joined: Fri Sep 08, 2006 7:15 pm
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
how did you fix it?
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 27
- Joined: Fri Sep 08, 2006 7:15 pm
re patch
Applied the patch, re-configured, re-made, re-installed. It works fine but only grayscale works. Funny the color works when running xawtv. Source goes red on the console and video stops when trying rgb24. Probably some tweak I haven't found yet.
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
are your running at a res higher than 320x240?
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 27
- Joined: Fri Sep 08, 2006 7:15 pm
color
Running 320X240 on all 6 CCD cameras. Same res displays color on all cams when looking through the BTTV card with xawtv. I have 3 BTTV cards in this PC, all clones bought on E-Bay. I'm probably missing a tewak somewhere, and theres planty of them in this package. Took me about a week of playing to get it running as it is. Grayscale pix looks good.
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
and you have set all the paleets to 24 bit? That is wierd
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 27
- Joined: Fri Sep 08, 2006 7:15 pm
fixed
Well I found the trick. I set all sources to RGB24 and restarted ZM. Now I have color on all cam feeds. I'm gonna screw with motion detection, recording, and web access later. Basking in this small victory for now.