Help us shape the future of Go! Take the 2026 Go Developer Survey

trickplay

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Overview

Package trickplay fences shared thumbnail generation by source lifetime.

Index

Constants

This section is empty.

Variables

View Source
var ErrCapacity = errors.New("trickplay: holder capacity reached")
View Source
var ErrClosed = errors.New("trickplay: owner closed")

Functions

This section is empty.

Types

type Holder

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

Holder serializes a consumer's source changes and terminal release. A captured holder remains closed even when an in-flight request outlives its session. It is safe to publish a pointer under a session-table lock and call Update or Close outside that lock. Never copy a Holder after first use.

func (*Holder) Close

func (h *Holder) Close(cancelIfIdle bool)

func (*Holder) Update

func (*Holder) UpdateIf

func (h *Holder) UpdateIf(ctx context.Context, p core.TrickplayProvider, src core.TrickplaySource, valid func() bool) error

UpdateIf revalidates the live source after taking the holder barrier.

type Owner

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

Owner is closed only by the runtime. Borrowed providers expose no Close. Backend Ensure and Cancel must return promptly and must not call back into Owner.

func New

func New(backend core.TrickplayProvider) *Owner

func (*Owner) Borrow

func (o *Owner) Borrow() core.TrickplayProvider

func (*Owner) Close

func (o *Owner) Close() error

Jump to

Keyboard shortcuts

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