Merge "Camera: Make stream use case to be 64 bit" into tm-dev
This commit is contained in:
@@ -17408,7 +17408,7 @@ package android.hardware.camera2 {
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Long> REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> SCALER_AVAILABLE_ROTATE_AND_CROP_MODES;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> SCALER_AVAILABLE_STREAM_USE_CASES;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<long[]> SCALER_AVAILABLE_STREAM_USE_CASES;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SCALER_CROPPING_TYPE;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Size> SCALER_DEFAULT_SECURE_IMAGE_SIZE;
|
||||
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS;
|
||||
@@ -18193,7 +18193,7 @@ package android.hardware.camera2.params {
|
||||
method public int get10BitFormat();
|
||||
method @NonNull public java.util.List<android.util.Size> getAvailableSizes();
|
||||
method public int getFormat();
|
||||
method public int getStreamUseCase();
|
||||
method public long getStreamUseCase();
|
||||
method public boolean is10BitCapable();
|
||||
method public boolean isInput();
|
||||
method public boolean isMaximumSize();
|
||||
@@ -18251,7 +18251,7 @@ package android.hardware.camera2.params {
|
||||
method public long getDynamicRangeProfile();
|
||||
method public int getMaxSharedSurfaceCount();
|
||||
method public int getMirrorMode();
|
||||
method public int getStreamUseCase();
|
||||
method public long getStreamUseCase();
|
||||
method @Nullable public android.view.Surface getSurface();
|
||||
method public int getSurfaceGroupId();
|
||||
method @NonNull public java.util.List<android.view.Surface> getSurfaces();
|
||||
@@ -18261,7 +18261,7 @@ package android.hardware.camera2.params {
|
||||
method public void setDynamicRangeProfile(long);
|
||||
method public void setMirrorMode(int);
|
||||
method public void setPhysicalCameraId(@Nullable String);
|
||||
method public void setStreamUseCase(int);
|
||||
method public void setStreamUseCase(long);
|
||||
method public void setTimestampBase(int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.hardware.camera2.params.OutputConfiguration> CREATOR;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class CameraStreamStats implements Parcelable {
|
||||
private float[] mHistogramBins;
|
||||
private long[] mHistogramCounts;
|
||||
private long mDynamicRangeProfile;
|
||||
private int mStreamUseCase;
|
||||
private long mStreamUseCase;
|
||||
|
||||
private static final String TAG = "CameraStreamStats";
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CameraStreamStats implements Parcelable {
|
||||
public CameraStreamStats(int width, int height, int format, float maxPreviewFps,
|
||||
int dataSpace, long usage, long requestCount, long errorCount,
|
||||
int startLatencyMs, int maxHalBuffers, int maxAppBuffers, long dynamicRangeProfile,
|
||||
int streamUseCase) {
|
||||
long streamUseCase) {
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
mFormat = format;
|
||||
@@ -135,7 +135,7 @@ public class CameraStreamStats implements Parcelable {
|
||||
dest.writeFloatArray(mHistogramBins);
|
||||
dest.writeLongArray(mHistogramCounts);
|
||||
dest.writeLong(mDynamicRangeProfile);
|
||||
dest.writeInt(mStreamUseCase);
|
||||
dest.writeLong(mStreamUseCase);
|
||||
}
|
||||
|
||||
public void readFromParcel(Parcel in) {
|
||||
@@ -154,7 +154,7 @@ public class CameraStreamStats implements Parcelable {
|
||||
mHistogramBins = in.createFloatArray();
|
||||
mHistogramCounts = in.createLongArray();
|
||||
mDynamicRangeProfile = in.readLong();
|
||||
mStreamUseCase = in.readInt();
|
||||
mStreamUseCase = in.readLong();
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
@@ -217,7 +217,7 @@ public class CameraStreamStats implements Parcelable {
|
||||
return mDynamicRangeProfile;
|
||||
}
|
||||
|
||||
public int getStreamUseCase() {
|
||||
public long getStreamUseCase() {
|
||||
return mStreamUseCase;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3563,8 +3563,8 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
|
||||
*/
|
||||
@PublicKey
|
||||
@NonNull
|
||||
public static final Key<int[]> SCALER_AVAILABLE_STREAM_USE_CASES =
|
||||
new Key<int[]>("android.scaler.availableStreamUseCases", int[].class);
|
||||
public static final Key<long[]> SCALER_AVAILABLE_STREAM_USE_CASES =
|
||||
new Key<long[]>("android.scaler.availableStreamUseCases", long[].class);
|
||||
|
||||
/**
|
||||
* <p>An array of mandatory stream combinations with stream use cases.
|
||||
|
||||
@@ -66,7 +66,7 @@ public final class MandatoryStreamCombination {
|
||||
private final boolean mIsUltraHighResolution;
|
||||
private final boolean mIsMaximumSize;
|
||||
private final boolean mIs10BitCapable;
|
||||
private final int mStreamUseCase;
|
||||
private final long mStreamUseCase;
|
||||
|
||||
/**
|
||||
* Create a new {@link MandatoryStreamInformation}.
|
||||
@@ -168,7 +168,7 @@ public final class MandatoryStreamCombination {
|
||||
*/
|
||||
public MandatoryStreamInformation(@NonNull List<Size> availableSizes, @Format int format,
|
||||
boolean isMaximumSize, boolean isInput, boolean isUltraHighResolution,
|
||||
boolean is10BitCapable, @StreamUseCase int streamUseCase) {
|
||||
boolean is10BitCapable, @StreamUseCase long streamUseCase) {
|
||||
if (availableSizes.isEmpty()) {
|
||||
throw new IllegalArgumentException("No available sizes");
|
||||
}
|
||||
@@ -308,9 +308,9 @@ public final class MandatoryStreamCombination {
|
||||
* For {@link MandatoryStreamInformation} belonging to other mandatory stream
|
||||
* combinations, the return value will be DEFAULT. </p>
|
||||
*
|
||||
* @return the integer stream use case.
|
||||
* @return the long integer stream use case.
|
||||
*/
|
||||
public @StreamUseCase int getStreamUseCase() {
|
||||
public @StreamUseCase long getStreamUseCase() {
|
||||
return mStreamUseCase;
|
||||
}
|
||||
|
||||
@@ -365,15 +365,15 @@ public final class MandatoryStreamCombination {
|
||||
/**
|
||||
* Short hand for stream use cases
|
||||
*/
|
||||
private static final int STREAM_USE_CASE_PREVIEW =
|
||||
private static final long STREAM_USE_CASE_PREVIEW =
|
||||
CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW;
|
||||
private static final int STREAM_USE_CASE_STILL_CAPTURE =
|
||||
private static final long STREAM_USE_CASE_STILL_CAPTURE =
|
||||
CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE;
|
||||
private static final int STREAM_USE_CASE_RECORD =
|
||||
private static final long STREAM_USE_CASE_RECORD =
|
||||
CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD;
|
||||
private static final int STREAM_USE_CASE_PREVIEW_VIDEO_STILL =
|
||||
private static final long STREAM_USE_CASE_PREVIEW_VIDEO_STILL =
|
||||
CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL;
|
||||
private static final int STREAM_USE_CASE_VIDEO_CALL =
|
||||
private static final long STREAM_USE_CASE_VIDEO_CALL =
|
||||
CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL;
|
||||
|
||||
/**
|
||||
@@ -471,12 +471,12 @@ public final class MandatoryStreamCombination {
|
||||
private static final class StreamTemplate {
|
||||
public int mFormat;
|
||||
public SizeThreshold mSizeThreshold;
|
||||
public int mStreamUseCase;
|
||||
public long mStreamUseCase;
|
||||
public StreamTemplate(int format, SizeThreshold sizeThreshold) {
|
||||
this(format, sizeThreshold, CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT);
|
||||
}
|
||||
public StreamTemplate(@Format int format, @NonNull SizeThreshold sizeThreshold,
|
||||
@StreamUseCase int streamUseCase) {
|
||||
@StreamUseCase long streamUseCase) {
|
||||
mFormat = format;
|
||||
mSizeThreshold = sizeThreshold;
|
||||
mStreamUseCase = streamUseCase;
|
||||
|
||||
@@ -918,9 +918,9 @@ public final class OutputConfiguration implements Parcelable {
|
||||
* @throws IllegalArgumentException If the streamUseCase isn't within the range of valid
|
||||
* values.
|
||||
*/
|
||||
public void setStreamUseCase(@StreamUseCase int streamUseCase) {
|
||||
public void setStreamUseCase(@StreamUseCase long streamUseCase) {
|
||||
// Verify that the value is in range
|
||||
int maxUseCaseValue = CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL;
|
||||
long maxUseCaseValue = CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL;
|
||||
if (streamUseCase > maxUseCaseValue &&
|
||||
streamUseCase < CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_VENDOR_START) {
|
||||
throw new IllegalArgumentException("Not a valid stream use case value " +
|
||||
@@ -938,7 +938,7 @@ public final class OutputConfiguration implements Parcelable {
|
||||
*
|
||||
* @return the currently set stream use case
|
||||
*/
|
||||
public int getStreamUseCase() {
|
||||
public long getStreamUseCase() {
|
||||
return mStreamUseCase;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ public final class OutputConfiguration implements Parcelable {
|
||||
String physicalCameraId = source.readString();
|
||||
boolean isMultiResolutionOutput = source.readInt() == 1;
|
||||
int[] sensorPixelModesUsed = source.createIntArray();
|
||||
int streamUseCase = source.readInt();
|
||||
long streamUseCase = source.readLong();
|
||||
|
||||
checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant");
|
||||
long dynamicRangeProfile = source.readLong();
|
||||
@@ -1218,7 +1218,7 @@ public final class OutputConfiguration implements Parcelable {
|
||||
// writeList doesn't seem to work well with Integer list.
|
||||
dest.writeIntArray(convertIntegerToIntList(mSensorPixelModesUsed));
|
||||
dest.writeLong(mDynamicRangeProfile);
|
||||
dest.writeInt(mStreamUseCase);
|
||||
dest.writeLong(mStreamUseCase);
|
||||
dest.writeInt(mTimestampBase);
|
||||
dest.writeInt(mMirrorMode);
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@ public final class OutputConfiguration implements Parcelable {
|
||||
// Dynamic range profile
|
||||
private long mDynamicRangeProfile;
|
||||
// Stream use case
|
||||
private int mStreamUseCase;
|
||||
private long mStreamUseCase;
|
||||
// Timestamp base
|
||||
private int mTimestampBase;
|
||||
// Mirroring mode
|
||||
|
||||
@@ -66,5 +66,5 @@ message CameraStreamProto {
|
||||
// The dynamic range profile of the stream
|
||||
optional int64 dynamic_range_profile = 14;
|
||||
// The stream use case
|
||||
optional int32 stream_use_case = 15;
|
||||
optional int64 stream_use_case = 15;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user