Add a new function to BitrateAllocation: HasBitrate.
This can be used to determine whether the bitrate of a given spatial and temporal layer has been set in the allocation, even if the value it's set to is zero. GetBitrate still returns 0 if the queried layer does not have the bitrate set. Bug: webrtc:8479 Change-Id: I1d982e211da9b052fcccdbf588b67da1a4550c60 Reviewed-on: https://webrtc-review.googlesource.com/17440 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Erik Varga <erikvarga@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20852}
This commit is contained in:
committed by
Commit Bot
parent
d7e251378b
commit
01f2ec35a6
@ -655,10 +655,10 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildExtendedReports(
|
||||
|
||||
for (int sl = 0; sl < kMaxSpatialLayers; ++sl) {
|
||||
for (int tl = 0; tl < kMaxTemporalStreams; ++tl) {
|
||||
uint32_t layer_bitrate_bps =
|
||||
video_bitrate_allocation_->GetBitrate(sl, tl);
|
||||
if (layer_bitrate_bps > 0)
|
||||
target_bitrate.AddTargetBitrate(sl, tl, layer_bitrate_bps / 1000);
|
||||
if (video_bitrate_allocation_->HasBitrate(sl, tl)) {
|
||||
target_bitrate.AddTargetBitrate(
|
||||
sl, tl, video_bitrate_allocation_->GetBitrate(sl, tl) / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user