compat: Add camera provider shim

* Namespace V1_0::helper has been deprecated in [1]. Wrap old symbols to
  accommodate this change.

[1] I8c3160497c1e2fe7a0a7155641f0e1f5e47ec32e

Change-Id: I4c9094add5c2484fd00b04e6236ba86ac693dbfd
This commit is contained in:
R0rt1z2 2024-05-04 12:36:10 +02:00 committed by Giovanni Ricca
parent 201615cf7c
commit 00551f44d6
No known key found for this signature in database
2 changed files with 99 additions and 0 deletions

View file

@ -296,6 +296,24 @@ cc_library {
vendor: true
}
cc_library_shared {
name: "libcamera_provider_shim",
shared_libs: [
"camera.device@1.0-impl",
"camera.device@3.2-impl",
"camera.device@3.3-impl",
"camera.device@3.4-impl",
"camera.device@3.5-impl",
"libcamera_metadata",
],
include_dirs: [
"hardware/interfaces/camera/common/default/include/",
"hardware/libhardware/include",
],
srcs: ["libcamera_provider/camera_provider.cpp"],
vendor: true,
}
cc_prebuilt_library_shared {
name: "libcrypto-v33",
vendor: true,

View file

@ -0,0 +1,81 @@
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "CameraModule.h"
using android::SortedVector;
using android::sp;
using android::hardware::camera::common::helper::CameraModule;
// android::hardare::camera::device::V1_0
extern "C" void*
_ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V1_014implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_2
extern "C" void*
_ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_214implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_3
extern "C" void*
_ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_314implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_4
extern "C" void*
_ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_414implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}
// android::hardware::camera::device::V3_5
extern "C" void*
_ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector);
extern "C" void*
_ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common4V1_06helper12CameraModuleEEERKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEERKNS_12SortedVectorINSC_4pairISI_SI_EEEE(
void* thisptr, const sp<CameraModule>& cameraModule, const std::string& str,
const SortedVector<std::pair<std::string, std::string>>& sortedVector) {
return _ZN7android8hardware6camera6device4V3_514implementation12CameraDeviceC1ENS_2spINS1_6common6helper12CameraModuleEEERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKNS_12SortedVectorINSB_4pairISH_SH_EEEE(
thisptr, cameraModule, str, sortedVector);
}