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 package com.google.jetpackcamera.settings.model 17 18 data class SystemConstraints( 19 val availableLenses: List<LensFacing>, 20 val perLensConstraints: Map<LensFacing, CameraConstraints> 21 ) 22 23 data class CameraConstraints( 24 val supportedStabilizationModes: Set<SupportedStabilizationMode>, 25 val supportedFixedFrameRates: Set<Int>, 26 val supportedDynamicRanges: Set<DynamicRange> 27 ) 28 29 /** 30 * Useful set of constraints for testing 31 */ 32 val TYPICAL_SYSTEM_CONSTRAINTS = 33 SystemConstraints( 34 availableLenses = listOf(LensFacing.FRONT, LensFacing.BACK), <lambda>null35 perLensConstraints = buildMap { 36 for (lensFacing in listOf(LensFacing.FRONT, LensFacing.BACK)) { 37 put( 38 lensFacing, 39 CameraConstraints( 40 supportedFixedFrameRates = setOf(15, 30), 41 supportedStabilizationModes = emptySet(), 42 supportedDynamicRanges = setOf(DynamicRange.SDR) 43 ) 44 ) 45 } 46 } 47 ) 48