Initial commit
This commit is contained in:
@@ -0,0 +1,174 @@
|
||||
package com.bottle.hp.album.capture.configuration;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class CaptureConfiguration implements Parcelable {
|
||||
public static final Parcelable.Creator<CaptureConfiguration> CREATOR = new Parcelable.Creator<CaptureConfiguration>() { // from class: com.bottle.hp.album.capture.configuration.CaptureConfiguration.1
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public CaptureConfiguration createFromParcel(Parcel parcel) {
|
||||
return new CaptureConfiguration(parcel);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public CaptureConfiguration[] newArray(int i) {
|
||||
return new CaptureConfiguration[i];
|
||||
}
|
||||
};
|
||||
private static final int MBYTE_TO_BYTE = 1048576;
|
||||
private static final int MSEC_TO_SEC = 1000;
|
||||
public static final int NO_DURATION_LIMIT = -1;
|
||||
public static final int NO_FILESIZE_LIMIT = -1;
|
||||
private int AUDIO_ENCODER;
|
||||
private int AUDIO_SOURCE;
|
||||
private int OUTPUT_FORMAT;
|
||||
private int VIDEO_ENCODER;
|
||||
private int VIDEO_SOURCE;
|
||||
private int mBitrate;
|
||||
private int mMaxDurationMs;
|
||||
private int mMaxFilesizeBytes;
|
||||
private int mVideoHeight;
|
||||
private int mVideoWidth;
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getAudioEncoder() {
|
||||
return this.AUDIO_ENCODER;
|
||||
}
|
||||
|
||||
public int getAudioSource() {
|
||||
return this.AUDIO_SOURCE;
|
||||
}
|
||||
|
||||
public int getMaxCaptureDuration() {
|
||||
return this.mMaxDurationMs;
|
||||
}
|
||||
|
||||
public int getMaxCaptureFileSize() {
|
||||
return this.mMaxFilesizeBytes;
|
||||
}
|
||||
|
||||
public int getOutputFormat() {
|
||||
return this.OUTPUT_FORMAT;
|
||||
}
|
||||
|
||||
public int getVideoBitrate() {
|
||||
return this.mBitrate;
|
||||
}
|
||||
|
||||
public int getVideoEncoder() {
|
||||
return this.VIDEO_ENCODER;
|
||||
}
|
||||
|
||||
public int getVideoHeight() {
|
||||
return this.mVideoHeight;
|
||||
}
|
||||
|
||||
public int getVideoSource() {
|
||||
return this.VIDEO_SOURCE;
|
||||
}
|
||||
|
||||
public int getVideoWidth() {
|
||||
return this.mVideoWidth;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(this.mVideoWidth);
|
||||
parcel.writeInt(this.mVideoHeight);
|
||||
parcel.writeInt(this.mBitrate);
|
||||
parcel.writeInt(this.mMaxDurationMs);
|
||||
parcel.writeInt(this.mMaxFilesizeBytes);
|
||||
parcel.writeInt(this.OUTPUT_FORMAT);
|
||||
parcel.writeInt(this.AUDIO_SOURCE);
|
||||
parcel.writeInt(this.AUDIO_ENCODER);
|
||||
parcel.writeInt(this.VIDEO_SOURCE);
|
||||
parcel.writeInt(this.VIDEO_ENCODER);
|
||||
}
|
||||
|
||||
public CaptureConfiguration() {
|
||||
this.mVideoWidth = 1280;
|
||||
this.mVideoHeight = 720;
|
||||
this.mBitrate = 5000000;
|
||||
this.mMaxDurationMs = -1;
|
||||
this.mMaxFilesizeBytes = -1;
|
||||
this.OUTPUT_FORMAT = 2;
|
||||
this.AUDIO_SOURCE = 0;
|
||||
this.AUDIO_ENCODER = 3;
|
||||
this.VIDEO_SOURCE = 1;
|
||||
this.VIDEO_ENCODER = 2;
|
||||
}
|
||||
|
||||
public CaptureConfiguration(PredefinedCaptureConfigurations$CaptureResolution predefinedCaptureConfigurations$CaptureResolution, PredefinedCaptureConfigurations$CaptureQuality predefinedCaptureConfigurations$CaptureQuality) {
|
||||
this.mVideoWidth = 1280;
|
||||
this.mVideoHeight = 720;
|
||||
this.mBitrate = 5000000;
|
||||
this.mMaxDurationMs = -1;
|
||||
this.mMaxFilesizeBytes = -1;
|
||||
this.OUTPUT_FORMAT = 2;
|
||||
this.AUDIO_SOURCE = 0;
|
||||
this.AUDIO_ENCODER = 3;
|
||||
this.VIDEO_SOURCE = 1;
|
||||
this.VIDEO_ENCODER = 2;
|
||||
this.mVideoWidth = predefinedCaptureConfigurations$CaptureResolution.width;
|
||||
this.mVideoHeight = predefinedCaptureConfigurations$CaptureResolution.height;
|
||||
this.mBitrate = predefinedCaptureConfigurations$CaptureResolution.getBitrate(predefinedCaptureConfigurations$CaptureQuality);
|
||||
}
|
||||
|
||||
public CaptureConfiguration(PredefinedCaptureConfigurations$CaptureResolution predefinedCaptureConfigurations$CaptureResolution, PredefinedCaptureConfigurations$CaptureQuality predefinedCaptureConfigurations$CaptureQuality, int i, int i2) {
|
||||
this(predefinedCaptureConfigurations$CaptureResolution, predefinedCaptureConfigurations$CaptureQuality);
|
||||
this.mMaxDurationMs = i * MSEC_TO_SEC;
|
||||
this.mMaxFilesizeBytes = i2 * MBYTE_TO_BYTE;
|
||||
}
|
||||
|
||||
public CaptureConfiguration(int i, int i2, int i3) {
|
||||
this.mVideoWidth = 1280;
|
||||
this.mVideoHeight = 720;
|
||||
this.mBitrate = 5000000;
|
||||
this.mMaxDurationMs = -1;
|
||||
this.mMaxFilesizeBytes = -1;
|
||||
this.OUTPUT_FORMAT = 2;
|
||||
this.AUDIO_SOURCE = 0;
|
||||
this.AUDIO_ENCODER = 3;
|
||||
this.VIDEO_SOURCE = 1;
|
||||
this.VIDEO_ENCODER = 2;
|
||||
this.mVideoWidth = i;
|
||||
this.mVideoHeight = i2;
|
||||
this.mBitrate = i3;
|
||||
}
|
||||
|
||||
public CaptureConfiguration(int i, int i2, int i3, int i4, int i5) {
|
||||
this(i, i2, i3);
|
||||
this.mMaxDurationMs = i4 * MSEC_TO_SEC;
|
||||
this.mMaxFilesizeBytes = i5 * MBYTE_TO_BYTE;
|
||||
}
|
||||
|
||||
private CaptureConfiguration(Parcel parcel) {
|
||||
this.mVideoWidth = 1280;
|
||||
this.mVideoHeight = 720;
|
||||
this.mBitrate = 5000000;
|
||||
this.mMaxDurationMs = -1;
|
||||
this.mMaxFilesizeBytes = -1;
|
||||
this.OUTPUT_FORMAT = 2;
|
||||
this.AUDIO_SOURCE = 0;
|
||||
this.AUDIO_ENCODER = 3;
|
||||
this.VIDEO_SOURCE = 1;
|
||||
this.VIDEO_ENCODER = 2;
|
||||
this.mVideoWidth = parcel.readInt();
|
||||
this.mVideoHeight = parcel.readInt();
|
||||
this.mBitrate = parcel.readInt();
|
||||
this.mMaxDurationMs = parcel.readInt();
|
||||
this.mMaxFilesizeBytes = parcel.readInt();
|
||||
this.OUTPUT_FORMAT = parcel.readInt();
|
||||
this.AUDIO_SOURCE = parcel.readInt();
|
||||
this.AUDIO_ENCODER = parcel.readInt();
|
||||
this.VIDEO_SOURCE = parcel.readInt();
|
||||
this.VIDEO_ENCODER = parcel.readInt();
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package com.bottle.hp.album.capture.configuration;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class PredefinedCaptureConfigurations$1 {
|
||||
static final /* synthetic */ int[] a = new int[PredefinedCaptureConfigurations$CaptureQuality.values().length];
|
||||
|
||||
static {
|
||||
try {
|
||||
a[PredefinedCaptureConfigurations$CaptureQuality.HIGH.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
a[PredefinedCaptureConfigurations$CaptureQuality.MEDIUM.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
a[PredefinedCaptureConfigurations$CaptureQuality.LOW.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
package com.bottle.hp.album.capture.configuration;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public enum PredefinedCaptureConfigurations$CaptureQuality {
|
||||
LOW,
|
||||
MEDIUM,
|
||||
HIGH
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package com.bottle.hp.album.capture.configuration;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public enum PredefinedCaptureConfigurations$CaptureResolution {
|
||||
RES_360P(640, 360, 1000000, 700000, 300000),
|
||||
RES_480P(640, 480, 2500000, 1750000, 750000),
|
||||
RES_720P(1280, 720, 5000000, 3500000, 1500000),
|
||||
RES_1080P(1920, 1080, 8000000, 5600000, 2400000),
|
||||
RES_1440P(2560, 1440, 10000000, 7000000, 3000000),
|
||||
RES_2160P(3840, 2160, 40000000, 28000000, 12000000);
|
||||
|
||||
public int height;
|
||||
private final int highBitrate;
|
||||
private final int lowBitrate;
|
||||
private final int medBitrate;
|
||||
public int width;
|
||||
|
||||
PredefinedCaptureConfigurations$CaptureResolution(int i, int i2, int i3, int i4, int i5) {
|
||||
this.width = i;
|
||||
this.height = i2;
|
||||
this.highBitrate = i3;
|
||||
this.medBitrate = i4;
|
||||
this.lowBitrate = i5;
|
||||
}
|
||||
|
||||
public int getBitrate(PredefinedCaptureConfigurations$CaptureQuality predefinedCaptureConfigurations$CaptureQuality) {
|
||||
int i = this.highBitrate;
|
||||
int i2 = PredefinedCaptureConfigurations$1.a[predefinedCaptureConfigurations$CaptureQuality.ordinal()];
|
||||
return i2 != 1 ? i2 != 2 ? i2 != 3 ? i : this.lowBitrate : this.medBitrate : this.highBitrate;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user