1 /* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include <log/log.h> 18 #include "HwCamera.h" 19 #include "list_fake_rotating_cameras.h" 20 #include "list_qemu_cameras.h" 21 #include "service_entry.h" 22 main()23int main() { 24 using ::android::hardware::camera::provider::implementation::hw::HwCameraFactory; 25 using ::android::hardware::camera::provider::implementation::hw::listFakeRotatingCameras; 26 using ::android::hardware::camera::provider::implementation::hw::listQemuCameras; 27 using ::android::hardware::camera::provider::implementation::Span; 28 29 std::vector<HwCameraFactory> availableCameras; 30 { 31 const auto cameraAppender = [&availableCameras](HwCameraFactory c){ 32 availableCameras.push_back(std::move(c)); 33 }; 34 35 listQemuCameras(cameraAppender); 36 listFakeRotatingCameras(cameraAppender); 37 } 38 39 return serviceEntry( 40 10, 41 Span<const HwCameraFactory>(availableCameras.begin(), 42 availableCameras.end()), 43 4); 44 } 45