Documentation ¶
Index ¶
- Variables
- func BuildSeqHeaderFromVPSSPSPPS(vps, sps, pps []byte) ([]byte, error)
- func ParseNALUType(v uint8) uint8
- func ParseNALUTypeReadable(v uint8) string
- func ParseSPS(sps []byte, ctx *Context) error
- func ParseVPS(vps []byte, ctx *Context) error
- func ParseVPSSPSPPSFromSeqHeader(payload []byte) (vps, sps, pps []byte, err error)
- func VPSSPSPPSSeqHeader2AnnexB(payload []byte) ([]byte, error)
- type Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NALUStartCode4 = []byte{0x0, 0x0, 0x0, 0x1} // aud nalu AUDNALU = []byte{0x00, 0x00, 0x00, 0x01, 0x46, 0x01, 0x10} )
View Source
var ( NALUTypeSliceTrailN uint8 = 0 // 0x0 NALUTypeSliceTrailR uint8 = 1 // 0x01 NALUTypeSliceIDR uint8 = 19 // 0x13 NALUTypeSliceIDRNLP uint8 = 20 // 0x14 NALUTypeSliceCRANUT uint8 = 21 // 0x15 NALUTypeVPS uint8 = 32 // 0x20 NALUTypeSPS uint8 = 33 // 0x21 NALUTypePPS uint8 = 34 // 0x22 NALUTypeAUD uint8 = 35 // 0x23 NALUTypeSEI uint8 = 39 // 0x27 NALUTypeSEISuffix uint8 = 40 // 0x28 )
ISO_IEC_23008-2_2013.pdf Table 7-1 – NAL unit type codes and NAL unit type classes
View Source
var ErrHEVC = errors.New("lal.hevc: fxxk")
View Source
var NALUTypeMapping = map[uint8]string{
NALUTypeSliceTrailN: "TrailN",
NALUTypeSliceTrailR: "TrailR",
NALUTypeSliceIDR: "IDR",
NALUTypeSliceIDRNLP: "IDRNLP",
NALUTypeSliceCRANUT: "CRANUT",
NALUTypeVPS: "VPS",
NALUTypeSPS: "SPS",
NALUTypePPS: "PPS",
NALUTypeAUD: "AUD",
NALUTypeSEI: "SEI",
NALUTypeSEISuffix: "SEISuffix",
}
Functions ¶
func BuildSeqHeaderFromVPSSPSPPS ¶ added in v0.15.0
返回的内存块为新申请的独立内存块
func ParseNALUTypeReadable ¶ added in v0.13.0
func ParseVPSSPSPPSFromSeqHeader ¶ added in v0.15.0
从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
HVCC Seq Header -> AnnexB 注意,返回的内存块为独立的内存块,不依赖指向传输参数<payload>内存块
Types ¶
Click to show internal directories.
Click to hide internal directories.