Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 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 \ |
Lajos Molnar | 3daf5d9 | 2019-05-08 22:34:49 -0700 | [diff] [blame] | 25 | libstagefright_softomx_plugin \ |
Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 26 | |
Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 27 | # service executable |
| 28 | include $(CLEAR_VARS) |
Zhuoyao Zhang | a8973fd | 2018-01-09 17:18:41 -0800 | [diff] [blame] | 29 | # seccomp is not required for coverage build. |
| 30 | ifneq ($(NATIVE_COVERAGE),true) |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 31 | LOCAL_REQUIRED_MODULES_arm := mediacodec.policy |
| 32 | LOCAL_REQUIRED_MODULES_x86 := mediacodec.policy |
Zhuoyao Zhang | a8973fd | 2018-01-09 17:18:41 -0800 | [diff] [blame] | 33 | endif |
Jorge Lucangeli Obes | fbfb8e8 | 2017-02-14 10:33:41 -0500 | [diff] [blame] | 34 | LOCAL_SRC_FILES := main_codecservice.cpp |
Pawin Vongmasa | 9c47c97 | 2017-02-08 04:09:38 -0800 | [diff] [blame] | 35 | LOCAL_SHARED_LIBRARIES := \ |
Pawin Vongmasa | 9c47c97 | 2017-02-08 04:09:38 -0800 | [diff] [blame] | 36 | libbinder \ |
| 37 | libutils \ |
| 38 | liblog \ |
| 39 | libbase \ |
Steven Moreland | 009578c | 2017-06-08 11:23:53 -0700 | [diff] [blame] | 40 | libavservices_minijail_vendor \ |
Pawin Vongmasa | 9c47c97 | 2017-02-08 04:09:38 -0800 | [diff] [blame] | 41 | libcutils \ |
Steven Moreland | 5fee0f2 | 2019-06-10 13:35:00 -0700 | [diff] [blame] | 42 | libhidlbase \ |
Pawin Vongmasa | 04563aa | 2017-03-09 07:02:01 -0800 | [diff] [blame] | 43 | libstagefright_omx \ |
Pawin Vongmasa | fbe70ae | 2017-07-27 02:21:57 -0700 | [diff] [blame] | 44 | libstagefright_xmlparser \ |
Pawin Vongmasa | 0d3a5ed | 2017-02-22 03:19:35 -0800 | [diff] [blame] | 45 | android.hardware.media.omx@1.0 \ |
Pawin Vongmasa | 0d3a5ed | 2017-02-22 03:19:35 -0800 | [diff] [blame] | 46 | android.hidl.memory@1.0 |
Steven Moreland | 5550640 | 2017-06-07 18:18:09 -0700 | [diff] [blame] | 47 | |
Pawin Vongmasa | 4658418 | 2017-02-27 20:37:22 -0800 | [diff] [blame] | 48 | LOCAL_MODULE := android.hardware.media.omx@1.0-service |
| 49 | LOCAL_MODULE_RELATIVE_PATH := hw |
Steven Moreland | 5550640 | 2017-06-07 18:18:09 -0700 | [diff] [blame] | 50 | LOCAL_VENDOR_MODULE := true |
Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 51 | LOCAL_32_BIT_ONLY := true |
Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 52 | # Since this is 32-bit-only module, only 32-bit version of the codecs are installed. |
| 53 | # TODO(b/72343507): eliminate the need for manually adding .vendor suffix. This should be done |
| 54 | # by the build system. |
Josh Gao | ebb2179 | 2018-01-24 16:37:16 -0800 | [diff] [blame] | 55 | LOCAL_REQUIRED_MODULES += \ |
Jiyong Park | 5f98610 | 2017-12-18 20:43:16 +0900 | [diff] [blame] | 56 | $(foreach codec,$(_software_codecs),\ |
| 57 | $(eval _vendor_suffix := $(if $(BOARD_VNDK_VERSION),.vendor))\ |
| 58 | $(codec)$(_vendor_suffix)\ |
| 59 | ) |
| 60 | _software_codecs := |
Pawin Vongmasa | 4658418 | 2017-02-27 20:37:22 -0800 | [diff] [blame] | 61 | LOCAL_INIT_RC := android.hardware.media.omx@1.0-service.rc |
Pawin Vongmasa | e7b8942 | 2017-11-16 19:33:39 -0800 | [diff] [blame] | 62 | |
Marco Nelissen | 1900e77 | 2016-02-02 16:12:16 -0800 | [diff] [blame] | 63 | include $(BUILD_EXECUTABLE) |
| 64 | |
Chong Zhang | 8f91543 | 2018-09-05 11:17:17 -0700 | [diff] [blame] | 65 | #################################################################### |
| 66 | |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 67 | # service seccomp policy |
bohu | e5f21fc | 2017-12-15 11:20:58 -0800 | [diff] [blame] | 68 | ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), x86 x86_64 arm arm64)) |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 69 | include $(CLEAR_VARS) |
| 70 | LOCAL_MODULE := mediacodec.policy |
| 71 | LOCAL_MODULE_CLASS := ETC |
| 72 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/seccomp_policy |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 73 | LOCAL_REQUIRED_MODULES := crash_dump.policy |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 74 | # mediacodec runs in 32-bit combatibility mode. For 64 bit architectures, |
| 75 | # use the 32 bit policy |
| 76 | ifdef TARGET_2ND_ARCH |
Greg Hartman | 97df29e | 2018-02-08 20:16:32 -0800 | [diff] [blame] | 77 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 78 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_2ND_ARCH).policy |
Greg Hartman | 97df29e | 2018-02-08 20:16:32 -0800 | [diff] [blame] | 79 | else |
| 80 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy |
| 81 | endif |
Jeff Vander Stoep | 79234e4 | 2017-02-23 10:03:30 -0800 | [diff] [blame] | 82 | else |
| 83 | LOCAL_SRC_FILES := seccomp_policy/mediacodec-$(TARGET_ARCH).policy |
| 84 | endif |
| 85 | include $(BUILD_PREBUILT) |
| 86 | endif |
| 87 | |
Ivan Lozano | fffc228 | 2019-01-10 15:18:12 -0800 | [diff] [blame] | 88 | #################################################################### |
| 89 | |
Ivan Lozano | fffc228 | 2019-01-10 15:18:12 -0800 | [diff] [blame] | 90 | |
Jeff Vander Stoep | c9ea211 | 2016-02-17 10:52:20 -0800 | [diff] [blame] | 91 | include $(call all-makefiles-under, $(LOCAL_PATH)) |