Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_utility.cc

Issue 1338203003: Wire up send-side bandwidth estimation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments, rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
index caffb6342c0675896812f93adeecd24178d9745b..c74cac1367546561b63c174d5bfbb0a95e11c54c 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
@@ -8,7 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/checks.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include <assert.h>
#include <math.h> // ceil
@@ -80,6 +82,9 @@ RTCPUtility::RTCPParserV2::Packet() const
return _packet;
}
+rtcp::RtcpPacket* RTCPUtility::RTCPParserV2::ReleaseRtcpPacket() {
+ return rtcp_packet_.release();
+}
RTCPUtility::RTCPPacketTypes
RTCPUtility::RTCPParserV2::Begin()
{
@@ -1236,6 +1241,16 @@ bool RTCPUtility::RTCPParserV2::ParseFBCommon(const RtcpCommonHeader& header) {
// Note: No state transition, SR REQ is empty!
return true;
}
+ case 15: {
+ _packetType = RTCPPacketTypes::kTransportFeedback;
+ rtcp_packet_ =
+ rtcp::TransportFeedback::ParseFrom(_ptrRTCPData - 12, length);
+ // Since we parse the whole packet here, keep the TopLevel state and
+ // just end the current block.
+ EndCurrentBlock();
+
+ return rtcp_packet_.get() != nullptr;
+ }
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698