Annotation of /trunk/gpac/patches/gpac-0.4.5-ffmpeg-headers.patch
Parent Directory | Revision Log
Revision 925 -
(hide annotations)
(download)
Wed Nov 4 15:18:09 2009 UTC (14 years, 10 months ago) by niro
File size: 2137 byte(s)
Wed Nov 4 15:18:09 2009 UTC (14 years, 10 months ago) by niro
File size: 2137 byte(s)
-fixes for 0.4.5-r1
1 | niro | 925 | Index: gpac/configure |
2 | =================================================================== | ||
3 | --- gpac.orig/configure | ||
4 | +++ gpac/configure | ||
5 | @@ -112,6 +112,7 @@ OSS_CFLAGS="" | ||
6 | OSS_LDFLAGS="" | ||
7 | INSTFLAGS="" | ||
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 | @@ -578,6 +579,16 @@ if $cc -o $TMPO $TMPC $LINK_SSL 2> /dev/ | ||
14 | has_ssl="yes" | ||
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 JPEG support | ||
29 | cat > $TMPC << EOF | ||
30 | @@ -1573,6 +1584,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 "CONFIG_JACK=$has_jack" >> config.mak | ||
38 | Index: gpac/modules/ffmpeg_in/ffmpeg_in.h | ||
39 | =================================================================== | ||
40 | --- gpac.orig/modules/ffmpeg_in/ffmpeg_in.h | ||
41 | +++ gpac/modules/ffmpeg_in/ffmpeg_in.h | ||
42 | @@ -56,15 +56,23 @@ | ||
43 | |||
44 | |||
45 | /*include FFMPEG APIs*/ | ||
46 | +#if NEW_FFMPEG_LAYOUT | ||
47 | +#include <libavformat/avformat.h> | ||
48 | +#else | ||
49 | #include <ffmpeg/avformat.h> | ||
50 | +#endif | ||
51 | |||
52 | void gf_av_vlog(void* avcl, int level, const char *fmt, va_list vl); | ||
53 | |||
54 | |||
55 | #if LIBAVCODEC_VERSION_INT > ((52<<16)+(0<<8)+0) | ||
56 | #define FFMPEG_SWSCALE | ||
57 | +#if NEW_FFMPEG_LAYOUT | ||
58 | +#include <libswscale/swscale.h> | ||
59 | +#else | ||
60 | #include <ffmpeg/swscale.h> | ||
61 | #endif | ||
62 | +#endif | ||
63 | |||
64 | /*FFMPEG decoder module */ | ||
65 | typedef struct | ||
66 | Index: gpac/modules/ffmpeg_in/Makefile | ||
67 | =================================================================== | ||
68 | --- gpac.orig/modules/ffmpeg_in/Makefile | ||
69 | +++ gpac/modules/ffmpeg_in/Makefile | ||
70 | @@ -2,7 +2,7 @@ include ../../config.mak | ||
71 | |||
72 | vpath %.c $(SRC_PATH)/modules/ffmpeg_in | ||
73 | |||
74 | -CFLAGS= $(OPTFLAGS) -I$(SRC_PATH)/include | ||
75 | +CFLAGS= $(OPTFLAGS) -I$(SRC_PATH)/include $(FFMPEG_CFLAGS) | ||
76 | |||
77 | ifeq ($(DEBUGBUILD), yes) | ||
78 | CFLAGS+=-g |