-
Notifications
You must be signed in to change notification settings - Fork 4
/
atom.mk
239 lines (209 loc) · 6.06 KB
/
atom.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
LOCAL_PATH := $(call my-dir)
# API library. This is the library that most programs should use.
include $(CLEAR_VARS)
LOCAL_MODULE := libvideo-decode
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99 -D_GNU_SOURCE
LOCAL_SRC_FILES := \
src/vdec.c
LOCAL_LIBRARIES := \
libh264 \
libh265 \
libpomp \
libulog \
libvideo-decode-core \
libvideo-defs
LOCAL_CONFIG_FILES := config.in
$(call load-config)
LOCAL_CONDITIONAL_LIBRARIES := \
CONFIG_VDEC_AML:libvideo-decode-aml \
CONFIG_VDEC_FFMPEG:libvideo-decode-ffmpeg \
CONFIG_VDEC_HISI:libvideo-decode-hisi \
CONFIG_VDEC_MEDIACODEC:libvideo-decode-mediacodec \
CONFIG_VDEC_QCOM:libvideo-decode-qcom \
CONFIG_VDEC_TURBOJPEG:libvideo-decode-turbojpeg \
CONFIG_VDEC_VIDEOCOREMMAL:libvideo-decode-videocoremmal \
CONFIG_VDEC_VIDEOTOOLBOX:libvideo-decode-videotoolbox
LOCAL_EXPORT_LDLIBS := -lvideo-decode-core
ifeq ("$(TARGET_OS)","windows")
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_LIBRARY)
include $(CLEAR_VARS)
# Core library, common code for all implementations and structures definitions.
# Used by implementations.
LOCAL_MODULE := libvideo-decode-core
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library: core files
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/core/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99 -D_GNU_SOURCE
LOCAL_SRC_FILES := \
core/src/vdec_dbg.c \
core/src/vdec_enums.c \
core/src/vdec_format.c \
core/src/vdec_h264.c \
core/src/vdec_h265.c
LOCAL_LIBRARIES := \
libfutils \
libh264 \
libh265 \
libmedia-buffers \
libmedia-buffers-memory \
libulog \
libvideo-defs \
libvideo-metadata
ifeq ("$(TARGET_OS)","windows")
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_LIBRARY)
include $(CLEAR_VARS)
# ffmpeg implementation. can be enabled in the product configuration
LOCAL_MODULE := libvideo-decode-ffmpeg
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library: ffmpeg implementation
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99 -D_GNU_SOURCE
LOCAL_SRC_FILES := \
ffmpeg/src/vdec_ffmpeg.c
LOCAL_LIBRARIES := \
ffmpeg-libav \
libfutils \
libmedia-buffers \
libmedia-buffers-memory \
libmedia-buffers-memory-generic \
libpomp \
libulog \
libvideo-decode-core \
libvideo-defs \
libvideo-metadata
ifeq ("$(TARGET_OS)","windows")
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_LIBRARY)
ifeq ("$(TARGET_OS)-$(TARGET_OS_FLAVOUR)","linux-android")
include $(CLEAR_VARS)
# MediaCodec (Android) implementation.
# can be enabled in the product configuration
LOCAL_MODULE := libvideo-decode-mediacodec
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library: mediacodec implementation
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/mediacodec/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99
LOCAL_LDLIBS := -lmediandk
LOCAL_SRC_FILES := \
mediacodec/src/vdec_mediacodec.c
LOCAL_LIBRARIES := \
libfutils \
libh264 \
libh265 \
libmedia-buffers \
libmedia-buffers-memory \
libmedia-buffers-memory-generic \
libpomp \
libulog \
libvideo-decode-core \
libvideo-defs \
libvideo-metadata
include $(BUILD_LIBRARY)
endif
include $(CLEAR_VARS)
# turbojpeg implementation. can be enabled in the product configuration.
LOCAL_MODULE := libvideo-decode-turbojpeg
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library: turbojpeg implementation
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/turbojpeg/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99
LOCAL_SRC_FILES := \
turbojpeg/src/vdec_turbojpeg.c
LOCAL_LIBRARIES := \
libfutils \
libjpeg-turbo \
libmedia-buffers \
libmedia-buffers-memory \
libmedia-buffers-memory-generic \
libpomp \
libulog \
libvideo-decode-core \
libvideo-defs \
libvideo-metadata \
libyuv
include $(BUILD_LIBRARY)
include $(CLEAR_VARS)
# VideoCore MMAL (RaspberryPi) implementation.
# can be enabled in the product configuration
LOCAL_MODULE := libvideo-decode-videocoremmal
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library: videocoremmal implementation
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/videocoremmal/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99
LOCAL_SRC_FILES := \
videocoremmal/src/vdec_videocoremmal.c
LOCAL_LIBRARIES := \
libfutils \
libmedia-buffers \
libmedia-buffers-memory \
libpomp \
libulog \
libvideo-decode-core \
libvideo-defs \
mmal
ifeq ("$(TARGET_OS)","windows")
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_LIBRARY)
ifeq ("${TARGET_OS}", "darwin")
include $(CLEAR_VARS)
# VideoToolbox (iOS/macOS) implementation.
# can be enabled in the product configuration
LOCAL_MODULE := libvideo-decode-videotoolbox
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := Video decoding library: videotoolbox implementation
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/videotoolbox/include
LOCAL_CFLAGS := -DVDEC_API_EXPORTS -fvisibility=hidden -std=gnu99
LOCAL_SRC_FILES := \
videotoolbox/src/vdec_videotoolbox.c
LOCAL_LIBRARIES := \
libfutils \
libmedia-buffers \
libmedia-buffers-memory \
libmedia-buffers-memory-generic \
libpomp \
libulog \
libvideo-decode-core \
libvideo-defs \
libvideo-metadata
LOCAL_LDLIBS += \
-framework Foundation \
-framework CoreMedia \
-framework CoreVideo \
-framework VideoToolbox
include $(BUILD_LIBRARY)
endif
include $(CLEAR_VARS)
LOCAL_MODULE := vdec
LOCAL_DESCRIPTION := Video decoding program
LOCAL_CATEGORY_PATH := multimedia
LOCAL_SRC_FILES := tools/vdec.c
LOCAL_LIBRARIES := \
libfutils \
libh264 \
libh265 \
libmedia-buffers \
libmedia-buffers-memory \
libmedia-buffers-memory-generic \
libphoto-metadata \
libpomp \
libulog \
libvideo-decode \
libvideo-defs \
libvideo-raw
LOCAL_CONDITIONAL_LIBRARIES := \
OPTIONAL:mmal
ifeq ("$(TARGET_OS)-$(TARGET_OS_FLAVOUR)-$(TARGET_PRODUCT_VARIANT)","linux-generic-raspi")
LOCAL_LDLIBS += -lbcm_host -lvchiq_arm
else ifeq ("$(TARGET_OS)","windows")
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_EXECUTABLE)