Rewrite AnnexB/AVCC parsers

This commit is contained in:
Alexey Khit
2023-08-16 16:50:55 +03:00
parent e1be2d9e48
commit 1dd3dbbcd8
28 changed files with 513 additions and 176 deletions
+4 -2
View File
@@ -1,11 +1,13 @@
package mpegts
import (
"time"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/h264"
"github.com/AlexxIT/go2rtc/pkg/h264/annexb"
"github.com/AlexxIT/go2rtc/pkg/h265"
"github.com/pion/rtp"
"time"
)
const (
@@ -113,7 +115,7 @@ func (p *PES) GetPacket() (pkt *rtp.Packet) {
PayloadType: p.StreamType,
Timestamp: ts,
},
Payload: h264.AnnexB2AVC(payload),
Payload: annexb.EncodeToAVCC(payload, false),
}
case StreamTypePCMATapo: