Skip to content

Commit 9a4b5a0

Browse files
authored
(#24566) [ffmpeg] Fix Android build by disabling dependencies
* Disable libfdk_aac when building Android Signed-off-by: Uilian Ries <[email protected]> * Remove libvpx validate Signed-off-by: Uilian Ries <[email protected]> * Fix link Signed-off-by: Uilian Ries <[email protected]> * bump libvpx version Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]>
1 parent ab3333f commit 9a4b5a0

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

recipes/ffmpeg/all/conanfile.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ def config_options(self):
269269
del self.options.with_mediacodec
270270
if not self._version_supports_libsvtav1:
271271
self.options.rm_safe("with_libsvtav1")
272+
if self.settings.os == "Android":
273+
del self.options.with_libfdk_aac
272274

273275
def configure(self):
274276
if self.options.shared:
@@ -293,7 +295,7 @@ def requirements(self):
293295
if self.options.with_openjpeg:
294296
self.requires("openjpeg/2.5.2")
295297
if self.options.with_openh264:
296-
self.requires("openh264/2.3.1")
298+
self.requires("openh264/2.4.1")
297299
if self.options.with_vorbis:
298300
self.requires("vorbis/1.3.7")
299301
if self.options.with_opus:
@@ -303,14 +305,14 @@ def requirements(self):
303305
if self.options.with_sdl:
304306
self.requires("sdl/2.28.5")
305307
if self.options.with_libx264:
306-
self.requires("libx264/cci.20220602")
308+
self.requires("libx264/cci.20240224")
307309
if self.options.with_libx265:
308310
self.requires("libx265/3.4")
309311
if self.options.with_libvpx:
310-
self.requires("libvpx/1.13.1")
312+
self.requires("libvpx/1.14.1")
311313
if self.options.with_libmp3lame:
312314
self.requires("libmp3lame/3.100")
313-
if self.options.with_libfdk_aac:
315+
if self.options.get_safe("with_libfdk_aac"):
314316
self.requires("libfdk_aac/2.0.3")
315317
if self.options.with_libwebp:
316318
self.requires("libwebp/1.3.2")
@@ -329,11 +331,11 @@ def requirements(self):
329331
if self.options.get_safe("with_vulkan"):
330332
self.requires("vulkan-loader/1.3.243.0")
331333
if self.options.get_safe("with_libsvtav1"):
332-
self.requires("libsvtav1/1.6.0")
334+
self.requires("libsvtav1/2.1.0")
333335
if self.options.with_libaom:
334336
self.requires("libaom-av1/3.6.1")
335337
if self.options.get_safe("with_libdav1d"):
336-
self.requires("dav1d/1.2.1")
338+
self.requires("dav1d/1.4.3")
337339
if self.options.get_safe("with_libdrm"):
338340
self.requires("libdrm/2.4.119")
339341

@@ -505,7 +507,7 @@ def opt_append_disable_if_set(args, what, v):
505507
opt_enable_disable("libx265", self.options.with_libx265),
506508
opt_enable_disable("libvpx", self.options.with_libvpx),
507509
opt_enable_disable("libmp3lame", self.options.with_libmp3lame),
508-
opt_enable_disable("libfdk-aac", self.options.with_libfdk_aac),
510+
opt_enable_disable("libfdk-aac", self.options.get_safe("with_libfdk_aac")),
509511
opt_enable_disable("libwebp", self.options.with_libwebp),
510512
opt_enable_disable("libaom", self.options.with_libaom),
511513
opt_enable_disable("openssl", self.options.with_ssl == "openssl"),
@@ -532,7 +534,7 @@ def opt_append_disable_if_set(args, what, v):
532534
"--disable-cuda", # FIXME: CUDA support
533535
"--disable-cuvid", # FIXME: CUVID support
534536
# Licenses
535-
opt_enable_disable("nonfree", self.options.with_libfdk_aac or (self.options.with_ssl and (
537+
opt_enable_disable("nonfree", self.options.get_safe("with_libfdk_aac") or (self.options.with_ssl and (
536538
self.options.with_libx264 or self.options.with_libx265 or self.options.postproc))),
537539
opt_enable_disable("gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc)
538540
]
@@ -854,6 +856,8 @@ def _add_component(name, dependencies):
854856
avdevice.frameworks.append("AVFoundation")
855857
if self.options.get_safe("with_audiotoolbox"):
856858
avdevice.frameworks.append("CoreAudio")
859+
if self.settings.os == "Android" and not self.options.shared:
860+
avdevice.system_libs.extend(["android", "camera2ndk", "mediandk"])
857861

858862
if self.options.avcodec:
859863
if self.options.with_zlib:
@@ -878,7 +882,7 @@ def _add_component(name, dependencies):
878882
avcodec.requires.append("libvpx::libvpx")
879883
if self.options.with_libmp3lame:
880884
avcodec.requires.append("libmp3lame::libmp3lame")
881-
if self.options.with_libfdk_aac:
885+
if self.options.get_safe("with_libfdk_aac"):
882886
avcodec.requires.append("libfdk_aac::libfdk_aac")
883887
if self.options.with_libwebp:
884888
avcodec.requires.append("libwebp::libwebp")

0 commit comments

Comments
 (0)