175 lines
5.9 KiB
Java
175 lines
5.9 KiB
Java
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();
|
|
}
|
|
}
|