worklist

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

type Progress struct {
	Duration time.Duration
	// contains filtered or unexported fields
}

func (*Progress) Completed

func (p *Progress) Completed() float64

func (*Progress) Remaining

func (p *Progress) Remaining() time.Duration

func (*Progress) Update

func (p *Progress) Update(progress ffmpeg.Progress)

type WorkItem

type WorkItem struct {
	Source string

	Progress
	// contains filtered or unexported fields
}

func (*WorkItem) AddSourceStats

func (w *WorkItem) AddSourceStats(stats ffmpeg.VideoStats)

func (*WorkItem) AddTargetStats

func (w *WorkItem) AddTargetStats(stats ffmpeg.VideoStats)

func (*WorkItem) CompletedFormatted

func (w *WorkItem) CompletedFormatted() string

func (*WorkItem) RemainingFormatted

func (w *WorkItem) RemainingFormatted() string

func (*WorkItem) SetStatus

func (w *WorkItem) SetStatus(status WorkStatus, err error)

func (*WorkItem) SourceVideoStats

func (w *WorkItem) SourceVideoStats() ffmpeg.VideoStats

func (*WorkItem) Status

func (w *WorkItem) Status() (WorkStatus, error)

func (*WorkItem) TargetVideoStats

func (w *WorkItem) TargetVideoStats() ffmpeg.VideoStats

type WorkList

type WorkList struct {
	// contains filtered or unexported fields
}

func (*WorkList) Active

func (wl *WorkList) Active() bool

func (*WorkList) Add

func (wl *WorkList) Add(filename string) *WorkItem

func (*WorkList) All added in v0.3.1

func (wl *WorkList) All() iter.Seq[*WorkItem]

func (*WorkList) List

func (wl *WorkList) List() []*WorkItem

List returns all WorkItem records in the list. This clones the contained slice. For performance reasons, this should only be used for testing. Use All(), which returns an iterator, instead.

func (*WorkList) NextToConvert

func (wl *WorkList) NextToConvert() *WorkItem

func (*WorkList) Queue

func (wl *WorkList) Queue(item *WorkItem)

Queue adds an item ready to be converted. This item will be processed, regardless of whether the queue is active or not.

func (*WorkList) SetActive

func (wl *WorkList) SetActive(active bool)

func (*WorkList) Size added in v0.3.1

func (wl *WorkList) Size() int

func (*WorkList) ToggleActive

func (wl *WorkList) ToggleActive()

type WorkStatus

type WorkStatus int
const (
	Waiting WorkStatus = iota
	Inspecting
	Skipped
	Rejected
	Inspected
	Converting
	Converted
	Failed
)

func (WorkStatus) String

func (ws WorkStatus) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳