5
5
VERSION_ffmpeg2=${VERSION_ffmpeg2:- 2.7.1}
6
6
URL_ffmpeg2=http://ffmpeg.org/releases/ffmpeg-$VERSION_ffmpeg2 .tar.bz2
7
7
DEPS_ffmpeg2=(sdl)
8
+ DEPS_OPTIONAL_ffmpeg2=(openssl)
8
9
MD5_ffmpeg2=
9
10
BUILD_ffmpeg2=$BUILD_PATH /ffmpeg2/$( get_directory $URL_ffmpeg2 )
10
11
RECIPE_ffmpeg2=$RECIPES_PATH /ffmpeg2
@@ -30,20 +31,35 @@ function build_ffmpeg2() {
30
31
# configure
31
32
DEST=build/ffmpeg
32
33
34
+ # openssl activated ?
35
+ SSL_CFLAGS=" "
36
+ SSL_LDFLAGS=" "
37
+ if [ " X$BUILD_openssl " != " X" ]; then
38
+ debug " Activate flags for openssl / ffmpeg2"
39
+ SSL_CFLAGS=" -I$BUILD_openssl /include/"
40
+ SSL_LDFLAGS=" -L$BUILD_openssl /"
41
+ fi
42
+
33
43
for version in $ARCH_ffmpeg2 ; do
34
44
35
45
FLAGS=" --disable-everything"
36
46
FLAGS=" $FLAGS --enable-parser=h264,aac"
37
47
FLAGS=" $FLAGS --enable-decoder=h263,h264,aac"
38
48
FLAGS=" $FLAGS --enable-filter=aresample,resample,crop"
39
- FLAGS=" $FLAGS --enable-protocol=file,http"
49
+ FLAGS=" $FLAGS --enable-protocol=file,http,https,tls_openssl "
40
50
FLAGS=" $FLAGS --enable-demuxer=sdp --enable-pic"
41
51
FLAGS=" $FLAGS --enable-small"
42
52
FLAGS=" $FLAGS --enable-hwaccels"
43
53
FLAGS=" $FLAGS --disable-static --enable-shared"
44
54
# libpostproc is GPL: https://ffmpeg.org/pipermail/ffmpeg-user/2012-February/005162.html
45
55
FLAGS=" $FLAGS --enable-gpl"
46
56
57
+ # enable openssl if needed
58
+ if [ " X$BUILD_openssl " != " X" ]; then
59
+ FLAGS=" $FLAGS --enable-openssl --enable-nonfree"
60
+ FLAGS=" $FLAGS --enable-protocol=https,tls_openssl"
61
+ fi
62
+
47
63
# needed to prevent _ffmpeg.so: version node not found for symbol av_init_packet@LIBAVFORMAT_52
48
64
# /usr/bin/ld: failed to set dynamic section sizes: Bad value
49
65
FLAGS=" $FLAGS --disable-symver"
@@ -60,19 +76,17 @@ function build_ffmpeg2() {
60
76
61
77
case " $version " in
62
78
x86)
63
-
64
- EXTRA_CFLAGS=" "
65
- # EXTRA_LDFLAGS="-Wl,-Bsymbolic"
66
- EXTRA_LDFLAGS=" "
79
+ EXTRA_CFLAGS=" $SSL_CFLAGS "
80
+ EXTRA_LDFLAGS=" $SSL_LDFLAGS "
67
81
ABI=" x86"
68
82
;;
69
83
armv7a)
70
84
ARM_FLAGS=" --target-os=android --cross-prefix=arm-linux-androideabi- --arch=arm"
71
85
ARM_FLAGS=" $ARM_FLAGS --sysroot=$NDKPLATFORM "
72
86
FLAGS=" $ARM_FLAGS $FLAGS "
73
87
FLAGS=" $FLAGS --enable-neon"
74
- EXTRA_CFLAGS=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fPIC -DANDROID"
75
- EXTRA_LDFLAGS=" "
88
+ EXTRA_CFLAGS=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fPIC -DANDROID $SSL_CFLAGS "
89
+ EXTRA_LDFLAGS=" $SSL_LDFLAGS "
76
90
ABI=" armeabi-v7a"
77
91
;;
78
92
* )
0 commit comments