Log key frame and layer lock (#496)

This commit is contained in:
Raja Subramanian
2022-03-09 09:50:16 +05:30
committed by GitHub
parent 184fc93c6a
commit acbafa06f2
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -515,6 +515,9 @@ func (b *Buffer) getExtPacket(rawPacket []byte, rtpPacket *rtp.Packet, arrivalTi
case "video/h264":
ep.KeyFrame = IsH264Keyframe(rtpPacket.Payload)
}
if ep.KeyFrame {
b.logger.Debugw("key frame received")
}
return ep, temporalLayer
}
+1
View File
@@ -1252,6 +1252,7 @@ func (f *Forwarder) getTranslationParamsVideo(extPkt *buffer.ExtPacket, layer in
if f.targetLayers.spatial == layer {
if extPkt.KeyFrame {
// lock to target layer
f.logger.Debugw("locking to target layer", "current", f.currentLayers, "target", f.targetLayers)
f.currentLayers.spatial = f.targetLayers.spatial
if f.currentLayers.spatial == f.maxLayers.spatial {
tp.isSwitchingToMaxLayer = true