Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log when the height of a VP8 encoding changes from what was signaled. #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/main/kotlin/org/jitsi/nlj/rtp/codec/vp8/Vp8Parser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ class Vp8Parser(
if (vp8Packet.height > -1) {
// TODO: handle case where new height is from a packet older than the
// latest height we've seen.
findRtpEncodingDesc(vp8Packet)?.let { enc ->
val newLayers = enc.layers.map { layer -> layer.copy(height = vp8Packet.height) }
enc.layers = newLayers.toTypedArray()
findSourceDescAndRtpEncodingDesc(vp8Packet)?.let { (src, enc) ->
if (enc.layers.getOrNull(0)?.height != vp8Packet.height) {
logger.info {
"Changing height of encoding ${vp8Packet.ssrc} " +
"from ${enc.layers.getOrNull(0)?.height} to ${vp8Packet.height}"
}
val newLayers = enc.layers.map { layer -> layer.copy(height = vp8Packet.height) }.toTypedArray()
src.setEncodingLayers(newLayers, vp8Packet.ssrc)
}
}
}

Expand Down