网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Dpz.Core.Service.ObjectStorage.VideoHandle;

public class PretreatmentArgument
{
    /// <summary>
    /// 音/视频文件所在的服务名
    /// </summary>
    public required string Service { get; init; }

    /// <summary>
    /// 回调通知地址
    /// </summary>
    [JsonPropertyName("notify_url")]
    public required string NotifyUrl { get; init; }

    /// <summary>
    /// 原始音/视频文件路径
    /// </summary>
    public required string Source { get; init; }

    /// <summary>
    /// 任务信息
    /// </summary>
    public required List<PretreatmentTask> Tasks { get; init; }

    /// <summary>
    /// 回调信息的格式,值为json
    /// </summary>
    public string Accept => "json";

    public string TasksBase64String()
    {
        var json = JsonSerializer.Serialize(
            Tasks,
            new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }
        );
        return Convert.ToBase64String(Encoding.UTF8.GetBytes(json));
    }
}
loading