h264

package
v0.0.0-...-e11e0fd Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package h264 contains utilities to work with the H264 codec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AntiCompetitionAdd

func AntiCompetitionAdd(nalu []byte) []byte

AntiCompetitionAdd adds the anti-competition bytes to a NALU.

func AntiCompetitionRemove

func AntiCompetitionRemove(nalu []byte) []byte

AntiCompetitionRemove removes the anti-competition bytes from a NALU.

func DecodeAVCC

func DecodeAVCC(byts []byte) ([][]byte, error)

DecodeAVCC decodes NALUs from the AVCC stream format.

func DecodeAnnexB

func DecodeAnnexB(byts []byte) ([][]byte, error)

DecodeAnnexB decodes NALUs from the Annex-B stream format.

func EncodeAVCC

func EncodeAVCC(nalus [][]byte) ([]byte, error)

EncodeAVCC encodes NALUs into the AVCC stream format.

func EncodeAnnexB

func EncodeAnnexB(nalus [][]byte) ([]byte, error)

EncodeAnnexB encodes NALUs into the Annex-B stream format.

Types

type DTSEstimator

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

DTSEstimator is a DTS estimator.

func NewDTSEstimator

func NewDTSEstimator() *DTSEstimator

NewDTSEstimator allocates a DTSEstimator.

func (*DTSEstimator) Feed

func (d *DTSEstimator) Feed(pts time.Duration) time.Duration

Feed provides PTS to the estimator, and returns the estimated DTS.

type NALUType

type NALUType uint8

NALUType is the type of a NALU.

const (
	NALUTypeNonIDR                        NALUType = 1
	NALUTypeDataPartitionA                NALUType = 2
	NALUTypeDataPartitionB                NALUType = 3
	NALUTypeDataPartitionC                NALUType = 4
	NALUTypeIDR                           NALUType = 5
	NALUTypeSEI                           NALUType = 6
	NALUTypeSPS                           NALUType = 7
	NALUTypePPS                           NALUType = 8
	NALUTypeAccessUnitDelimiter           NALUType = 9
	NALUTypeEndOfSequence                 NALUType = 10
	NALUTypeEndOfStream                   NALUType = 11
	NALUTypeFillerData                    NALUType = 12
	NALUTypeSPSExtension                  NALUType = 13
	NALUTypePrefix                        NALUType = 14
	NALUTypeSubsetSPS                     NALUType = 15
	NALUTypeReserved16                    NALUType = 16
	NALUTypeReserved17                    NALUType = 17
	NALUTypeReserved18                    NALUType = 18
	NALUTypeSliceLayerWithoutPartitioning NALUType = 19
	NALUTypeSliceExtension                NALUType = 20
	NALUTypeSliceExtensionDepth           NALUType = 21
	NALUTypeReserved22                    NALUType = 22
	NALUTypeReserved23                    NALUType = 23
)

standard NALU types.

func (NALUType) String

func (nt NALUType) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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