package com.platform.plugs.live.handlers;

import com.aliyuncs.vod.model.v20170321.GetTranscodeSummaryResponse;
import com.aliyuncs.vod.model.v20170321.GetTranscodeTaskResponse;
import com.aliyuncs.vod.model.v20170321.SubmitTranscodeJobsResponse;
import com.platform.common.utils.R;
import com.platform.plugs.common.rpc.RpcResponse;
import com.platform.plugs.live.config.LiveTransCodeConfig;
import com.platform.plugs.live.responseEntity.TranscodeInfo;
import com.platform.plugs.live.responseEntity.TranscodeTask;

import java.util.List;

/**
 * @author MXY
 * 2019/12/3 14:55
 */
public interface ILiveTransCodeHandler {

    void configLiveTransCode(LiveTransCodeConfig config);

    /**
     * 查询视频转码摘要
     * */
    RpcResponse<List<TranscodeTask>> transCodeTaskSummary(String videoIds);

    /**
     * 查询转码任务列表
     *
     * @param videoId 视频ID
     * @param pageSize 查询页数据大小，默认10
     * @param pageNo 查询数据页号，默认1
     * */
    RpcResponse<List<TranscodeTask>> transCodeTaskList(String videoId, Integer pageSize, Integer pageNo) throws Exception;

    /**
     * 查询转码任务详情
     *
     * @param taskId 转码任务ID
     * */
    RpcResponse<TranscodeInfo> transCodeTaskInfo(String taskId) throws Exception;

    /**
     * 提交转码作业
     *
     * @param videoId 视频ID
     * @param templateGroupId 模板组ID
     * */
    RpcResponse<SubmitTranscodeJobsResponse> submitTransCodeJobs(String videoId, String templateGroupId);
}
