• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// DO NOT DEPEND ON THIS DIRECTLY
2// use libcodec2_soft-defaults instead
3package {
4    // See: http://go/android-license-faq
5    // A large-scale-change added 'default_applicable_licenses' to import
6    // all of the 'license_kinds' from "frameworks_av_license"
7    // to get the below license kinds:
8    //   SPDX-license-identifier-Apache-2.0
9    default_applicable_licenses: ["frameworks_av_license"],
10}
11
12cc_library_headers {
13    name: "libcodec2_soft_common_headers",
14    defaults: ["libcodec2-impl-defaults"],
15    vendor_available: true,
16
17    export_include_dirs: [
18        "include",
19    ],
20}
21
22cc_library {
23    name: "libcodec2_soft_common",
24    defaults: ["libcodec2-impl-defaults"],
25    vendor_available: true,
26
27    srcs: [
28        "SimpleC2Component.cpp",
29        "SimpleC2Interface.cpp",
30    ],
31
32    export_include_dirs: [
33        "include",
34    ],
35
36    export_shared_lib_headers: [
37        "libsfplugin_ccodec_utils",
38    ],
39
40    header_libs: [
41        "libarect_headers",
42        "libnativewindow_headers",
43    ],
44
45    static_libs: [
46        "libyuv", // for conversion routines
47    ],
48
49    shared_libs: [
50        "libcutils", // for properties
51        "liblog", // for ALOG
52        "libsfplugin_ccodec_utils", // for ImageCopy
53        "libstagefright_foundation", // for Mutexed
54    ],
55
56    min_sdk_version: "29",
57    apex_available: [
58        "//apex_available:platform",
59        "com.android.media.swcodec",
60    ],
61
62    sanitize: {
63        misc_undefined: [
64            "unsigned-integer-overflow",
65            "signed-integer-overflow",
66        ],
67        cfi: true,
68    },
69
70    ldflags: ["-Wl,-Bsymbolic"],
71}
72
73filegroup {
74    name: "codec2_soft_exports",
75    srcs: ["exports.lds"],
76}
77
78// public dependency for software codec implementation
79// to be used by code under media/codecs/* only as its stability is not guaranteed
80cc_defaults {
81    name: "libcodec2_soft-defaults",
82    defaults: ["libcodec2-impl-defaults"],
83    vendor_available: true,
84    version_script: ":codec2_soft_exports",
85    export_shared_lib_headers: [
86        "libsfplugin_ccodec_utils",
87    ],
88
89    header_libs: [
90        "libarect_headers",
91        "libnativewindow_headers",
92    ],
93
94    shared_libs: [
95        "libcodec2_soft_common",
96        "libcutils", // for properties
97        "liblog", // for ALOG
98        "libsfplugin_ccodec_utils", // for ImageCopy
99        "libstagefright_foundation", // for ColorUtils and MIME
100    ],
101
102    cflags: [
103        "-Wall",
104        "-Werror",
105    ],
106
107    ldflags: ["-Wl,-Bsymbolic"],
108
109    min_sdk_version: "29",
110    apex_available: [
111        "//apex_available:platform",
112        "com.android.media.swcodec",
113    ],
114}
115
116// public dependency for software codec implementation
117// to be used by code under media/codecs/* only
118cc_defaults {
119    name: "libcodec2_soft_sanitize_all-defaults",
120
121    sanitize: {
122        misc_undefined: [
123            "unsigned-integer-overflow",
124            "signed-integer-overflow",
125        ],
126        cfi: true,
127    },
128}
129
130// public dependency for software codec implementation
131// to be used by code under media/codecs/* only
132cc_defaults {
133    name: "libcodec2_soft_sanitize_signed-defaults",
134
135    sanitize: {
136        misc_undefined: [
137            "signed-integer-overflow",
138        ],
139    },
140}
141
142cc_defaults {
143    name: "libcodec2_soft_sanitize_cfi-defaults",
144
145    sanitize: {
146        cfi: true,
147        config: {
148            cfi_assembly_support: true,
149        },
150    },
151}
152
153// TEMP: used by cheets2 project - remove when no longer used
154cc_library {
155    name: "libcodec2_simple_component",
156    vendor_available: true,
157
158    srcs: [
159        "SimpleC2Interface.cpp",
160    ],
161
162    local_include_dirs: [
163        "include",
164    ],
165
166    export_include_dirs: [
167        "include",
168    ],
169
170    shared_libs: [
171        "libcodec2",
172        "libcodec2_vndk",
173        "libcutils",
174        "liblog",
175        "libstagefright_foundation",
176        "libutils",
177    ],
178
179    sanitize: {
180        misc_undefined: [
181            "unsigned-integer-overflow",
182            "signed-integer-overflow",
183        ],
184        cfi: true,
185    },
186
187    ldflags: ["-Wl,-Bsymbolic"],
188}
189