misc

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSubtitleNotConvertible = errors.New("subtitle codec cannot be converted to webvtt")

Functions

This section is empty.

Types

type Generator

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

func NewGenerator

func NewGenerator(storage domain.Storage, hwAccel ...*domain.HWAccelConfig) *Generator

func NewGeneratorWithCoordinator added in v0.0.12

func NewGeneratorWithCoordinator(storage domain.Storage, coordinator domain.Coordinator, hwAccel *domain.HWAccelConfig, observers ...domain.Observer) *Generator

func (*Generator) GetPreview added in v0.0.4

func (g *Generator) GetPreview(ctx context.Context, sourceURL, spriteKey, previewKey string, duration float64, config domain.PreviewConfig) ([]byte, error)

func (*Generator) GetSprite

func (g *Generator) GetSprite(ctx context.Context, sourceURL, spriteKey string, duration float64, index int) ([]byte, error)

func (*Generator) GetSpriteVTT

func (g *Generator) GetSpriteVTT(ctx context.Context, sourceURL, spriteKey string, duration float64, spriteURL func(int) string) ([]byte, error)

func (*Generator) GetSubtitles

func (g *Generator) GetSubtitles(ctx context.Context, sourceURL string, request SubtitleRequest) (map[string]SubtitleOutcome, error)

func (*Generator) GetSubtitlesBatch added in v0.0.18

func (g *Generator) GetSubtitlesBatch(ctx context.Context, sourceURL string, jobs []SubtitleJob) (map[string]SubtitleOutcome, error)

func (*Generator) GetThumbnail added in v0.0.5

func (g *Generator) GetThumbnail(ctx context.Context, sourceURL, thumbnailKey string, duration float64, config domain.ThumbnailConfig) ([]byte, error)

func (*Generator) SetGenerationTimeout added in v0.0.21

func (g *Generator) SetGenerationTimeout(timeout time.Duration)

func (*Generator) SetLifecycle added in v0.0.26

func (g *Generator) SetLifecycle(lifecycle *coordination.Lifecycle)

func (*Generator) SetSpriteStorage added in v0.0.14

func (g *Generator) SetSpriteStorage(store domain.SpriteStorage)

func (*Generator) SpriteIdentity added in v0.0.26

func (g *Generator) SpriteIdentity() string

type SubtitleJob added in v0.0.18

type SubtitleJob struct {
	Key         string
	TrackID     string
	StreamIndex int
	Codec       string
	Origin      float64
}

type SubtitleOutcome added in v0.0.18

type SubtitleOutcome struct {
	Data []byte
	Err  error
}

type SubtitleRequest added in v0.0.26

type SubtitleRequest struct {
	SourceKey string
	Jobs      []SubtitleJob
	Siblings  []SubtitleJob
}

Jump to

Keyboard shortcuts

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