upgraded libs broke code again..

Support and queries relating to all previous versions of ZoneMinder
reza
Posts: 21
Joined: Sat Jan 15, 2005 7:58 pm

upgraded libs broke code again..

Post by reza » Tue May 24, 2005 9:03 am

Seems like the latest version of ffmpeg (ffmpeg-devel-0.4.9-9_cvs20050517.rhfc3.at) breaks the code.

The struct AVCodecContext changed. The entries frame_rate and frame_rate_base are no longer there, but replaced with something called pts which really isn't defined. Here's the line from /usr/include/ffmpeg/avcodec.h

Code: Select all

    /**\
     * presentation timestamp in time_base units (time when frame should be shown to user)\
     * if AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed\
     * - encoding: MUST be set by user\
     * - decoding: set by lavc\
     */\
    int64_t pts;\

I commented out

Code: Select all

                //c->frame_rate = frame_rate;
                //c->frame_rate_base = 1;
from zm_mpeg.cpp to get zm to recompile. Any thoughts?

Reza

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Tue May 24, 2005 11:05 am

Thanks for highlighting this. I'll take a look.

Phil

zengelan
Posts: 1
Joined: Fri Jul 22, 2005 3:27 pm

Post by zengelan » Fri Jul 22, 2005 3:31 pm

Hi,

i just commented out the two line mentioned above.
But now i get another error:

Code: Select all

make  all-recursive
make[1]: Entering directory `/root/software/zm-1.21.3'
Making all in src
make[2]: Entering directory `/root/software/zm-1.21.3/src'
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:78: error: cannot convert `AVCodecContext**' to `AVCodecContext*'
   in initialization
zm_mpeg.cpp: In member function `void VideoStream::OpenStream()':
zm_mpeg.cpp:120: error: cannot convert `AVCodecContext**' to `AVCodecContext*'
   in initialization
zm_mpeg.cpp: In destructor `VideoStream::~VideoStream()':
zm_mpeg.cpp:220: 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:263: error: cannot convert `AVCodecContext**' to `AVCodecContext*'
   in initialization
make[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/root/software/zm-1.21.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/software/zm-1.21.3'
make: *** [all] Error 2

Any Ideas?

br andy[quote][/quote]

reza
Posts: 21
Joined: Sat Jan 15, 2005 7:58 pm

dunno

Post by reza » Fri Jul 22, 2005 5:57 pm

Looks liek the AVCodecContext might have been misdefined somplace. I stopped upgrading ZM as it seems to break every time I do.

Reza

rjohanne
Posts: 2
Joined: Tue Oct 11, 2005 10:35 pm
Location: midwest

Did you ever figure this problem out?

Post by rjohanne » Tue Oct 11, 2005 11:13 pm

Hi Zoneminder,
Did you ever figure this compile problem out? I get the same exact errors on FC4, trying to compile zm 1.21.3 with ffmpeg from cvs as of last Sunday.

How do I get around the problem?

thanks
rj

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Thu Oct 13, 2005 8:32 pm

The ffmpeg interface changed a while back. I have a version of ZM that works now with the cvs version of ffmpeg. It's not released yet but will be very shortly.

Phil

jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK
Contact:

Post by jameswilson » Thu Oct 13, 2005 8:33 pm

goody goody

James
(Silly smilly face lol)

daveparker01
Posts: 2
Joined: Thu Dec 15, 2005 4:35 am

zm-1.21.4 won't compile with ffmpeg-devel-0.4.9-10_cvs200506

Post by daveparker01 » Thu Dec 15, 2005 4:42 am

Am I right in assuming that building is broken again? zm 1.21.4's release notes suggest that this problem has been fixed, but I'm still seeing

zm_mpeg.cpp:102: error: 'struct AVCodecContext' has no member named 'frame_rate'
zm_mpeg.cpp:103: error: 'struct AVCodecContext' has no member named 'frame_rate_base'

Is there a fix for this (quick or otherwise)? I was going to browse through CVS but I've had no luck finding the repository for zoneminder.

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Thu Dec 15, 2005 9:44 am

1.21.4 seems to be broken with respect to ffmpeg 0.4.9-pre1. However 0.4.8 and the cvs release (of ffmpeg) are fine. I would recommend the latter.

1.22.0 works with all (so far) ffmpeg versions.

Phil

reza
Posts: 21
Joined: Sat Jan 15, 2005 7:58 pm

hmm

Post by reza » Thu Dec 15, 2005 9:49 am

I might try upgrading. if things break, i'll be unhappy and sad.

reza

jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK
Contact:

Post by jameswilson » Thu Dec 15, 2005 10:14 am

quick homer simpson imprssion

mmmmmmmmmm, 1.22.0..

woohoo!!!

James
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

daveparker01
Posts: 2
Joined: Thu Dec 15, 2005 4:35 am

Is 1.22.0 available somewhere?

Post by daveparker01 » Thu Dec 15, 2005 6:19 pm

I'd like very much to try this 1.22.0 - I've hit the wall on my FC4 box trying to get an ffmpeg to build that's ostensibly compatible with zoneminder.

The problem is that, given the gcc version I have, ffmpeg 4.8 simply will not compile. And none of the repositories I've got in apt have anything older than 4.9. It's really a nightmare - I've spent many hours just trying to get ffmpeg 4.8 to build. From what I've been able to gather, it's b/c of some known issue with gcc4.

I'd be very overjoyed to have the opportunity to try zm 1.22.0

I'm hoping that zm will support my v4l2 device (which motion pretty much does not afaict).

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Sat Dec 17, 2005 10:59 am

Are you saying that the ffmpeg cvs version doesn't compile either, or that it won't link with ZM or neither?

If all you want to do is see if your card works then you can install ZM without ffmpeg as it's not critical for the basic functions.

Phil

SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity » Sun Dec 18, 2005 3:04 pm

Hi.

Have you tried to check-out the latest CVS version of FFMPEG, and compile it? It should be compiled fine on GCC 3 and 4.

kbuytaert
Posts: 1
Joined: Sun Apr 02, 2006 1:05 pm
Location: Belgium
Contact:

Same issu on FC4

Post by kbuytaert » Sun Apr 02, 2006 1:06 pm

I have the same issue on Fedora Core 4.

I can't find any prebuild rpm's either ..
Anyone ?

greetings

Kris

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests