BUG: Cannot compile with latest ffmpeg cvs again
So the ffmpeg guys have AGAIN change the API
email from ML
When I try and compile Motion I get the following errors:-
ffmpeg.c:315: error: request for member `codec_id' in something not a structure
or union
ffmpeg.c:325: error: request for member `pix_fmt' in something not a structure
or union
ffmpeg.c:538: error: request for member `coded_frame' in something not a
structure or union
ffmpeg.c:539: error: request for member `coded_frame' in something not a
structure or union
I am using FC3. Before compiling Motion, I compiled the latest CVS build
of ffmpeg. I am trying to compile version
3.2.2 snapshot 7 of motion.
If it helps, I have also included the full screen output.
Cam some please put me out of my misery and let me know what I am doing wrong..............
Thanks
Simon
****************************************************************************************************************************************
[root@unknown00b0d08cf629 motion]# ./configure --with-ffmpeg=/usr/local ;
make ; make install
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for pthread_create in -lpthread... yes
checking for libjpeg-mmx autodetecting... not found
checking for jpeg_set_defaults in -ljpeg... yes
checking for ffmpeg in -> /usr/local <-... found
checking for MySQL... yes
checking for PostgreSQL... Cannot find libpq-fe.h. Please specify the installation
path of PostgreSQL
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking linux/videodev.h usability... yes
checking linux/videodev.h presence... yes
checking for linux/videodev.h... yes
checking for short int... yes
checking size of short int... 2
checking for int... yes
checking size of int... 4
checking for an ANSI C-conforming const... yes
Detected CPU: Pentium III (Coppermine)
CPU optimization: -march=pentium3 -mfpmath=sse -msse -mmmx
checking for bswap instruction... yes
configure: creating ./config.status
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.init-RH
config.status: creating motion.spec
config.status: creating Makefile
************************
* Configure status *
************************
pthread Support: Yes
jpeg Support: Yes
V4L included: Yes
FFmpeg Support: Yes
MYSQL Support: Yes
PostgreSQL Support: No
CFLAGS: -I/usr/local/include/ffmpeg -g -O2 -DHAVE_FFMPEG -DHAVE_MYSQL -I
/usr/include/mysql -DTYPE_32BIT="int" -DHAVE_BSWAP -march=pentium3 -mfpmath=sse
-msse -mmmx
LIBS: -lm -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz
-L/usr/lib/mysql -lmysqlclient -lz
LDFLAGS: -L/usr/local/lib
Install prefix: /usr/local
Welcome to the setup procedure for Motion, the motion detection daemon! If
you get
error messages during this procedure, please report them to the mailing list.
The
Motion Guide contains all information you should need to get Motion up and
running.
Run "make updateguide" to download the latest version of the Motion Guide.
Version: 3.2.2
Platform: Linux (if this is incorrect, please read README.FreeBSD)
Compiling Motion object files...
--------------------------------------------------------------------------------gcc
-I/usr/local/include/ffmpeg -g -O2 -DHAVE_FFMPEG -DHAVE_MYSQL -I /usr/include/mysql
-DTYPE_32BIT="int" -DHAVE_BSWAP -march=pentium3 -mfpmath=sse -msse -mmmx
-Wall -DVERSION=\"3.2.2\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"
-c -o ffmpeg.o ffmpeg.c
ffmpeg.c:27:3: warning: #warning **************************************************
ffmpeg.c:28:3: warning: #warning Your version of FFmpeg is newer than version
0.4.8
ffmpeg.c:29:9: warning: #warning Newer versions of ffmpeg do not support
MPEG1 with
ffmpeg.c:30:3: warning: #warning non-standard framerate. MPEG1 will be disabled
for
ffmpeg.c:31:3: warning: #warning normal video output. You can still use mpeg4
and
ffmpeg.c:32:9: warning: #warning and mpeg4ms which are both better in terms
of size
ffmpeg.c:33:9: warning: #warning and quality. MPEG1 is always used for timelapse.
ffmpeg.c:34:9: warning: #warning Please read the Motion Guide for more information.
ffmpeg.c:35:9: warning: #warning Note that this is not an error message!
ffmpeg.c:36:3: warning: #warning **************************************************
ffmpeg.c: In function `ffmpeg_open':
ffmpeg.c:263: warning: assignment from incompatible pointer type
ffmpeg.c:315: error: request for member `codec_id' in something not a structure
or union
ffmpeg.c:325: error: request for member `pix_fmt' in something not a structure
or union
ffmpeg.c:328: warning: passing arg 1 of `avcodec_open' from incompatible
pointer type
ffmpeg.c: In function `ffmpeg_cleanups':
ffmpeg.c:432: warning: passing arg 1 of `avcodec_close' from incompatible
pointer type
ffmpeg.c: In function `ffmpeg_close':
ffmpeg.c:460: warning: passing arg 1 of `avcodec_close' from incompatible
pointer type
ffmpeg.c: In function `ffmpeg_put_frame':
ffmpeg.c:531: warning: passing arg 1 of `avcodec_encode_video' from incompatible
pointer type
ffmpeg.c:538: error: request for member `coded_frame' in something not a
structure or union
ffmpeg.c:539: error: request for member `coded_frame' in something not a
structure or union
make: *** [ffmpeg.o] Error 1
Installing files...
--------------------------------------------------------------------------------mkdir
-p /usr/local/bin
mkdir -p /usr/local/man/man1
mkdir -p /usr/local/etc
mkdir -p /usr/local/share/doc/motion-3.2.2
mkdir -p /usr/local/share/doc/motion-3.2.2/examples
install motion.1 /usr/local/man/man1
install CHANGELOG COPYING CREDITS INSTALL README motion_guide.html /usr/local/share/doc/motion-3.2.2
install *.conf motion.init-Debian motion.init-RH motion.init-FreeBSD.sh /usr/local/share/doc/motion-3.2.2/examples
install motion-dist.conf /usr/local/etc
for prog in motion; \
do \
(install $prog /usr/local/bin ); \
done
install: cannot stat `motion': No such file or directory
make: *** [install] Error 1
****************************************************************************************************************************************
Test case
Environment
Motion version: |
3.2.2_snap10 |
ffmpeg version: |
latest CVS |
Shared libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
FC3 |
--
KennethLavrsen - 05 Aug 2005
Follow up
Fix record
I just created a patch for this problem:
FfmpegCodecPatch. Please try it out!
--
PerJonsson - 06 Aug 2005