package com.mstar.android.tvapi.common.vo;

import android.os.Parcel;
import android.os.Parcelable;
import com.mstar.android.tvapi.common.exception.TvCommonException;

/* JADX INFO: loaded from: classes.dex */
public class VideoInfo implements Parcelable {
    public static final Parcelable.Creator<VideoInfo> CREATOR = new Parcelable.Creator<VideoInfo>() { // from class: com.mstar.android.tvapi.common.vo.VideoInfo.1
        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        public VideoInfo createFromParcel(Parcel parcel) {
            return new VideoInfo(parcel);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        public VideoInfo[] newArray(int i2) {
            return new VideoInfo[i2];
        }
    };
    public static final int VIDEO_SCAN_TYPE_INTERLACED = 1;
    public static final int VIDEO_SCAN_TYPE_PROGRESSIVE = 0;
    public int afdAspectRatio;
    public int arcDescriptionType;
    public int arcType;
    private int enScanType;
    public int frameRate;
    public int hResolution;
    public int modeIndex;
    public int vResolution;

    @Deprecated
    public enum EnumScanType {
        E_PROGRESSIVE,
        E_INTERLACED
    }

    public VideoInfo() {
        this.hResolution = 0;
        this.vResolution = 0;
        this.frameRate = 0;
        this.enScanType = 0;
        this.modeIndex = 0;
        this.arcDescriptionType = 0;
        this.arcType = 0;
        this.afdAspectRatio = 0;
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    @Deprecated
    public EnumScanType getScanType() throws TvCommonException {
        if (this.enScanType < EnumScanType.E_PROGRESSIVE.ordinal() || this.enScanType > EnumScanType.E_INTERLACED.ordinal()) {
            throw new TvCommonException("enScanType is not in the range ");
        }
        return EnumScanType.values()[this.enScanType];
    }

    public int getVideoScanType() throws TvCommonException {
        int i2 = this.enScanType;
        if (i2 < 0 || i2 > 1) {
            throw new TvCommonException("enScanType is not in the range ");
        }
        return i2;
    }

    @Deprecated
    public void setScanType(EnumScanType enumScanType) {
        this.enScanType = enumScanType.ordinal();
    }

    public void setVideoScanType(int i2) {
        this.enScanType = i2;
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i2) {
        parcel.writeInt(this.hResolution);
        parcel.writeInt(this.vResolution);
        parcel.writeInt(this.frameRate);
        parcel.writeInt(this.enScanType);
        parcel.writeInt(this.modeIndex);
        parcel.writeInt(this.arcDescriptionType);
        parcel.writeInt(this.arcType);
        parcel.writeInt(this.afdAspectRatio);
    }

    public VideoInfo(Parcel parcel) {
        this.hResolution = parcel.readInt();
        this.vResolution = parcel.readInt();
        this.frameRate = parcel.readInt();
        this.enScanType = parcel.readInt();
        this.modeIndex = parcel.readInt();
        this.arcDescriptionType = parcel.readInt();
        this.arcType = parcel.readInt();
        this.afdAspectRatio = parcel.readInt();
    }
}
