Skip to content

Commit fbcd9e1

Browse files
authored
Merge pull request kivy#1134 from germn/ffpyplayer_update
Update ffpyplayer recipe and it's dependencies
2 parents 41b2e51 + e5bab72 commit fbcd9e1

File tree

4 files changed

+27
-31
lines changed

4 files changed

+27
-31
lines changed

pythonforandroid/recipes/ffmpeg/__init__.py

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
import os
77
import 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

1014
class 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)

pythonforandroid/recipes/ffpyplayer/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@
99
class FFPyPlayerRecipe(CythonRecipe):
1010
version = 'master'
1111
url = 'https://github.com/matham/ffpyplayer/archive/{version}.zip'
12-
depends = ['python2', 'sdl2', 'ffmpeg']
12+
depends = [('python2', 'python3crystax'), 'sdl2', 'ffmpeg']
1313
opt_depends = ['openssl', 'ffpyplayer_codecs']
1414

1515
def get_recipe_env(self, arch, with_flags_in_cc=True):
1616
env = super(FFPyPlayerRecipe, self).get_recipe_env(arch)
1717

18-
env["SDL_INCLUDE_DIR"] = join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include')
19-
env["SDL_LIB_DIR"] = join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)
20-
2118
build_dir = Recipe.get_recipe('ffmpeg', self.ctx).get_build_dir(arch.arch)
2219
env["FFMPEG_INCLUDE_DIR"] = join(build_dir, "include")
2320
env["FFMPEG_LIB_DIR"] = join(build_dir, "lib")
2421

22+
env["SDL_INCLUDE_DIR"] = join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include')
23+
env["SDL_LIB_DIR"] = join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)
24+
25+
env["USE_SDL2_MIXER"] = '1'
26+
env["SDL2_MIXER_INCLUDE_DIR"] = join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_mixer')
27+
2528
return env
2629

2730
recipe = FFPyPlayerRecipe()

pythonforandroid/recipes/libshine/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77

88
class LibShineRecipe(Recipe):
9-
version = '20aee967f67abefd065c196eec7ce21adbbe1549'
9+
version = 'c72aba9031bde18a0995e7c01c9b53f2e08a0e46'
1010
url = 'https://github.com/toots/shine/archive/{version}.zip'
11-
md5sum = 'bbf1f657e6adccb5e79f59da9ecfac2d'
1211

1312
def should_build(self, arch):
1413
build_dir = self.get_build_dir(arch.arch)

pythonforandroid/recipes/libx264/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77

88
class LibX264Recipe(Recipe):
9-
version = 'x264-snapshot-20170608-2245-stable' # using mirror url since can't use ftp
9+
version = 'x264-snapshot-20170826-2245-stable' # using mirror url since can't use ftp
1010
url = 'http://mirror.yandex.ru/mirrors/ftp.videolan.org/x264/snapshots/{version}.tar.bz2'
11-
md5sum = 'adf3b87f759b5cc9f100f8cf99276f77'
1211

1312
def should_build(self, arch):
1413
build_dir = self.get_build_dir(arch.arch)

0 commit comments

Comments
 (0)