package task import ( "ffmpeg-gui/internal/ffmpeg" "time" ) // Type represents the type of a task. type Type string const ( TypeRemux Type = "remux" TypeEncode Type = "encode" TypeBurn Type = "burn_subtitle" ) // Status represents the current state of a task. type Status string const ( StatusPending Status = "pending" StatusRunning Status = "running" StatusDone Status = "done" StatusFailed Status = "failed" StatusCanceled Status = "canceled" ) // Task represents a single ffmpeg job. type Task struct { ID string `json:"id"` Type Type `json:"type"` InputFile string `json:"inputFile"` OutputFile string `json:"outputFile"` Status Status `json:"status"` Progress ffmpeg.Progress `json:"progress"` Encode ffmpeg.EncodeSettings `json:"encode,omitempty"` Remux ffmpeg.RemuxSettings `json:"remux,omitempty"` Subtitle ffmpeg.SubtitleSettings `json:"subtitle,omitempty"` Args []string `json:"-"` Logs []string `json:"-"` Error string `json:"error,omitempty"` CreatedAt time.Time `json:"createdAt"` CompletedAt *time.Time `json:"completedAt,omitempty"` Cancel func() `json:"-"` }