• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH := $(call my-dir)
2
3_software_codecs := \
4    libstagefright_soft_aacdec \
5    libstagefright_soft_aacenc \
6    libstagefright_soft_amrdec \
7    libstagefright_soft_amrnbenc \
8    libstagefright_soft_amrwbenc \
9    libstagefright_soft_avcdec \
10    libstagefright_soft_avcenc \
11    libstagefright_soft_flacdec \
12    libstagefright_soft_flacenc \
13    libstagefright_soft_g711dec \
14    libstagefright_soft_gsmdec \
15    libstagefright_soft_hevcdec \
16    libstagefright_soft_mp3dec \
17    libstagefright_soft_mpeg2dec \
18    libstagefright_soft_mpeg4dec \
19    libstagefright_soft_mpeg4enc \
20    libstagefright_soft_opusdec \
21    libstagefright_soft_rawdec \
22    libstagefright_soft_vorbisdec \
23    libstagefright_soft_vpxdec \
24    libstagefright_soft_vpxenc \
25    libstagefright_softomx_plugin \
26
27# service executable
28include $(CLEAR_VARS)
29# seccomp is not required for coverage build.
30ifneq ($(NATIVE_COVERAGE),true)
31LOCAL_REQUIRED_MODULES_arm := mediacodec.policy
32LOCAL_REQUIRED_MODULES_x86 := mediacodec.policy
33endif
34LOCAL_SRC_FILES := main_codecservice.cpp
35LOCAL_SHARED_LIBRARIES := \
36    libbinder \
37    libutils \
38    liblog \
39    libbase \
40    libavservices_minijail_vendor \
41    libcutils \
42    libhwbinder \
43    libhidlbase \
44    libhidltransport \
45    libstagefright_omx \
46    libstagefright_xmlparser \
47    android.hardware.media.omx@1.0 \
48    android.hidl.memory@1.0
49
50LOCAL_MODULE := android.hardware.media.omx@1.0-service
51LOCAL_MODULE_RELATIVE_PATH := hw
52LOCAL_VENDOR_MODULE := true
53LOCAL_32_BIT_ONLY := true
54# Since this is 32-bit-only module, only 32-bit version of the codecs are installed.
55# TODO(b/72343507): eliminate the need for manually adding .vendor suffix. This should be done
56# by the build system.
57LOCAL_REQUIRED_MODULES += \
58$(foreach codec,$(_software_codecs),\
59  $(eval _vendor_suffix := $(if $(BOARD_VNDK_VERSION),.vendor))\
60  $(codec)$(_vendor_suffix)\
61)
62_software_codecs :=
63LOCAL_INIT_RC := android.hardware.media.omx@1.0-service.rc
64
65include $(BUILD_EXECUTABLE)
66
67####################################################################
68
69# service seccomp policy
70ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), x86 x86_64 arm arm64))
71include $(CLEAR_VARS)
72LOCAL_MODULE := mediacodec.policy
73LOCAL_MODULE_CLASS := ETC
74LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/seccomp_policy
75LOCAL_REQUIRED_MODULES := crash_dump.policy
76# mediacodec runs in 32-bit combatibility mode. For 64 bit architectures,
77# use the 32 bit policy
78ifdef TARGET_2ND_ARCH
79  ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
80    LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_2ND_ARCH).policy
81  else
82    LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy
83  endif
84else
85    LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy
86endif
87include $(BUILD_PREBUILT)
88endif
89
90####################################################################
91
92
93include $(call all-makefiles-under, $(LOCAL_PATH))
94