Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PyAV recipe #2750

Merged
merged 3 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Comment on lines +4 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this recipe doing anything at all then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main intention is to keep the concept between PyAV and FFPyPlayer codecs distinct. That way, if there are any modifications to the PyAV codecs recipe, they will not interfere with FFPyPlayer.

In short, each recipe (PyAV/FFPyPlayer) in its own context.