package com.amazon.ads.ema.api.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Configuration for screen recording
 */
public class ScreenRecordConfig implements Parcelable {
    public static final Creator<ScreenRecordConfig> CREATOR = new Creator<ScreenRecordConfig>() {
        @Override
        public ScreenRecordConfig createFromParcel(Parcel in) {
            return new ScreenRecordConfig(in);
        }

        @Override
        public ScreenRecordConfig[] newArray(int size) {
            return new ScreenRecordConfig[size];
        }
    };
    public int durationSeconds;         // Recording duration (1-20 seconds)
    public String resolution;           // Resolution: "720p", "1080p", or "native" (default)
    public int bitrateMbps;             // Video bitrate in Mbps (1-8, default 4)

    public ScreenRecordConfig() {
        // Default values
        this.durationSeconds = 5;
        this.resolution = "native";
        this.bitrateMbps = 4;
    }

    protected ScreenRecordConfig(Parcel in) {
        durationSeconds = in.readInt();
        resolution = in.readString();
        bitrateMbps = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(durationSeconds);
        dest.writeString(resolution);
        dest.writeInt(bitrateMbps);
    }

    @Override
    public int describeContents() {
        return 0;
    }
}
