|
|
35c1c3a |
diff -Nru mozilla/config/external/moz.build mozilla-OK/config/external/moz.build
|
|
|
35c1c3a |
--- mozilla/config/external/moz.build 2020-10-20 22:17:57.000000000 +0300
|
|
|
35c1c3a |
+++ mozilla-OK/config/external/moz.build 2020-11-12 19:23:45.888994819 +0300
|
|
|
35c1c3a |
@@ -36,8 +36,9 @@
|
|
|
35c1c3a |
external_dirs += ['media/libvpx']
|
|
|
35c1c3a |
|
|
|
35c1c3a |
if CONFIG['MOZ_AV1']:
|
|
|
35c1c3a |
- external_dirs += ['media/libaom']
|
|
|
35c1c3a |
- external_dirs += ['media/libdav1d']
|
|
|
35c1c3a |
+ if not CONFIG['MOZ_SYSTEM_AV1']:
|
|
|
35c1c3a |
+ external_dirs += ['media/libaom']
|
|
|
35c1c3a |
+ external_dirs += ['media/libdav1d']
|
|
|
35c1c3a |
|
|
|
35c1c3a |
if not CONFIG['MOZ_SYSTEM_PNG']:
|
|
|
35c1c3a |
external_dirs += ['media/libpng']
|
|
|
35c1c3a |
diff -Nru mozilla/config/system-headers.mozbuild mozilla-OK/config/system-headers.mozbuild
|
|
|
35c1c3a |
--- mozilla/config/system-headers.mozbuild 2020-10-20 22:17:57.000000000 +0300
|
|
|
35c1c3a |
+++ mozilla-OK/config/system-headers.mozbuild 2020-11-12 19:23:45.888994819 +0300
|
|
|
35c1c3a |
@@ -1321,6 +1321,14 @@
|
|
|
35c1c3a |
'pixman.h',
|
|
|
35c1c3a |
]
|
|
|
35c1c3a |
|
|
|
35c1c3a |
+if CONFIG['MOZ_SYSTEM_AV1']:
|
|
|
35c1c3a |
+ system_headers += [
|
|
|
35c1c3a |
+ 'aom/aom_decoder.h',
|
|
|
35c1c3a |
+ 'aom/aomdx.h',
|
|
|
35c1c3a |
+ 'aom/aom_image.h',
|
|
|
35c1c3a |
+ 'dav1d/dav1d.h',
|
|
|
35c1c3a |
+ ]
|
|
|
35c1c3a |
+
|
|
|
35c1c3a |
if CONFIG['MOZ_SYSTEM_LIBVPX']:
|
|
|
35c1c3a |
system_headers += [
|
|
|
35c1c3a |
'vpx_mem/vpx_mem.h',
|
|
|
35c1c3a |
diff -Nru mozilla/dom/media/platforms/moz.build mozilla-OK/dom/media/platforms/moz.build
|
|
|
35c1c3a |
--- mozilla/dom/media/platforms/moz.build 2020-10-20 22:17:57.000000000 +0300
|
|
|
35c1c3a |
+++ mozilla-OK/dom/media/platforms/moz.build 2020-11-12 19:23:45.889994811 +0300
|
|
|
35c1c3a |
@@ -74,6 +74,11 @@
|
|
|
35c1c3a |
'agnostic/AOMDecoder.cpp',
|
|
|
35c1c3a |
'agnostic/DAV1DDecoder.cpp',
|
|
|
35c1c3a |
]
|
|
|
35c1c3a |
+ if CONFIG['MOZ_SYSTEM_AV1']:
|
|
|
35c1c3a |
+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
|
|
|
35c1c3a |
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
|
|
|
35c1c3a |
+ CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
|
|
|
35c1c3a |
+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
|
|
|
35c1c3a |
|
|
|
35c1c3a |
if CONFIG['MOZ_APPLEMEDIA']:
|
|
|
35c1c3a |
EXPORTS += [
|
|
|
35c1c3a |
diff -Nru mozilla/toolkit/moz.configure mozilla-OK/toolkit/moz.configure
|
|
|
35c1c3a |
--- mozilla/toolkit/moz.configure 2020-10-21 23:09:59.000000000 +0300
|
|
|
35c1c3a |
+++ mozilla-OK/toolkit/moz.configure 2020-11-12 19:23:45.889994811 +0300
|
|
|
35c1c3a |
@@ -370,7 +370,23 @@
|
|
|
35c1c3a |
if value:
|
|
|
35c1c3a |
return True
|
|
|
35c1c3a |
|
|
|
35c1c3a |
-@depends(target, nasm_version, when=av1 & compile_environment)
|
|
|
35c1c3a |
+option('--with-system-av1',
|
|
|
35c1c3a |
+ help="Use system av1 (located with pkgconfig)")
|
|
|
35c1c3a |
+
|
|
|
35c1c3a |
+system_libaom_info = pkg_check_modules('MOZ_SYSTEM_LIBAOM', 'aom >= 1.0.0',
|
|
|
35c1c3a |
+ when='--with-system-av1')
|
|
|
35c1c3a |
+
|
|
|
35c1c3a |
+system_libdav1d_info = pkg_check_modules('MOZ_SYSTEM_LIBDAV1D', 'dav1d >= 0.1.1',
|
|
|
35c1c3a |
+ when='--with-system-av1')
|
|
|
35c1c3a |
+
|
|
|
35c1c3a |
+@depends(system_libaom_info, system_libdav1d_info)
|
|
|
35c1c3a |
+def system_av1(system_libaom_info, system_libdav1d_info):
|
|
|
35c1c3a |
+ has_av1_libs = False
|
|
|
35c1c3a |
+ if system_libaom_info and system_libdav1d_info:
|
|
|
35c1c3a |
+ has_av1_libs = True
|
|
|
35c1c3a |
+ return has_av1_libs
|
|
|
35c1c3a |
+
|
|
|
35c1c3a |
+@depends(target, nasm_version, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
|
|
|
35c1c3a |
def dav1d_asm(target, nasm_version):
|
|
|
35c1c3a |
if target.os != 'Android':
|
|
|
35c1c3a |
if target.cpu == 'aarch64':
|
|
|
35c1c3a |
@@ -386,6 +402,7 @@
|
|
|
35c1c3a |
set_define('MOZ_DAV1D_ASM', dav1d_asm)
|
|
|
35c1c3a |
set_config('MOZ_AV1', av1)
|
|
|
35c1c3a |
set_define('MOZ_AV1', av1)
|
|
|
35c1c3a |
+set_config('MOZ_SYSTEM_AV1', depends_if(system_av1)(lambda _: True))
|
|
|
35c1c3a |
|
|
|
35c1c3a |
# Built-in fragmented MP4 support.
|
|
|
35c1c3a |
# ==============================================================
|