Skip to content

Commit

Permalink
More improvements to Vp9 rewrite debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Feb 20, 2024
1 parent 17f60d9 commit b65f2d9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,29 @@ class Vp9AdaptiveSourceProjectionContext(
}
}

val accept = frame.isAccepted && frame.projection?.accept(packet) == true
val accept = frame.isAccepted &&
if (frame.projection?.accept(packet) == true) {
true
} else {
if (frame.projection != null && frame.projection?.closedSeq != -1) {
logger.debug(
"Not accepting $packet: frame projection is closed at ${frame.projection?.closedSeq}"
)
} else if (frame.projection == null) {
logger.warn("Not accepting $packet: frame has no projection, even though QF accepted it")
} else {
logger.warn("Not accepting $packet, even though frame projection is not closed")
}
false
}

if (timeSeriesLogger.isTraceEnabled) {
val pt = diagnosticContext.makeTimeSeriesPoint("rtp_vp9")
.addField("ssrc", packet.ssrc)
.addField("timestamp", packet.timestamp)
.addField("seq", packet.sequenceNumber)
.addField("pictureId", packet.pictureId)
.addField("pictureIdIndex", frame.index)
.addField("encoding", incomingEncoding)
.addField("spatialLayer", packet.spatialLayerIndex)
.addField("temporalLayer", packet.temporalLayerIndex)
Expand Down Expand Up @@ -252,7 +267,7 @@ class Vp9AdaptiveSourceProjectionContext(
}

/**
* Create an projection for the first frame after an encoding switch.
* Create a projection for the first frame after an encoding switch.
*/
private fun createEncodingSwitchProjection(
frame: Vp9Frame,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ internal constructor(
* -1 if this projection is still "open" for new, later packets.
* Projections can be closed when we switch away from their encodings.
*/
private var closedSeq = -1
var closedSeq = -1
private set

/**
* Ctor.
Expand Down

0 comments on commit b65f2d9

Please sign in to comment.