1cc_binary {
2    name: "mediaswcodec",
3    vendor_available: true,
4    min_sdk_version: "29",
5
6    srcs: [
7        "main_swcodecservice.cpp",
8    ],
9
10    shared_libs: [
11        "libavservices_minijail",
12        "libbase",
13        "libhidlbase",
14        "liblog",
15        "libmedia_codecserviceregistrant",
16    ],
17
18    target: {
19        android: {
20            product_variables: {
21                malloc_not_svelte: {
22                    // Scudo increases memory footprint, so only enable on
23                    // non-svelte devices.
24                    shared_libs: ["libc_scudo"],
25                },
26            },
27        },
28    },
29
30    header_libs: [
31        "libmedia_headers",
32    ],
33
34    init_rc: ["mediaswcodec.rc"],
35
36    cflags: [
37        "-Werror",
38        "-Wall",
39        "-Wno-error=deprecated-declarations",
40    ],
41}
42
43prebuilt_etc {
44    name: "mediaswcodec.policy",
45    sub_dir: "seccomp_policy",
46    arch: {
47        arm: {
48            src: "seccomp_policy/mediaswcodec-arm.policy",
49        },
50        arm64: {
51            src: "seccomp_policy/mediaswcodec-arm64.policy",
52        },
53        x86: {
54            src: "seccomp_policy/mediaswcodec-x86.policy",
55        },
56        x86_64: {
57            src: "seccomp_policy/mediaswcodec-x86_64.policy",
58        },
59    },
60    required: [
61        "crash_dump.policy",
62        "code_coverage.policy",
63    ],
64}
65
66// media.codec -- the one that handles vendor & HW codecs
67
68cc_binary {
69    name: "android.hardware.media.omx@1.0-service",
70    relative_install_path: "hw",
71    vendor: true,
72
73    srcs: [
74        "main_codecservice.cpp",
75    ],
76
77    shared_libs: [
78        "libbinder",
79        "libutils",
80        "liblog",
81        "libbase",
82        "libavservices_minijail",
83        "libcutils",
84        "libhidlbase",
85        "libstagefright_omx",
86        "libstagefright_xmlparser",
87        "android.hardware.media.omx@1.0",
88        "android.hidl.memory@1.0",
89    ],
90
91    runtime_libs: [
92        "libstagefright_soft_aacdec",
93        "libstagefright_soft_aacenc",
94        "libstagefright_soft_amrdec",
95        "libstagefright_soft_amrnbenc",
96        "libstagefright_soft_amrwbenc",
97        "libstagefright_soft_avcdec",
98        "libstagefright_soft_avcenc",
99        "libstagefright_soft_flacdec",
100        "libstagefright_soft_flacenc",
101        "libstagefright_soft_g711dec",
102        "libstagefright_soft_gsmdec",
103        "libstagefright_soft_hevcdec",
104        "libstagefright_soft_mp3dec",
105        "libstagefright_soft_mpeg2dec",
106        "libstagefright_soft_mpeg4dec",
107        "libstagefright_soft_mpeg4enc",
108        "libstagefright_soft_opusdec",
109        "libstagefright_soft_rawdec",
110        "libstagefright_soft_vorbisdec",
111        "libstagefright_soft_vpxdec",
112        "libstagefright_soft_vpxenc",
113        "libstagefright_softomx_plugin",
114    ],
115
116    // OMX interfaces force this to stay in 32-bit mode;
117    compile_multilib: "32",
118
119    init_rc: ["android.hardware.media.omx@1.0-service.rc"],
120
121    required: [
122        "mediacodec.policy",
123    ],
124
125    cflags: [
126        "-Werror",
127        "-Wall",
128        "-Wno-error=deprecated-declarations",
129    ],
130}
131
132
133prebuilt_etc {
134    name: "mediacodec.policy",
135    sub_dir: "seccomp_policy",
136    arch: {
137        arm: {
138            src: "seccomp_policy/mediacodec-arm.policy",
139        },
140        arm64: {
141            src: "seccomp_policy/mediacodec-arm64.policy",
142        },
143        x86: {
144            src: "seccomp_policy/mediacodec-x86.policy",
145        },
146        x86_64: {
147            src: "seccomp_policy/mediacodec-x86_64.policy",
148        },
149    },
150    required: [
151        "crash_dump.policy",
152        "code_coverage.policy",
153    ],
154}
155