Add a CLI tool to dump list of cameras on Samsung Q vendor

This commit is contained in:
Pierre-Hugues Husson 2020-05-14 19:35:29 +02:00
parent cfe638aa94
commit deb3e53411
2 changed files with 26 additions and 0 deletions

View File

@ -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
View 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);
}