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

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

Issue 2469093003: Remove RED/RTX workaround from sender/receiver and VideoEngine2. (Closed)
Patch Set: Remove RED/RTX workaround from sender/receiver and VideoEngine2. Created 4 years, 1 month 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/rtp_payload_registry.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
index 283c2846e1bc8fbf70c8d7e90b4ad887412d8040..01a0234f5dbe09c96280417f10bb36d9baa2445e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
@@ -23,7 +23,6 @@ RTPPayloadRegistry::RTPPayloadRegistry(RTPPayloadStrategy* rtp_payload_strategy)
last_received_payload_type_(-1),
last_received_media_payload_type_(-1),
rtx_(false),
- rtx_payload_type_(-1),
ssrc_rtx_(0) {}
RTPPayloadRegistry::~RTPPayloadRegistry() {
@@ -260,18 +259,14 @@ bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet,
int associated_payload_type;
danilchap 2016/11/02 13:56:52 might as well remove this variable and use apt_map
brandtr 2016/11/03 12:02:48 Kept, because now I use it in multiple places.
auto apt_mapping = rtx_payload_type_map_.find(header.payloadType);
- if (apt_mapping == rtx_payload_type_map_.end())
+ if (apt_mapping == rtx_payload_type_map_.end()) {
+ LOG(LS_WARNING) << "No RTX associated payload type mapping was available; "
danilchap 2016/11/02 13:56:52 Better to ensure you do not spam this messages (If
brandtr 2016/11/03 12:02:48 Done.
+ "not able to restore original packet from RTX packet "
+ "with payload type: "
+ << header.payloadType << ".";
return false;
- associated_payload_type = apt_mapping->second;
- if (red_payload_type_ != -1) {
- // Assume red will be used if it's configured.
- // This is a workaround for a Chrome sdp bug where rtx is associated
- // with the media codec even though media is sent over red.
- // TODO(holmer): Remove once the Chrome versions exposing this bug are
- // old enough, which should be once Chrome Stable reaches M53 as this
- // work-around went into M50.
- associated_payload_type = red_payload_type_;
}
+ associated_payload_type = apt_mapping->second;
restored_packet[1] = static_cast<uint8_t>(associated_payload_type);
if (header.markerBit) {
restored_packet[1] |= kRtpMarkerBitMask; // Marker bit is set.
@@ -301,7 +296,6 @@ void RTPPayloadRegistry::SetRtxPayloadType(int payload_type,
rtx_payload_type_map_[payload_type] = associated_payload_type;
rtx_ = true;
- rtx_payload_type_ = payload_type;
}
bool RTPPayloadRegistry::IsRed(const RTPHeader& header) const {

Powered by Google App Engine
This is Rietveld 408576698