nal

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: BSD-2-Clause Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyUnit       = errors.New("go264/nal: empty NAL unit")
	ErrForbiddenBit    = errors.New("go264/nal: forbidden_zero_bit is set")
	ErrLengthSize      = errors.New("go264/nal: length prefix size must be 1, 2 or 4")
	ErrTruncatedLength = errors.New("go264/nal: truncated length-prefixed unit")
)

Functions

func AppendAVCC

func AppendAVCC(dst []byte, u Unit, lengthSize int) ([]byte, error)

func AppendAnnexB

func AppendAnnexB(dst []byte, u Unit, longStartCode bool) []byte

func Escape

func Escape(dst, src []byte) []byte

func SplitAVCC

func SplitAVCC(data []byte, lengthSize int) ([][]byte, error)

func SplitAnnexB

func SplitAnnexB(data []byte) [][]byte

func Unescape

func Unescape(dst, src []byte) []byte

Types

type Header struct {
	RefIDC uint8
	Type   Type
}

func ParseHeader

func ParseHeader(b byte) (Header, error)

func (Header) Byte

func (h Header) Byte() byte

type Scanner

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

func NewScanner

func NewScanner() *Scanner

func (*Scanner) Append

func (s *Scanner) Append(p []byte)

func (*Scanner) Buffered

func (s *Scanner) Buffered() int

func (*Scanner) Flush

func (s *Scanner) Flush() ([]byte, bool)

func (*Scanner) Next

func (s *Scanner) Next() ([]byte, bool)

func (*Scanner) Reset

func (s *Scanner) Reset()

type Type

type Type uint8
const (
	TypeUnspecified     Type = 0
	TypeSliceNonIDR     Type = 1
	TypeSliceDataPartA  Type = 2
	TypeSliceDataPartB  Type = 3
	TypeSliceDataPartC  Type = 4
	TypeSliceIDR        Type = 5
	TypeSEI             Type = 6
	TypeSPS             Type = 7
	TypePPS             Type = 8
	TypeAccessUnitDelim Type = 9
	TypeEndOfSequence   Type = 10
	TypeEndOfStream     Type = 11
	TypeFillerData      Type = 12
	TypeSPSExtension    Type = 13
	TypePrefix          Type = 14
	TypeSubsetSPS       Type = 15
	TypeAuxSliceNoPart  Type = 19
)

func (Type) IsSlice

func (t Type) IsSlice() bool

func (Type) IsVCL

func (t Type) IsVCL() bool

func (Type) String

func (t Type) String() string

type Unit

type Unit struct {
	Header
	RBSP []byte
}

func Parse

func Parse(ebsp []byte) (Unit, error)

Jump to

Keyboard shortcuts

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