66import os
77import shutil
88
9+ # TODO
10+ # Recipe doesn't work with NDK r15c+ yet,
11+ # see: https://github.com/android-ndk/ndk/issues/477
12+
913
1014class FFMpegRecipe (Recipe ):
11- version = '3.1.8' # 3.2+ works with bugs
15+ version = '3.3.3'
1216 url = 'http://ffmpeg.org/releases/ffmpeg-{version}.tar.bz2'
13- md5sum = 'f25a0cdd7f731cfbd8c0f7842b0d15b9'
1417 depends = ['sdl2' ] # Need this to build correct recipe order
1518 opts_depends = ['openssl' , 'ffpyplayer_codecs' ]
1619 patches = ['patches/fix-libshine-configure.patch' ]
@@ -22,7 +25,7 @@ def should_build(self, arch):
2225 def prebuild_arch (self , arch ):
2326 self .apply_patches (arch )
2427
25- def get_recipe_env (self ,arch ):
28+ def get_recipe_env (self , arch ):
2629 env = super (FFMpegRecipe , self ).get_recipe_env (arch )
2730 env ['NDK' ] = self .ctx .ndk_dir
2831 return env
@@ -69,16 +72,10 @@ def build_arch(self, arch):
6972 else :
7073 # Enable codecs only for .mp4:
7174 flags += [
72- '--enable-parser=h264,aac' ,
73- '--enable-decoder=h263,h264,aac' ,
74- ]
75-
76- # disable some unused algo
77- # note: "golomb" are the one used in our video test, so don't use --disable-golomb
78- # note: and for aac decoding: "rdft", "mdct", and "fft" are needed
79- flags += [
80- '--disable-dxva2 --disable-vdpau --disable-vaapi' ,
81- '--disable-dct' ,
75+ '--enable-parser=aac,ac3,h261,h264,mpegaudio,mpeg4video,mpegvideo,vc1' ,
76+ '--enable-decoder=aac,h264,mpeg4,mpegvideo' ,
77+ '--enable-muxer=h264,mov,mp4,mpeg2video' ,
78+ '--enable-demuxer=aac,h264,m4v,mov,mpegvideo,vc1' ,
8279 ]
8380
8481 # needed to prevent _ffmpeg.so: version node not found for symbol av_init_packet@LIBAVFORMAT_52
@@ -89,10 +86,10 @@ def build_arch(self, arch):
8986
9087 # disable binaries / doc
9188 flags += [
92- '--disable-ffmpeg' ,
93- '--disable-ffplay' ,
94- '--disable-ffprobe' ,
95- '--disable-ffserver' ,
89+ '--disable-ffmpeg' ,
90+ '--disable-ffplay' ,
91+ '--disable-ffprobe' ,
92+ '--disable-ffserver' ,
9693 '--disable-doc' ,
9794 ]
9895
@@ -104,7 +101,7 @@ def build_arch(self, arch):
104101 '--enable-hwaccels' ,
105102 '--enable-gpl' ,
106103 '--enable-pic' ,
107- '--disable-static' ,
104+ '--disable-static' ,
108105 '--enable-shared' ,
109106 ]
110107
@@ -117,13 +114,11 @@ def build_arch(self, arch):
117114 '--enable-neon' ,
118115 '--prefix={}' .format (realpath ('.' )),
119116 ]
120- cflags = [
121- '-march=armv7-a' ,
117+ cflags += [
122118 '-mfpu=vfpv3-d16' ,
123119 '-mfloat-abi=softfp' ,
124- '-fPIC' ,
125- '-DANDROID' ,
126- ] + cflags
120+ '-fPIC' ,
121+ ]
127122
128123 env ['CFLAGS' ] += ' ' + ' ' .join (cflags )
129124 env ['LDFLAGS' ] += ' ' + ' ' .join (ldflags )
0 commit comments