h264

package
v0.0.0-...-37f1e7d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: figure out actual max MTU size
	MTU_MAX = 900

	MASK_NALU_HEADER_FORBIDDEN_BIT = 0x80
	MASK_NALU_HEADER_NRI_BITS      = 0x60
	MASK_NALU_HEADER_TYPE          = 0x1F
	FU_A                           = 28
	FU_B                           = 29
	BYTE_SINGLE                    = 0x00

	MASK_FU_HEADER_START_BIT    = 0x80
	MASK_FU_HEADER_END_BIT      = 0x40
	MASK_FU_HEADER_RESERVED_BIT = 0x20
	MASK_FU_HEADER_TYPE_BITS    = 0x1F
)

Variables

View Source
var (
	ErrNoData                  = errors.New("no data was passed")
	ErrInvalidLength           = errors.New("invalid length")
	ErrNonEmptyBufferStartBit  = errors.New("buffer was not empty while start bit was received")
	ErrEmptyBufferContinuation = errors.New("buffer was empty while continuation was received")
)

Functions

This section is empty.

Types

type NaluPacketizer

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

func NewNaluPacketizer

func NewNaluPacketizer() *NaluPacketizer

func (*NaluPacketizer) Marshal

func (parser *NaluPacketizer) Marshal(payload []byte) ([][]byte, error)

func (*NaluPacketizer) Unmarshal

func (parser *NaluPacketizer) Unmarshal(data []byte) ([]byte, error)

type VideoDepacketizer

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

func NewVideoDepacketizer

func NewVideoDepacketizer(decryptor *crypto.AesGcmCrypto) *VideoDepacketizer

func (*VideoDepacketizer) IsPartitionHead

func (*VideoDepacketizer) IsPartitionHead(payload []byte) bool

IsPartitionHead checks if this is the head of a packetized nalu stream.

func (*VideoDepacketizer) IsPartitionTail

func (*VideoDepacketizer) IsPartitionTail(marker bool, payload []byte) bool

Checks if the packet is at the end of a partition. This should return false if the result could not be determined.

func (*VideoDepacketizer) Unmarshal

func (depacketizer *VideoDepacketizer) Unmarshal(packet []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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