Add H265 payloader to RTSP Server

This commit is contained in:
Alexey Khit
2023-02-11 09:55:39 +03:00
parent 4cbbb5407c
commit 00b445a170
6 changed files with 344 additions and 35 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ const (
//func annexbNALUStartCode() []byte { return []byte{0x00, 0x00, 0x00, 0x01} }
func emitNalus(nals []byte, isAVC bool, emit func([]byte)) {
func EmitNalus(nals []byte, isAVC bool, emit func([]byte)) {
if !isAVC {
nextInd := func(nalu []byte, start int) (indStart int, indLen int) {
zeroCount := 0
@@ -84,7 +84,7 @@ func (p *Payloader) Payload(mtu uint16, payload []byte) [][]byte {
return payloads
}
emitNalus(payload, p.IsAVC, func(nalu []byte) {
EmitNalus(payload, p.IsAVC, func(nalu []byte) {
if len(nalu) == 0 {
return
}