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

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

Issue 2448463003: Rename {,Set}GenericFECStatus to {,Set}UlpfecConfig. (Closed)
Patch Set: Created 4 years, 2 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/rtp_sender_video.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
index bb41b83aaa6813ad8b67f115623fd23662dd8557..5a0b5b89462cbd7ae9a8c1bc73b26d96dd880425 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -170,31 +170,34 @@ void RTPSenderVideo::SendVideoPacketAsRed(
}
}
-void RTPSenderVideo::SetGenericFECStatus(bool enable,
- uint8_t payload_type_red,
- uint8_t payload_type_fec) {
- RTC_DCHECK(!enable || payload_type_red > 0);
+void RTPSenderVideo::SetUlpfecConfig(bool ulpfec_enabled,
+ int red_payload_type,
+ int ulpfec_payload_type) {
+ RTC_DCHECK(!ulpfec_enabled || red_payload_type > 0);
+
danilchap 2016/10/26 12:59:14 Add DCHECKS payload_type is small enough: RTC_DCHE
brandtr 2016/10/26 13:57:04 Done.
rtc::CritScope cs(&crit_);
- fec_enabled_ = enable;
- red_payload_type_ = payload_type_red;
- fec_payload_type_ = payload_type_fec;
+ fec_enabled_ = ulpfec_enabled;
+ red_payload_type_ = red_payload_type;
+ fec_payload_type_ = ulpfec_payload_type;
+
+ // Reset FEC rates.
delta_fec_params_ = FecProtectionParams{0, 1, kFecMaskRandom};
key_fec_params_ = FecProtectionParams{0, 1, kFecMaskRandom};
}
-void RTPSenderVideo::GenericFECStatus(bool* enable,
- uint8_t* payload_type_red,
- uint8_t* payload_type_fec) const {
+void RTPSenderVideo::UlpfecConfig(bool* ulpfec_enabled,
+ int* red_payload_type,
+ int* ulpfec_payload_type) const {
rtc::CritScope cs(&crit_);
- *enable = fec_enabled_;
- *payload_type_red = red_payload_type_;
- *payload_type_fec = fec_payload_type_;
+ *ulpfec_enabled = fec_enabled_;
+ *red_payload_type = red_payload_type_;
+ *ulpfec_payload_type = fec_payload_type_;
}
size_t RTPSenderVideo::FecPacketOverhead() const {
rtc::CritScope cs(&crit_);
size_t overhead = 0;
- if (red_payload_type_ != 0) {
+ if (red_payload_type_ != -1) {
// Overhead is FEC headers plus RED for FEC header plus anything in RTP
// header beyond the 12 bytes base header (CSRC list, extensions...)
// This reason for the header extensions to be included here is that
@@ -302,7 +305,7 @@ bool RTPSenderVideo::SendVideo(RtpVideoCodecTypes video_type,
if (!rtp_sender_->AssignSequenceNumber(packet.get()))
return false;
- if (red_payload_type != 0) {
+ if (red_payload_type != -1) {
SendVideoPacketAsRed(std::move(packet), storage,
packetizer->GetProtectionType() == kProtectedPacket);
} else {

Powered by Google App Engine
This is Rietveld 408576698