Documentation
¶
Overview ¶
Package playoutav adapts scheduled packets, frames, and events into a goav source provider. The module owns the playout vocabulary and pacing loop; the root goav module only sees a provider.Source passed to goav.Input.
Index ¶
Constants ¶
const FormatPlayout av.FormatID = "playout"
FormatPlayout names the scheduled playout framing in SourceShape. It is an open av.FormatID owned by this nested module, not by the root package.
Variables ¶
var ( // ErrNoStreams reports a playout input without any declared stream. ErrNoStreams = errors.New("playoutav: no streams") // ErrStreamIDRequired reports a declared stream or dynamic stream event // without a stream id. ErrStreamIDRequired = errors.New("playoutav: stream id required") // ErrInvalidMessage reports a schedule row that does not contain exactly // one packet, frame, or event. ErrInvalidMessage = errors.New("playoutav: message must contain exactly one packet, frame, or event") // ErrNegativeTime reports a schedule row before the start of the playout. ErrNegativeTime = errors.New("playoutav: schedule time must be non-negative") // ErrOutOfOrder reports a schedule whose times move backward. ErrOutOfOrder = errors.New("playoutav: schedule times must be non-decreasing") // ErrMixedDomains reports a schedule that mixes packet and frame media. ErrMixedDomains = errors.New("playoutav: schedule cannot mix packet and frame media") // ErrUnknownStream reports a packet, frame, or event for an undeclared // stream. ErrUnknownStream = errors.New("playoutav: message references unknown stream") )
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
Input is a scheduled playout provider. It implements provider.Source without importing or changing any root goav internals.
func New ¶
New builds a scheduled playout provider. Streams are declared up front; media messages may omit StreamID when there is exactly one declared stream.
func (*Input) OpenSource ¶
OpenSource validates the schedule and returns a running pipeline source.
func (*Input) SourceShape ¶
SourceShape reports the media shape the schedule produces.
type Message ¶
Message is one scheduled emission. Build values with Packet, Frame, or Event so playout owns a defensive copy of caller-provided media.
type Option ¶
type Option func(*Input)
Option configures a playout Input.
func WithDetail ¶
WithDetail overrides the source-node detail in Describe output.
func WithRealtime ¶
WithRealtime controls the Realtime fact reported by SourceShape. Scheduled playout defaults to realtime.
func WithSourceShape ¶
WithSourceShape pins the SourceShape reported before OpenSource. Leave this unset for the module to infer the shape from the first media stream.