hevc

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NALUTypeSliceTrailR uint8 = 1  // 0x01
	NALUTypeSliceIDR    uint8 = 19 // 0x13
	NALUTypeSliceIDRNLP uint8 = 20 // 0x14
	NALUTypeVPS         uint8 = 32 // 0x20
	NALUTypeSPS         uint8 = 33 // 0x21
	NALUTypePPS         uint8 = 34 // 0x22
	NALUTypeSEI         uint8 = 39 // 0x27
	NALUTypeSEISuffix   uint8 = 40 // 0x28
)
View Source
var ErrHEVC = errors.New("lal.hevc: fxxk")
View Source
var (
	NALUStartCode4 = []byte{0x0, 0x0, 0x0, 0x1}
)
View Source
var NALUTypeMapping = map[uint8]string{
	NALUTypeSliceTrailR: "SLICE",
	NALUTypeSliceIDR:    "I",
	NALUTypeSliceIDRNLP: "IDR",
	NALUTypeSEI:         "SEI",
	NALUTypeSEISuffix:   "SEI",
}

Functions

func BuildSeqHeaderFromVPSSPSPPS added in v0.15.0

func BuildSeqHeaderFromVPSSPSPPS(vps, sps, pps []byte) ([]byte, error)

func ParseNALUType added in v0.13.0

func ParseNALUType(v uint8) uint8

func ParseNALUTypeReadable added in v0.13.0

func ParseNALUTypeReadable(v uint8) string

func ParseSPS added in v0.15.0

func ParseSPS(sps []byte, ctx *Context) error

func ParseVPS added in v0.15.0

func ParseVPS(vps []byte, ctx *Context) error

func ParseVPSSPSPPSFromSeqHeader added in v0.15.0

func ParseVPSSPSPPSFromSeqHeader(payload []byte) (vps, sps, pps []byte, err error)

从HVCC格式的Seq Header中得到VPS,SPS,PPS内存块

@param <payload> rtmp message的payload部分或者flv tag的payload部分

注意,包含了头部2字节类型以及3字节的cts

@return 注意,返回的vps,sps,pps内存块指向的是传入参数<payload>内存块的内存

func VPSSPSPPSSeqHeader2AnnexB added in v0.15.0

func VPSSPSPPSSeqHeader2AnnexB(payload []byte) ([]byte, error)

HVCC Seq Header -> AnnexB 注意,返回的内存块为独立的内存块,不依赖指向传输参数<payload>内存块

Types

type Context added in v0.15.0

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

Jump to

Keyboard shortcuts

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