add support for vp9 and av1 (#574)

This commit is contained in:
cnderrauber
2022-03-28 22:22:48 +08:00
committed by GitHub
parent 75ca70aef7
commit 3959251837
4 changed files with 111 additions and 2 deletions
+5
View File
@@ -452,6 +452,11 @@ func (b *Buffer) getExtPacket(rawPacket []byte, rtpPacket *rtp.Packet, arrivalTi
ep.TemporalLayer = int32(vp8Packet.TID)
case "video/h264":
ep.KeyFrame = IsH264Keyframe(rtpPacket.Payload)
case "video/vp9":
ep.KeyFrame = IsVp9Keyframe(rtpPacket.Payload)
case "video/av1":
ep.KeyFrame = IsAV1Keyframe(rtpPacket.Payload)
}
if ep.KeyFrame {
b.logger.Debugw("key frame received")