Skip to content

Commit

Permalink
Add PyAV recipe (#2750)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
DexerBR and AndreMiras authored Feb 14, 2023
1 parent 2b15b02 commit 10f0f29
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pythonforandroid/recipes/av/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pythonforandroid.toolchain import Recipe
from pythonforandroid.recipe import CythonRecipe


class PyAVRecipe(CythonRecipe):

name = "av"
version = "10.0.0"
url = "https://github.com/PyAV-Org/PyAV/archive/v{version}.zip"

depends = ["python3", "cython", "ffmpeg", "av_codecs"]
opt_depends = ["openssl"]

def get_recipe_env(self, arch, with_flags_in_cc=True):
env = super().get_recipe_env(arch)

build_dir = Recipe.get_recipe("ffmpeg", self.ctx).get_build_dir(
arch.arch
)
self.setup_extra_args = ["--ffmpeg-dir={}".format(build_dir)]

return env


recipe = PyAVRecipe()
11 changes: 11 additions & 0 deletions pythonforandroid/recipes/av_codecs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from pythonforandroid.toolchain import Recipe


class PyAVCodecsRecipe(Recipe):
depends = ["libx264", "libshine", "libvpx"]

def build_arch(self, arch):
pass


recipe = PyAVCodecsRecipe()

0 comments on commit 10f0f29

Please sign in to comment.