From 5033aa19cd443559777b84acc63cad1177121cc9 Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Tue, 24 Jul 2018 11:56:19 -0700 Subject: [PATCH] Convert libcameraservice Android.mk -> Android.bp module This would allow other client modules defined in Android.bp to include libcameraservice as a dependency. Bug: 110364143 Test: mm -j64 Change-Id: Ia3be563e4fbb27155d6a46278931ca689b8cf8fd Signed-off-by: Jayant Chowdhary --- services/camera/libcameraservice/Android.bp | 106 ++++++++++++++++++++ services/camera/libcameraservice/Android.mk | 84 +--------------- 2 files changed, 107 insertions(+), 83 deletions(-) create mode 100644 services/camera/libcameraservice/Android.bp diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp new file mode 100644 index 0000000000..eccbe54941 --- /dev/null +++ b/services/camera/libcameraservice/Android.bp @@ -0,0 +1,106 @@ +// Copyright 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +// libcameraservice +// + +cc_library_shared { + name: "libcameraservice", + + // Camera service source + + srcs: [ + "CameraService.cpp", + "CameraFlashlight.cpp", + "common/Camera2ClientBase.cpp", + "common/CameraDeviceBase.cpp", + "common/CameraProviderManager.cpp", + "common/FrameProcessorBase.cpp", + "api1/CameraClient.cpp", + "api1/Camera2Client.cpp", + "api1/client2/Parameters.cpp", + "api1/client2/FrameProcessor.cpp", + "api1/client2/StreamingProcessor.cpp", + "api1/client2/JpegProcessor.cpp", + "api1/client2/CallbackProcessor.cpp", + "api1/client2/JpegCompressor.cpp", + "api1/client2/CaptureSequencer.cpp", + "api1/client2/ZslProcessor.cpp", + "api2/CameraDeviceClient.cpp", + "device1/CameraHardwareInterface.cpp", + "device3/Camera3Device.cpp", + "device3/Camera3Stream.cpp", + "device3/Camera3IOStreamBase.cpp", + "device3/Camera3InputStream.cpp", + "device3/Camera3OutputStream.cpp", + "device3/Camera3DummyStream.cpp", + "device3/Camera3SharedOutputStream.cpp", + "device3/StatusTracker.cpp", + "device3/Camera3BufferManager.cpp", + "device3/Camera3StreamSplitter.cpp", + "device3/DistortionMapper.cpp", + "gui/RingBufferConsumer.cpp", + "utils/CameraTraces.cpp", + "utils/AutoConditionLock.cpp", + "utils/TagMonitor.cpp", + "utils/LatencyHistogram.cpp", + ], + + shared_libs: [ + "libui", + "liblog", + "libutilscallstack", + "libutils", + "libbinder", + "libcutils", + "libmedia", + "libmediautils", + "libcamera_client", + "libcamera_metadata", + "libfmq", + "libgui", + "libhardware", + "libhidlbase", + "libhidltransport", + "libjpeg", + "libmemunreachable", + "android.hardware.camera.common@1.0", + "android.hardware.camera.provider@2.4", + "android.hardware.camera.device@1.0", + "android.hardware.camera.device@3.2", + "android.hardware.camera.device@3.3", + "android.hardware.camera.device@3.4", + ], + + export_shared_lib_headers: [ + "libbinder", + "libcamera_client", + "libfmq", + ], + + include_dirs: [ + "system/media/private/camera/include", + "frameworks/native/include/media/openmax", + ], + + export_include_dirs: ["."], + + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + ], + +} diff --git a/services/camera/libcameraservice/Android.mk b/services/camera/libcameraservice/Android.mk index 96261ab0ef..4cfecfdfa1 100644 --- a/services/camera/libcameraservice/Android.mk +++ b/services/camera/libcameraservice/Android.mk @@ -14,91 +14,9 @@ LOCAL_PATH:= $(call my-dir) -# -# libcameraservice -# - include $(CLEAR_VARS) -# Camera service source - -LOCAL_SRC_FILES := \ - CameraService.cpp \ - CameraFlashlight.cpp \ - common/Camera2ClientBase.cpp \ - common/CameraDeviceBase.cpp \ - common/CameraProviderManager.cpp \ - common/FrameProcessorBase.cpp \ - api1/CameraClient.cpp \ - api1/Camera2Client.cpp \ - api1/client2/Parameters.cpp \ - api1/client2/FrameProcessor.cpp \ - api1/client2/StreamingProcessor.cpp \ - api1/client2/JpegProcessor.cpp \ - api1/client2/CallbackProcessor.cpp \ - api1/client2/JpegCompressor.cpp \ - api1/client2/CaptureSequencer.cpp \ - api1/client2/ZslProcessor.cpp \ - api2/CameraDeviceClient.cpp \ - device1/CameraHardwareInterface.cpp \ - device3/Camera3Device.cpp \ - device3/Camera3Stream.cpp \ - device3/Camera3IOStreamBase.cpp \ - device3/Camera3InputStream.cpp \ - device3/Camera3OutputStream.cpp \ - device3/Camera3DummyStream.cpp \ - device3/Camera3SharedOutputStream.cpp \ - device3/StatusTracker.cpp \ - device3/Camera3BufferManager.cpp \ - device3/Camera3StreamSplitter.cpp \ - device3/DistortionMapper.cpp \ - gui/RingBufferConsumer.cpp \ - utils/CameraTraces.cpp \ - utils/AutoConditionLock.cpp \ - utils/TagMonitor.cpp \ - utils/LatencyHistogram.cpp - -LOCAL_SHARED_LIBRARIES:= \ - libui \ - liblog \ - libutilscallstack \ - libutils \ - libbinder \ - libcutils \ - libmedia \ - libmediautils \ - libcamera_client \ - libcamera_metadata \ - libfmq \ - libgui \ - libhardware \ - libhidlbase \ - libhidltransport \ - libjpeg \ - libmemunreachable \ - android.hardware.camera.common@1.0 \ - android.hardware.camera.provider@2.4 \ - android.hardware.camera.device@1.0 \ - android.hardware.camera.device@3.2 \ - android.hardware.camera.device@3.3 \ - android.hardware.camera.device@3.4 - -LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbinder libcamera_client libfmq - -LOCAL_C_INCLUDES += \ - system/media/private/camera/include \ - frameworks/native/include/media/openmax - -LOCAL_EXPORT_C_INCLUDE_DIRS := \ - frameworks/av/services/camera/libcameraservice - -LOCAL_CFLAGS += -Wall -Wextra -Werror - -LOCAL_MODULE:= libcameraservice - -include $(BUILD_SHARED_LIBRARY) - -# Build tests too +# Build tests include $(LOCAL_PATH)/tests/Android.mk