moz.build (3894B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 EXPORTS += [ 8 "agnostic/AgnosticDecoderModule.h", 9 "agnostic/BlankDecoderModule.h", 10 "agnostic/DummyMediaDataDecoder.h", 11 "agnostic/VPXDecoder.h", 12 "AllocationPolicy.h", 13 "EncoderConfig.h", 14 "MediaCodecsSupport.h", 15 "MediaTelemetryConstants.h", 16 "PDMFactory.h", 17 "PEMFactory.h", 18 "PlatformDecoderModule.h", 19 "PlatformEncoderModule.h", 20 "ReorderQueue.h", 21 "SimpleMap.h", 22 "wrappers/AudioTrimmer.h", 23 "wrappers/MediaChangeMonitor.h", 24 "wrappers/MediaDataDecoderProxy.h", 25 "wrappers/MediaDataEncoderProxy.h", 26 ] 27 28 UNIFIED_SOURCES += [ 29 "agnostic/AgnosticDecoderModule.cpp", 30 "agnostic/BlankDecoderModule.cpp", 31 "agnostic/DummyMediaDataDecoder.cpp", 32 "agnostic/NullDecoderModule.cpp", 33 "agnostic/VPXDecoder.cpp", 34 "AllocationPolicy.cpp", 35 "EncoderConfig.cpp", 36 "MediaCodecsSupport.cpp", 37 "PDMFactory.cpp", 38 "PEMFactory.cpp", 39 "PlatformDecoderModule.cpp", 40 "PlatformEncoderModule.cpp", 41 "wrappers/AudioTrimmer.cpp", 42 "wrappers/MediaChangeMonitor.cpp", 43 "wrappers/MediaDataDecoderProxy.cpp", 44 "wrappers/MediaDataEncoderProxy.cpp", 45 ] 46 47 DIRS += ["agnostic/bytestreams", "agnostic/eme", "agnostic/gmp", "omx"] 48 49 if CONFIG["MOZ_WMF"]: 50 DIRS += ["wmf"] 51 52 UNIFIED_SOURCES += [ 53 "ffmpeg/FFmpegLibWrapper.cpp", 54 ] 55 56 DIRS += [ 57 "ffmpeg/ffvpx", 58 ] 59 60 if CONFIG["MOZ_FFMPEG"]: 61 DIRS += [ 62 "ffmpeg", 63 ] 64 65 if CONFIG["MOZ_AV1"]: 66 EXPORTS += [ 67 "agnostic/AOMDecoder.h", 68 "agnostic/DAV1DDecoder.h", 69 ] 70 UNIFIED_SOURCES += [ 71 "agnostic/AOMDecoder.cpp", 72 "agnostic/DAV1DDecoder.cpp", 73 ] 74 if CONFIG["MOZ_SYSTEM_AV1"]: 75 CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBAOM_CFLAGS"] 76 CXXFLAGS += CONFIG["MOZ_SYSTEM_LIBDAV1D_CFLAGS"] 77 OS_LIBS += CONFIG["MOZ_SYSTEM_LIBAOM_LIBS"] 78 OS_LIBS += CONFIG["MOZ_SYSTEM_LIBDAV1D_LIBS"] 79 80 if CONFIG["MOZ_OMX"]: 81 EXPORTS += [ 82 "omx/OmxCoreLibLinker.h", 83 ] 84 UNIFIED_SOURCES += [ 85 "omx/OmxCoreLibLinker.cpp", 86 ] 87 88 if CONFIG["MOZ_APPLEMEDIA"]: 89 EXPORTS += [ 90 "apple/AppleDecoderModule.h", 91 "apple/AppleEncoderModule.h", 92 "apple/AppleUtils.h", 93 ] 94 UNIFIED_SOURCES += [ 95 "apple/AppleATDecoder.cpp", 96 "apple/AppleDecoderModule.cpp", 97 "apple/AppleEncoderModule.cpp", 98 "apple/AppleUtils.cpp", 99 "apple/AppleVTDecoder.cpp", 100 "apple/AppleVTEncoder.cpp", 101 ] 102 LOCAL_INCLUDES += [ 103 "/media/libyuv/libyuv/include", 104 ] 105 OS_LIBS += [ 106 "-framework AudioToolbox", 107 "-framework CoreMedia", 108 "-framework VideoToolbox", 109 # For some unknown reason, the documented method of using weak_import 110 # attribute doesn't work with VideoToolbox's functions. 111 # We want to lazily load _VTRegisterSupplementalVideoDecoderIfAvailable 112 # symbol as it's only available in macOS 11 and later. 113 "-Wl,-U,_VTRegisterSupplementalVideoDecoderIfAvailable", 114 ] 115 116 include("/ipc/chromium/chromium-config.mozbuild") 117 118 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": 119 EXPORTS += [ 120 "android/AndroidDecoderModule.h", 121 "android/AndroidEncoderModule.h", 122 "android/JavaCallbacksSupport.h", 123 ] 124 UNIFIED_SOURCES += [ 125 "android/AndroidDataEncoder.cpp", 126 "android/AndroidDecoderModule.cpp", 127 "android/AndroidEncoderModule.cpp", 128 "android/RemoteDataDecoder.cpp", 129 ] 130 LOCAL_INCLUDES += [ 131 "/media/libyuv/libyuv/include", 132 ] 133 134 FINAL_LIBRARY = "xul" 135 136 # Add libFuzzer configuration directives 137 include("/tools/fuzzing/libfuzzer-config.mozbuild")