package com.platform.plugs.live.config;

import lombok.Data;

/**
 * @Author TONG
 * @Date 2019/2/18 20:13
 **/
@Data
public class LiveRecordConfig {
    /**
     * 加速域名
     */
    private String domainName;
    /** 视频转码模板ID*/
    private String vodTranscodeGroupIdMp4;
    /** 音频转码模板ID*/
    private String vodTranscodeGroupIdMp3;
    /**录制默认分类*/
    private String vodRecordCategory;
    /**
     * OssBucket名称
     */
    private String ossBucket;
    /**
     * OssEndpoint域名
     * oss-cn-shanghai.aliyuncs.com
     */
    private String ossEndpoint;
    private String format;
    private String ossObjectPrefix;
    private String sliceOssObjectPrefix;
    /**
     * 按需录制
     * 0表示关闭
     * 1表示通过HTTP回调方式,使用1方式时候需要设置OnDemandCallback，否则默认不录制
     * 2表示通过推流参数方式
     */
    private Integer onDemand;

    private Integer cycleDuration;

    public LiveRecordConfig(String domainName, String ossBucket, String ossEndpoint, String format, String ossObjectPrefix, String sliceOssObjectPrefix, Integer onDemand, Integer cycleDuration) {
        this.domainName = domainName;
        this.ossBucket = ossBucket;
        this.ossEndpoint = ossEndpoint;
        this.format = format;
        this.ossObjectPrefix = ossObjectPrefix;
        this.sliceOssObjectPrefix = sliceOssObjectPrefix;
        this.onDemand = onDemand;
        this.cycleDuration = cycleDuration;
    }

    public LiveRecordConfig(String domainName, String vodTranscodeGroupIdMp4, String vodTranscodeGroupIdMp3, String vodRecordCategory, Integer cycleDuration) {
        this.domainName = domainName;
        this.vodTranscodeGroupIdMp4 = vodTranscodeGroupIdMp4;
        this.vodTranscodeGroupIdMp3 = vodTranscodeGroupIdMp3;
        this.vodRecordCategory = vodRecordCategory;
        this.cycleDuration = cycleDuration;
    }
}
