31 lines
788 B
C#
31 lines
788 B
C#
namespace Encoder;
|
|
|
|
public enum JobStatus {
|
|
Pending,
|
|
InProgress,
|
|
Completed,
|
|
Failed
|
|
}
|
|
|
|
|
|
public enum EncoderType {
|
|
AV1,
|
|
HEVC
|
|
}
|
|
|
|
public record EncodingJob {
|
|
public Guid Id { get; init; }
|
|
public JobStatus Status { get; set; } = JobStatus.Pending;
|
|
public DateTime CreatedAt { get; init; } = DateTime.Now;
|
|
public DateTime? CompletedAt { get; set; } = null;
|
|
public string FilePath { get; init; }
|
|
public EncoderType RequestedEncoding { get; init; }
|
|
public string EncodedFilePath { get; set; } = string.Empty;
|
|
public float Progress { get; set; } = 0.0f;
|
|
|
|
public EncodingJob(Guid id, string filePath, EncoderType requestedEncoding) {
|
|
Id = id;
|
|
FilePath = filePath;
|
|
RequestedEncoding = requestedEncoding;
|
|
}
|
|
} |