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.impl.advanced; 18 19 import android.annotation.SuppressLint; 20 21 import java.util.List; 22 23 /** 24 * A config representing a {@link android.hardware.camera2.params.OutputConfiguration} where 25 * Surface will be created by the information in this config. 26 */ 27 @SuppressLint("UnknownNullness") 28 public interface Camera2OutputConfigImpl { 29 /** 30 * Gets thd 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 String getPhysicalCameraId(); 45 46 /** 47 * If non-null, enable surface sharing and add the surface constructed by the return 48 * Camera2OutputConfig. 49 */ getSurfaceSharingOutputConfigs()50 List<Camera2OutputConfigImpl> getSurfaceSharingOutputConfigs(); 51 } 52