Documentation
¶
Overview ¶
Package pubsim is the synthetic fixture publisher behind cmd/gawk-pubsim (R20, docs/25 Decision 3): the committed H.264 fixture demuxed into access units once, then looped through the real engine at a live pace. It exists so CI (and the manual W6 scale drill) has a deterministic broadcaster that is not a gaming PC — same engine, same wire bytes, no GPU, no portal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Demux ¶
func Demux(ts []byte) ([]engine.AccessUnit, error)
Demux turns a raw MPEG-TS stream into engine access units, exactly as the relay integration test's fixtureSource does: bytes cloned per AU, keyframes flagged by the IDR sniff.
func Factory ¶
func Factory(aus []engine.AccessUnit, fps int, packets [][]byte) engine.MediaSourceFactory
Factory adapts a demuxed AU list into the engine's media-source seam. The engine calls it with its own Clock, which is what makes the frame stamps and TimeSync read one timeline (docs/19 Decision 6) — pubsim must not weaken that invariant just because its frames are canned.
packets non-empty makes the source implement engine.AudioSource as well (R25, docs/28 Decision 12). Empty leaves it video-only, which is not a degraded shape but the one R20 tier-1 asserts continuously — hence the -audio flag defaulting to off.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is an engine.MediaSource that replays a fixed AU sequence in a loop at a steady rate, forever, stamping each AU with the live clock at emit time. The fixture's own timeline never leaks: live-edge drift and the ClockMapping math on the viewer side read TimestampUs, and replayed stamps from a 2-second file would wrap those instruments around nonsense.
func NewSource ¶
NewSource builds a Source pacing aus at fps. The keyframe cadence follows the fixture (every 15 AUs → 500 ms at 30 fps; other rates scale it).
func (*Source) CapturePath ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package engine publishes encoded media to the relay using the same publisher protocol the browser broadcaster speaks — byte for byte, via the shared gawk-server/wire package.
|
Package engine publishes encoded media to the relay using the same publisher protocol the browser broadcaster speaks — byte for byte, via the shared gawk-server/wire package. |
|
Package fixture holds the committed H.264 MPEG-TS test stream (see README.md for its provenance and the properties tests depend on).
|
Package fixture holds the committed H.264 MPEG-TS test stream (see README.md for its provenance and the properties tests depend on). |
|
Package mpegts is a deliberately minimal MPEG-TS demuxer: enough to recover access-unit boundaries from the GStreamer child's stdout, and nothing more.
|
Package mpegts is a deliberately minimal MPEG-TS demuxer: enough to recover access-unit boundaries from the GStreamer child's stdout, and nothing more. |
|
Package opus reads the one byte of an Opus packet that describes the packet: its TOC (RFC 6716 §3.1).
|
Package opus reads the one byte of an Opus packet that describes the packet: its TOC (RFC 6716 §3.1). |