Skip to content

Commit 10f0f29

Browse files
DexerBRAndreMiras
andauthored
Add PyAV recipe (kivy#2750)
* pyav recipe * flake8 fix * Update pythonforandroid/recipes/av/__init__.py Co-authored-by: Andre Miras <AndreMiras@users.noreply.github.com> --------- Co-authored-by: Andre Miras <AndreMiras@users.noreply.github.com>
1 parent 2b15b02 commit 10f0f29

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from pythonforandroid.toolchain import Recipe
2+
from pythonforandroid.recipe import CythonRecipe
3+
4+
5+
class PyAVRecipe(CythonRecipe):
6+
7+
name = "av"
8+
version = "10.0.0"
9+
url = "https://github.com/PyAV-Org/PyAV/archive/v{version}.zip"
10+
11+
depends = ["python3", "cython", "ffmpeg", "av_codecs"]
12+
opt_depends = ["openssl"]
13+
14+
def get_recipe_env(self, arch, with_flags_in_cc=True):
15+
env = super().get_recipe_env(arch)
16+
17+
build_dir = Recipe.get_recipe("ffmpeg", self.ctx).get_build_dir(
18+
arch.arch
19+
)
20+
self.setup_extra_args = ["--ffmpeg-dir={}".format(build_dir)]
21+
22+
return env
23+
24+
25+
recipe = PyAVRecipe()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from pythonforandroid.toolchain import Recipe
2+
3+
4+
class PyAVCodecsRecipe(Recipe):
5+
depends = ["libx264", "libshine", "libvpx"]
6+
7+
def build_arch(self, arch):
8+
pass
9+
10+
11+
recipe = PyAVCodecsRecipe()

0 commit comments

Comments
 (0)