1 /* 2 * Copyright 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 package androidx.camera.core; 18 19 import org.jspecify.annotations.NonNull; 20 21 import java.util.Set; 22 23 /** 24 * ImageCaptureCapabilities is used to query {@link ImageCapture} use case capabilities on the 25 * device. 26 */ 27 public interface ImageCaptureCapabilities { 28 /** 29 * Returns if the takePicture() call in {@link ImageCapture} is capable of outputting 30 * postview images. 31 * 32 * <p>A postview image is a low-quality image that's produced earlier during image capture 33 * than the final high-quality image, and can be used as a thumbnail or placeholder until the 34 * final image is ready. 35 * 36 * If supported, apps can enable the postview using 37 * {@link ImageCapture.Builder#setPostviewEnabled(boolean)}. 38 */ isPostviewSupported()39 boolean isPostviewSupported(); 40 41 /** 42 * Returns if the takePicture() call in {@link ImageCapture} is capable of notifying the 43 * {@link ImageCapture.OnImageSavedCallback#onCaptureProcessProgressed(int)} or 44 * {@link ImageCapture.OnImageCapturedCallback#onCaptureProcessProgressed(int)} callback to 45 * the apps. 46 */ isCaptureProcessProgressSupported()47 boolean isCaptureProcessProgressSupported(); 48 49 /** 50 * Gets the supported {@link ImageCapture.OutputFormat} set. 51 * 52 * <p>The set returned will always contain {@link ImageCapture.OutputFormat#OUTPUT_FORMAT_JPEG} 53 * format, support for other formats will vary by camera. 54 * 55 * @return a set of supported output formats. 56 * 57 * @see ImageCapture.Builder#setOutputFormat(int) 58 */ getSupportedOutputFormats()59 @NonNull Set<@ImageCapture.OutputFormat Integer> getSupportedOutputFormats(); 60 } 61