1 /* 2 * Copyright 2021 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 package androidx.camera.extensions.internal.sessionprocessor; 18 19 import org.jspecify.annotations.NonNull; 20 import org.jspecify.annotations.Nullable; 21 22 import java.util.List; 23 24 /** 25 * A config representing a {@link android.hardware.camera2.params.OutputConfiguration} where 26 * Surface will be created by the information in this config. 27 */ 28 interface Camera2OutputConfig { 29 /** 30 * Gets the id of this output config. The id can be used to identify the stream in vendor 31 * implementations. 32 */ getId()33 int getId(); 34 35 /** 36 * Gets the surface group id. Vendor can use the surface group id to share memory between 37 * Surfaces. 38 */ getSurfaceGroupId()39 int getSurfaceGroupId(); 40 41 /** 42 * Gets the physical camera id. Returns null if not specified. 43 */ getPhysicalCameraId()44 @Nullable String getPhysicalCameraId(); 45 46 /** 47 * If non-empty, enable surface sharing and add the surfaces constructed by the returned 48 * Camera2OutputConfigs. 49 */ getSurfaceSharingOutputConfigs()50 @NonNull List<Camera2OutputConfig> getSurfaceSharingOutputConfigs(); 51 } 52