streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

commit 68956c4dceeca0d5f3e883c71743841791eca651
parent 14875bf92d627b37f9d33e762f897f9f611d34ec
Author: Oliver Lowe <o@olowe.co>
Date:   Thu,  6 Jun 2024 12:44:08 +1000

mpegts: start mpegts package

Diffstat:
Ampegts/mpegts.go | 31+++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)

diff --git a/mpegts/mpegts.go b/mpegts/mpegts.go @@ -0,0 +1,31 @@ +// Package mpegts implements encoding and decoding of MPEG-TS packets as specified in ITU-T H.222.0. +package mpegts + +const PacketSize int = 188 + +type Packet struct { + // If true, the packet should be discarded. + Error bool + // If true, this packet has higher priority than other packets + // with the same PID. + Priority bool + // Indicates whether the payload holds the first byte of a particular payload such as ... TODO(otl) + PayloadStart bool + // Identifies the type of the payload. + PID uint16 + // Specifies which algorithm, if any, is used to encrypt the payload. + ScrambleConrol Scramble + Adaptation *Adaptation + Payload []byte +} + +type Scramble uint8 + +const ( + ScrambleNone Scramble = 0 + _ + ScrambleEven Scramble = 0x80 + ScrambleOdd Scramble = 0xc0 +) + +type Adaptation struct{}