blob: 1789304d201b3be07b85ad4eb37d7d9adee95154 (
plain)
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
LOCAL_PATH:= $(call my-dir)
OMAP4_NEXT_FOLDER := hardware/ti/omap4
include $(LOCAL_PATH)/android-api.mk
TI_CAMERAHAL_INTERFACE ?= ALL
TI_CAMERAHAL_COMMON_CFLAGS := \
$(ANDROID_API_CFLAGS) \
-DLOG_TAG=\"CameraHal\" \
-DCOPY_IMAGE_BUFFER \
-fno-short-enums
ifdef TI_CAMERAHAL_DEBUG_ENABLED
# Enable CameraHAL debug logs
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_DEBUG
endif
ifdef TI_CAMERAHAL_VERBOSE_DEBUG_ENABLED
# Enable CameraHAL verbose debug logs
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_DEBUG_VERBOSE
endif
ifdef TI_CAMERAHAL_DEBUG_FUNCTION_NAMES
# Enable CameraHAL function enter/exit logging
TI_CAMERAHAL_COMMON_CFLAGS += -DTI_UTILS_FUNCTION_LOGGER_ENABLE
endif
ifdef TI_CAMERAHAL_DEBUG_TIMESTAMPS
# Enable timestamp logging
TI_CAMERAHAL_COMMON_CFLAGS += -DTI_UTILS_DEBUG_USE_TIMESTAMPS
endif
ifndef TI_CAMERAHAL_DONT_USE_RAW_IMAGE_SAVING
# Enabled saving RAW images to file
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_USE_RAW_IMAGE_SAVING
endif
ifdef TI_CAMERAHAL_PROFILING
# Enable OMX Camera component profiling
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_OMX_PROFILING
endif
ifdef TI_CAMERAHAL_MAX_CAMERAS_SUPPORTED
TI_CAMERAHAL_COMMON_CFLAGS += -DMAX_CAMERAS_SUPPORTED=$(TI_CAMERAHAL_MAX_CAMERAS_SUPPORTED)
endif
ifdef TI_CAMERAHAL_TREAT_FRONT_AS_BACK
TI_CAMERAHAL_COMMON_CFLAGS += -DTREAT_FRONT_AS_BACK
endif
ifeq ($(findstring omap5, $(TARGET_BOARD_PLATFORM)),omap5)
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_OMAP5_CAPTURE_MODES
endif
ifeq ($(ENHANCED_DOMX),true)
TI_CAMERAHAL_COMMON_CFLAGS += -DENHANCED_DOMX
endif
ifdef ARCH_ARM_HAVE_NEON
TI_CAMERAHAL_COMMON_CFLAGS += -DARCH_ARM_HAVE_NEON
endif
ifeq ($(BOARD_VENDOR),motorola-omap4)
TI_CAMERAHAL_COMMON_CFLAGS += -DMOTOROLA_CAMERA
endif
ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),piranha)
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_PIRANHA
endif
ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),tuna)
TI_CAMERAHAL_COMMON_CFLAGS += -DCAMERAHAL_TUNA
endif
TI_CAMERAHAL_OMX_CFLAGS := -DOMX_CAMERA_ADAPTER
TI_CAMERAHAL_USB_CFLAGS := -DV4L_CAMERA_ADAPTER
TI_CAMERAHAL_COMMON_INCLUDES := \
$(OMAP4_NEXT_FOLDER)/include \
$(OMAP4_NEXT_FOLDER)/hwc \
external/jpeg \
external/jhead \
$(OMAP4_NEXT_FOLDER)/libtiutils \
$(LOCAL_PATH)/inc \
system/media/camera/include
ifdef ANDROID_API_JB_OR_LATER
TI_CAMERAHAL_COMMON_INCLUDES += \
frameworks/native/include/media/hardware
else
TI_CAMERAHAL_COMMON_INCLUDES += \
frameworks/base/include/media/stagefright
endif
TI_CAMERAHAL_OMX_INCLUDES := \
frameworks/native/include/media/openmax \
$(DOMX_PATH)/mm_osal/inc \
$(DOMX_PATH)/omx_core/inc \
$(LOCAL_PATH)/inc/OMXCameraAdapter
TI_CAMERAHAL_USB_INCLUDES := \
$(LOCAL_PATH)/inc/V4LCameraAdapter
TI_CAMERAHAL_COMMON_SRC := \
CameraHal_Module.cpp \
CameraHal.cpp \
CameraHalUtilClasses.cpp \
AppCallbackNotifier.cpp \
ANativeWindowDisplayAdapter.cpp \
BufferSourceAdapter.cpp \
CameraProperties.cpp \
BaseCameraAdapter.cpp \
MemoryManager.cpp \
Encoder_libjpeg.cpp \
Decoder_libjpeg.cpp \
SensorListener.cpp \
NV12_resize.cpp \
CameraParameters.cpp \
TICameraParameters.cpp \
CameraHalCommon.cpp \
FrameDecoder.cpp \
SwFrameDecoder.cpp \
OmxFrameDecoder.cpp \
DecoderFactory.cpp
TI_CAMERAHAL_OMX_SRC := \
OMXCameraAdapter/OMX3A.cpp \
OMXCameraAdapter/OMXAlgo.cpp \
OMXCameraAdapter/OMXCameraAdapter.cpp \
OMXCameraAdapter/OMXCapabilities.cpp \
OMXCameraAdapter/OMXCapture.cpp \
OMXCameraAdapter/OMXReprocess.cpp \
OMXCameraAdapter/OMXDefaults.cpp \
OMXCameraAdapter/OMXExif.cpp \
OMXCameraAdapter/OMXFD.cpp \
OMXCameraAdapter/OMXFocus.cpp \
OMXCameraAdapter/OMXMetadata.cpp \
OMXCameraAdapter/OMXZoom.cpp \
OMXCameraAdapter/OMXDccDataSave.cpp
ifdef TI_CAMERAHAL_USES_LEGACY_DOMX_DCC
TI_CAMERAHAL_OMX_CFLAGS += -DUSES_LEGACY_DOMX_DCC
else
TI_CAMERAHAL_OMX_SRC += OMXCameraAdapter/OMXDCC.cpp
endif
TI_CAMERAHAL_USB_SRC := \
V4LCameraAdapter/V4LCameraAdapter.cpp \
V4LCameraAdapter/V4LCapabilities.cpp
TI_CAMERAHAL_EXIF_LIBRARY := libexif
# libexif is now libjhead in later API levels.
ifdef ANDROID_API_KK_OR_LATER
ifdef ANDROID_API_LP_OR_LATER
TI_CAMERAHAL_EXIF_LIBRARY := libjhead
else ifneq ($(filter 4.4.3 4.4.4,$(PLATFORM_VERSION)),)
# Only 4.4.3 and 4.4.4 KK use libjhead
TI_CAMERAHAL_EXIF_LIBRARY := libjhead
endif
endif
TI_CAMERAHAL_COMMON_SHARED_LIBRARIES := \
libui \
libbinder \
libutils \
libcutils \
liblog \
libtiutils \
libcamera_client \
libgui \
libjpeg \
$(TI_CAMERAHAL_EXIF_LIBRARY)
ifdef ANDROID_API_JB_MR1_OR_LATER
TI_CAMERAHAL_COMMON_SHARED_LIBRARIES += \
libion_ti
TI_CAMERAHAL_COMMON_CFLAGS += -DUSE_LIBION_TI
else
TI_CAMERAHAL_COMMON_SHARED_LIBRARIES += \
libion
endif
TI_CAMERAHAL_OMX_SHARED_LIBRARIES := \
libmm_osal \
libOMX_Core \
libdomx
ifdef OMAP_ENHANCEMENT_CPCAM
TI_CAMERAHAL_COMMON_STATIC_LIBRARIES += \
libcpcamcamera_client
endif
ifeq ($(TI_CAMERAHAL_INTERFACE),OMX)
# ====================
# OMX Camera Adapter
# --------------------
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(TI_CAMERAHAL_COMMON_SRC) \
$(TI_CAMERAHAL_OMX_SRC)
LOCAL_C_INCLUDES := \
$(TI_CAMERAHAL_COMMON_INCLUDES) \
$(TI_CAMERAHAL_OMX_INCLUDES)
LOCAL_SHARED_LIBRARIES := \
$(TI_CAMERAHAL_COMMON_SHARED_LIBRARIES) \
$(TI_CAMERAHAL_OMX_SHARED_LIBRARIES)
LOCAL_STATIC_LIBRARIES := $(TI_CAMERAHAL_COMMON_STATIC_LIBRARIES)
LOCAL_CFLAGS := \
$(TI_CAMERAHAL_COMMON_CFLAGS) \
$(TI_CAMERAHAL_OMX_CFLAGS)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE := camera.tuna
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
else ifeq ($(TI_CAMERAHAL_INTERFACE),USB)
# ====================
# USB Camera Adapter
# --------------------
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(TI_CAMERAHAL_COMMON_SRC) \
$(TI_CAMERAHAL_USB_SRC)
LOCAL_C_INCLUDES := \
$(TI_CAMERAHAL_COMMON_INCLUDES) \
$(TI_CAMERAHAL_USB_INCLUDES)
LOCAL_SHARED_LIBRARIES := \
$(TI_CAMERAHAL_COMMON_SHARED_LIBRARIES)
LOCAL_STATIC_LIBRARIES := $(TI_CAMERAHAL_COMMON_STATIC_LIBRARIES)
LOCAL_CFLAGS := \
$(TI_CAMERAHAL_COMMON_CFLAGS) \
$(TI_CAMERAHAL_USB_CFLAGS)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE := camera.tuna
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
else ifeq ($(TI_CAMERAHAL_INTERFACE),ALL)
# =====================
# ALL Camera Adapters
# ---------------------
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(TI_CAMERAHAL_COMMON_SRC) \
$(TI_CAMERAHAL_OMX_SRC) \
$(TI_CAMERAHAL_USB_SRC)
LOCAL_C_INCLUDES := \
$(TI_CAMERAHAL_COMMON_INCLUDES) \
$(TI_CAMERAHAL_OMX_INCLUDES) \
$(TI_CAMERAHAL_USB_INCLUDES)
LOCAL_SHARED_LIBRARIES := \
$(TI_CAMERAHAL_COMMON_SHARED_LIBRARIES) \
$(TI_CAMERAHAL_OMX_SHARED_LIBRARIES)
LOCAL_STATIC_LIBRARIES := $(TI_CAMERAHAL_COMMON_STATIC_LIBRARIES)
LOCAL_CFLAGS := \
$(TI_CAMERAHAL_COMMON_CFLAGS) \
$(TI_CAMERAHAL_OMX_CFLAGS) \
$(TI_CAMERAHAL_USB_CFLAGS)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_MODULE := camera.tuna
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
endif
$(clear-android-api-vars)
|