preview_queue

package
v0.55.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	VideoFPath string   `json:"video_f_path"`
	SubFPaths  []string `json:"sub_f_paths"`
	StartTime  string   `json:"start_time"`
	EndTime    string   `json:"end_time"`
}

type PreviewQueue

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

func NewPreviewQueue

func NewPreviewQueue(log *logrus.Logger) *PreviewQueue

func (*PreviewQueue) Add

func (p *PreviewQueue) Add(job *Job)

Add 添加任务

func (*PreviewQueue) GetVideoHLSAndSubByTimeRangeExportPathInfo

func (p *PreviewQueue) GetVideoHLSAndSubByTimeRangeExportPathInfo(videoFullPath string, subFullPaths []string, startTimeString, timeLength string) (string, []string, error)

GetVideoHLSAndSubByTimeRangeExportPathInfo 获取视频的HLS和字幕的导出路径信息

func (*PreviewQueue) IsJobInQueue

func (p *PreviewQueue) IsJobInQueue(job *Job) bool

IsJobInQueue 是否正在队列中排队,或者正在被处理

func (*PreviewQueue) JobResult

func (p *PreviewQueue) JobResult(job *Job) string

JobResult 任务结果,如果成功 ok,如果没有就是空,其他就是错误信息

func (*PreviewQueue) ListJob

func (p *PreviewQueue) ListJob() []*Job

ListJob 任务列表

type Reply

type Reply struct {
	Jobs []*Job `json:"jobs"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL