Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
index 154093b156ff32f929407913c8aaa67799b61560..3d574801ebf5b43e35888db6f3dd779c8b60f374 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
@@ -639,16 +639,11 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBR( |
std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBN( |
const RtcpContext& ctx) { |
- TMMBRSet* boundingSet = tmmbr_help_.BoundingSetToSend(); |
- if (boundingSet == nullptr) |
- return nullptr; |
- |
rtcp::Tmmbn* tmmbn = new rtcp::Tmmbn(); |
tmmbn->From(ssrc_); |
- for (uint32_t i = 0; i < boundingSet->lengthOfSet(); i++) { |
- if (boundingSet->Tmmbr(i) > 0) { |
- tmmbn->WithTmmbr(boundingSet->Ssrc(i), boundingSet->Tmmbr(i), |
- boundingSet->PacketOH(i)); |
+ for (const rtcp::TmmbItem& timber : tmmbn_to_send_) { |
åsapersson
2016/05/09 15:57:11
maybe timber->tmmbr
danilchap
2016/05/09 16:06:26
Done.
|
+ if (timber.bitrate_bps() > 0) { |
+ tmmbn->WithTmmbr(timber); |
} |
} |
@@ -975,14 +970,14 @@ bool RTCPSender::RtcpXrReceiverReferenceTime() const { |
} |
// no callbacks allowed inside this function |
-int32_t RTCPSender::SetTMMBN(const TMMBRSet* boundingSet) { |
+void RTCPSender::SetTMMBN(const std::vector<rtcp::TmmbItem>* bounding_set) { |
rtc::CritScope lock(&critical_section_rtcp_sender_); |
- |
- if (0 == tmmbr_help_.SetTMMBRBoundingSetToSend(boundingSet)) { |
- SetFlag(kRtcpTmmbn, true); |
- return 0; |
+ if (!bounding_set) { |
åsapersson
2016/05/09 15:57:11
maybe if (bounding_set)...
danilchap
2016/05/09 16:06:26
Done.
|
+ tmmbn_to_send_.clear(); |
+ } else { |
+ tmmbn_to_send_ = *bounding_set; |
} |
- return -1; |
+ SetFlag(kRtcpTmmbn, true); |
} |
void RTCPSender::SetFlag(RTCPPacketType type, bool is_volatile) { |