|
|
|
@ -6,7 +6,6 @@ import android.hardware.camera2.CameraCharacteristics;
|
|
|
|
|
import android.hardware.camera2.CameraManager;
|
|
|
|
|
import android.hardware.camera2.CameraMetadata;
|
|
|
|
|
import android.hardware.camera2.params.StreamConfigurationMap;
|
|
|
|
|
import android.text.TextUtils;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
import android.util.Size;
|
|
|
|
|
|
|
|
|
@ -45,6 +44,16 @@ public class CameraUtils {
|
|
|
|
|
Integer orientation = cameraCharacteristics.get(CameraCharacteristics.SENSOR_ORIENTATION);
|
|
|
|
|
builder.append(orientation == null ? "" : orientation.toString());
|
|
|
|
|
|
|
|
|
|
int[] capabilities = cameraCharacteristics.get(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES);
|
|
|
|
|
boolean hasRaw = false;
|
|
|
|
|
for (int capability : capabilities) {
|
|
|
|
|
if (capability == CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_RAW) {
|
|
|
|
|
hasRaw = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
builder.append(" raw=" + (hasRaw ? "1" : "0"));
|
|
|
|
|
|
|
|
|
|
StreamConfigurationMap map = cameraCharacteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
|
|
|
|
|
Size[] sizes = map.getOutputSizes(ImageFormat.YUV_420_888);
|
|
|
|
|
|
|
|
|
|