livetvtest

package
v0.3.13 Latest Latest
Warning

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

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

Documentation

Overview

Package livetvtest supplies deterministic runner fakes for protocol adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct{ Format transcode.RawFormat }

Decoder yields black frames in Format, paced at about 100 fps, so the broadcast airs (and tags) programme output. A zero Format never yields.

func (*Decoder) Close

func (*Decoder) Close() error

func (*Decoder) Next

func (d *Decoder) Next(ctx context.Context) (transcode.RawFrame, error)

type Encoder

type Encoder struct {
	Index transcode.SegmentIndex
	// contains filtered or unexported fields
}

Encoder stamps the planner's latest policy identities on every segment, as the real continuous index does, so adapters exercise tag authorization.

func (*Encoder) Close

func (e *Encoder) Close() error

func (*Encoder) Segments

func (e *Encoder) Segments() transcode.SegmentIndex

func (*Encoder) Write

func (e *Encoder) Write(_ context.Context, f transcode.RawFrame) error

type Index

type Index struct {
	Payload string
	Height  int
}

func (Index) AttachTS

func (i Index) AttachTS(context.Context) (io.ReadCloser, error)

func (Index) Format

func (i Index) Format() (string, int, int, int)

func (Index) Latest

func (i Index) Latest() (transcode.Segment, bool)

func (Index) ServeFMP4

func (i Index) ServeFMP4(w http.ResponseWriter, _ *http.Request, seq int64)

func (Index) ServeInit

func (i Index) ServeInit(w http.ResponseWriter, _ *http.Request)

func (Index) ServeTS

func (i Index) ServeTS(w http.ResponseWriter, _ *http.Request, seq int64)

func (Index) Since

func (i Index) Since(seq int64, max int) []transcode.Segment

func (Index) Wait

func (i Index) Wait(ctx context.Context, after int64) (transcode.Segment, error)

func (Index) Window

func (i Index) Window(from, until time.Time) []transcode.Segment

Jump to

Keyboard shortcuts

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