Annotation of /trunk/gpac/patches/gpac-0.4.4-ffmpeg-headers.patch
Parent Directory | Revision Log
Revision 669 -
(hide annotations)
(download)
Sun Aug 10 16:46:25 2008 UTC (16 years, 1 month ago) by niro
File size: 1961 byte(s)
Sun Aug 10 16:46:25 2008 UTC (16 years, 1 month ago) by niro
File size: 1961 byte(s)
-fix ffmpeg headers with newer snapshots
1 | niro | 669 | Index: gpac-0.4.4/configure |
2 | =================================================================== | ||
3 | --- gpac-0.4.4.orig/configure | ||
4 | +++ gpac-0.4.4/configure | ||
5 | @@ -93,6 +93,7 @@ X11_PATH="/usr/X11R6" | ||
6 | OSS_CFLAGS="" | ||
7 | OSS_LDFLAGS="" | ||
8 | is_64="no" | ||
9 | +FFMPEG_CFLAGS="" | ||
10 | |||
11 | #Configure Usage | ||
12 | if test x"$1" = x"-h" -o x"$1" = x"--help" ; then | ||
13 | @@ -615,6 +616,16 @@ elif $cc -o $TMPO $TMPC -I$local_inc -L$ | ||
14 | has_ffmpeg="local" | ||
15 | fi | ||
16 | |||
17 | +cat > $TMPC << EOF | ||
18 | +#include <stddef.h> | ||
19 | +#include <libavcodec/avcodec.h> | ||
20 | +int main( void ) { return 0; } | ||
21 | +EOF | ||
22 | + | ||
23 | +if $cc -o $TMPO $TMPC -lz -lavcodec -lavformat 2> /dev/null ; then | ||
24 | +FFMPEG_CFLAGS="-DNEW_FFMPEG_LAYOUT=1" | ||
25 | +has_ffmpeg="system" | ||
26 | +fi | ||
27 | |||
28 | #look for vorbis support | ||
29 | cat > $TMPC << EOF | ||
30 | @@ -1276,6 +1287,7 @@ echo "CONFIG_OGG=$has_ogg" >> config.mak | ||
31 | echo "CONFIG_VORBIS=$has_vorbis" >> config.mak | ||
32 | echo "CONFIG_THEORA=$has_theora" >> config.mak | ||
33 | echo "CONFIG_FFMPEG=$has_ffmpeg" >> config.mak | ||
34 | +echo "FFMPEG_CFLAGS=$FFMPEG_CFLAGS" >> config.mak | ||
35 | echo "CONFIG_OSS_AUDIO=$has_oss_audio" >> config.mak | ||
36 | echo "CONFIG_ALSA=$has_alsa" >> config.mak | ||
37 | echo "DISABLE_SVG=$disable_svg" >> config.mak | ||
38 | Index: gpac-0.4.4/modules/ffmpeg_in/Makefile | ||
39 | =================================================================== | ||
40 | --- gpac-0.4.4.orig/modules/ffmpeg_in/Makefile | ||
41 | +++ gpac-0.4.4/modules/ffmpeg_in/Makefile | ||
42 | @@ -2,7 +2,7 @@ include ../../config.mak | ||
43 | |||
44 | vpath %.c $(SRC_PATH)/modules/ffmpeg_in | ||
45 | |||
46 | -CFLAGS= $(OPTFLAGS) -Wall -I$(SRC_PATH)/include | ||
47 | +CFLAGS= $(OPTFLAGS) -Wall -I$(SRC_PATH)/include $(FFMPEG_CFLAGS) | ||
48 | |||
49 | ifeq ($(DEBUGBUILD), yes) | ||
50 | CFLAGS+=-g | ||
51 | Index: gpac-0.4.4/modules/ffmpeg_in/ffmpeg_in.h | ||
52 | =================================================================== | ||
53 | --- gpac-0.4.4.orig/modules/ffmpeg_in/ffmpeg_in.h | ||
54 | +++ gpac-0.4.4/modules/ffmpeg_in/ffmpeg_in.h | ||
55 | @@ -56,7 +56,11 @@ | ||
56 | |||
57 | |||
58 | /*include FFMPEG APIs*/ | ||
59 | +#if NEW_FFMPEG_LAYOUT | ||
60 | +#include <libavformat/avformat.h> | ||
61 | +#else | ||
62 | #include <ffmpeg/avformat.h> | ||
63 | +#endif | ||
64 | |||
65 | /*FFMPEG decoder module */ | ||
66 | typedef struct |