sample codec payload mismatch error log (#4751)
This commit is contained in:
@@ -204,9 +204,10 @@ type BufferBase struct {
|
|||||||
frameRateCalculator [DefaultMaxLayerSpatial + 1]FrameRateCalculator
|
frameRateCalculator [DefaultMaxLayerSpatial + 1]FrameRateCalculator
|
||||||
frameRateCalculated bool
|
frameRateCalculated bool
|
||||||
|
|
||||||
packetNotFoundCount atomic.Uint32
|
packetNotFoundCount atomic.Uint32
|
||||||
packetTooOldCount atomic.Uint32
|
packetTooOldCount atomic.Uint32
|
||||||
extPacketTooMuchCount atomic.Uint32
|
extPacketTooMuchCount atomic.Uint32
|
||||||
|
codecPayloadTypeNotFoundCount atomic.Uint32
|
||||||
|
|
||||||
absCaptureTimeExtID uint8
|
absCaptureTimeExtID uint8
|
||||||
|
|
||||||
@@ -986,11 +987,15 @@ func (b *BufferBase) handleCodecChange(newPT uint8) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !codecFound {
|
if !codecFound {
|
||||||
b.logger.Errorw(
|
codecNotFoundCount := b.codecPayloadTypeNotFoundCount.Inc()
|
||||||
"could not find codec for new payload type", nil,
|
if (codecNotFoundCount-1)%100 == 0 {
|
||||||
"pt", newPT,
|
b.logger.Errorw(
|
||||||
"rtpParameters", b.rtpParameters,
|
"could not find codec for new payload type", nil,
|
||||||
)
|
"pt", newPT,
|
||||||
|
"rtpParameters", b.rtpParameters,
|
||||||
|
"count", codecNotFoundCount,
|
||||||
|
)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ type ReceiverBase struct {
|
|||||||
restartInProgress bool
|
restartInProgress bool
|
||||||
|
|
||||||
isClosed atomic.Bool
|
isClosed atomic.Bool
|
||||||
|
|
||||||
|
dropPayloadTypeMismatchCount atomic.Uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewReceiverBase(params ReceiverBaseParams, trackInfo *livekit.TrackInfo, codecState ReceiverCodecState) *ReceiverBase {
|
func NewReceiverBase(params ReceiverBaseParams, trackInfo *livekit.TrackInfo, codecState ReceiverCodecState) *ReceiverBase {
|
||||||
@@ -932,11 +934,15 @@ func (r *ReceiverBase) forwardRTP(
|
|||||||
|
|
||||||
if extPkt.Packet.PayloadType != uint8(r.params.Codec.PayloadType) {
|
if extPkt.Packet.PayloadType != uint8(r.params.Codec.PayloadType) {
|
||||||
// drop packets as we don't support codec fallback directly
|
// drop packets as we don't support codec fallback directly
|
||||||
r.params.Logger.Debugw(
|
dropPayloadTypeMismatchCount := r.dropPayloadTypeMismatchCount.Inc()
|
||||||
"dropping packet - payload mismatch",
|
if (dropPayloadTypeMismatchCount-1)%100 == 0 {
|
||||||
"packetPayloadType", extPkt.Packet.PayloadType,
|
r.params.Logger.Debugw(
|
||||||
"payloadType", r.params.Codec.PayloadType,
|
"dropping packet - payload mismatch",
|
||||||
)
|
"packetPayloadType", extPkt.Packet.PayloadType,
|
||||||
|
"payloadType", r.params.Codec.PayloadType,
|
||||||
|
"count", dropPayloadTypeMismatchCount,
|
||||||
|
)
|
||||||
|
}
|
||||||
numPacketsDropped++
|
numPacketsDropped++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user