Encoding added Requested Encoding to the request, made request async, some refactoring
This commit is contained in:
@@ -1,9 +1,31 @@
|
||||
namespace Encoder;
|
||||
|
||||
public record EncodingJob(Guid Id, string OrigFilePath) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user