1/* 2 * Copyright (C) 2024 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// Proto definition for camera feature combination query results 18 19syntax = "proto3"; 20 21package camera_feature_combination_proto; 22 23option java_multiple_files = true; 24 25enum Stabilization { 26 STABILIZATION_ANY = 0; 27 STABILIZATION_OFF = 1; 28 STABILIZATION_PREVIEW = 2; 29} 30 31// Must match values in ImageFormat.java and PixelFormat.java 32enum ImageFormat { 33 FMT_ANY = 0; // == ImageFormat.UNKNOWN 34 FMT_PRIVATE = 34; 35 FMT_YUV_420_888 = 35; 36 FMT_JPEG = 256; 37 FMT_JPEG_R = 4101; 38} 39 40enum DynamicRangeProfile { 41 PROFILE_ANY = 0; 42 PROFILE_STANDARD = 1; 43 PROFILE_HLG10 = 2; 44 PROFILE_HDR10 = 3; 45 PROFILE_HDR10_PLUS = 4; 46} 47 48enum StreamUsecase { 49 USECASE_ANY = 0; 50 USECASE_DEFAULT = 1; 51 USECASE_PREVIEW = 2; 52 USECASE_STILL_CAPTURE = 3; 53 USECASE_VIDEO_RECORD = 4; 54 USECASE_VIDEO_CALL = 5; 55 USECASE_PREVIEW_VIDEO_STILL = 6; 56} 57 58message Size { 59 uint32 width = 1; 60 uint32 height = 2; 61} 62 63message FrameRateRange { 64 // missing field = wildcard 65 optional uint32 min = 1; 66 uint32 max = 2; 67} 68 69message OutputConfiguration { 70 // missing field = wildcard (i.e. ANY_* value) 71 optional ImageFormat image_format = 1; 72 optional Size size = 2; 73 optional StreamUsecase stream_usecase = 3; 74 optional DynamicRangeProfile dynamic_range_profile = 4; 75} 76 77message SessionConfiguration { 78 repeated OutputConfiguration output_configurations = 1; 79 // missing field = wildcard (i.e. ANY_* value) 80 optional Stabilization stabilization = 2; 81 optional FrameRateRange frame_rate_range = 3; 82} 83 84message FeatureCombinationEntry { 85 SessionConfiguration session_configuration = 1; 86 bool is_supported = 2; 87} 88 89message FeatureCombinationForCamera { 90 string camera_id = 1; 91 repeated FeatureCombinationEntry entries = 2; 92} 93 94message FeatureCombinationDatabase { 95 // Android build fingerprint in the form of 96 // BRAND/PRODUCT/DEVICE:VERSION.RELEASE/ID/VERSION_INCREMENTAL:TYPE/TAGS 97 string build_fingerprint = 1; 98 // Timestamp of database creation in seconds since epoch 99 int64 timestamp_in_sec = 2; 100 // The feature combination info per primary camera 101 repeated FeatureCombinationForCamera feature_combination_for_camera = 3; 102} 103