Add a CLI tool to dump list of cameras on Samsung Q vendor
This commit is contained in:
parent
cfe638aa94
commit
deb3e53411
@ -210,3 +210,14 @@ cc_binary {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cc_binary {
|
||||||
|
name: "sec-camera-list",
|
||||||
|
srcs: [
|
||||||
|
"sec-camera-list.cpp",
|
||||||
|
],
|
||||||
|
shared_libs: [
|
||||||
|
"vendor.samsung.hardware.camera.provider@3.0",
|
||||||
|
"libutils",
|
||||||
|
"libhidlbase",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
15
cmds/sec-camera-list.cpp
Normal file
15
cmds/sec-camera-list.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <vendor/samsung/hardware/camera/provider/3.0/ISehCameraProvider.h>
|
||||||
|
|
||||||
|
using ::vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider;
|
||||||
|
using ::android::sp;
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
auto svc = ISehCameraProvider::getService("legacy/0");
|
||||||
|
auto cb = [](::android::hardware::camera::common::V1_0::Status status, ::android::hardware::hidl_vec<::android::hardware::hidl_string> ids) {
|
||||||
|
for(auto id: ids) {
|
||||||
|
std::cerr << "id = " << id << std::endl;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
svc->sehGetCameraIdList(cb);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user