tsmux

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainTS188Aligned

func DrainTS188Aligned(carry *[]byte, chunk []byte, emit func([]byte))

DrainTS188Aligned appends chunk to carry, then calls emit once per aligned 188-byte MPEG-TS packet (sync 0x47). Used so FFmpeg stdin receives transport-aligned writes.

func FeedWirePacket

func FeedWirePacket(ts []byte, av *domain.AVPacket, mux **FromAV, onTS func([]byte))

FeedWirePacket forwards raw TS chunks or muxes one AVPacket to TS via mux (lazily allocated).

func KeyFrameH264

func KeyFrameH264(annexB []byte) bool

KeyFrameH264 reports whether Annex-B H.264 payload contains an IDR slice.

func KeyFrameH265

func KeyFrameH265(annexB []byte) bool

KeyFrameH265 reports whether Annex-B H.265 payload contains an IRAP slice.

Types

type FromAV

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

FromAV wraps a gomedia TSMuxer and converts AVPackets into 188-byte MPEG-TS packets. One instance per output pipeline (segmenter, publisher pump, transcoder stdin feeder, …).

func NewFromAV

func NewFromAV() *FromAV

NewFromAV creates an empty muxer; streams are added on first packet per codec.

func (*FromAV) Write

func (f *FromAV) Write(p *domain.AVPacket, onPacket func([]byte))

Write converts one AVPacket to TS transport packets via OnPacket callback.

Jump to

Keyboard shortcuts

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