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

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2623513002: Explicitly only add transport-cc RTCP feedback param to default FlexFEC codec. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 335ee3a691aed1f66d1f4bc0e628d07e2618fca3..48830714e543edc86b1df61c4c6a67fb7f6e31d1 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -148,7 +148,7 @@ class WebRtcSimulcastEncoderFactory
std::vector<webrtc::VideoEncoder*> non_simulcast_encoders_;
};
-void AddDefaultFeedbackParams(VideoCodec* codec) {
+void AddDefaultMediaFeedbackParams(VideoCodec* codec) {
codec->AddFeedbackParam(FeedbackParam(kRtcpFbParamCcm, kRtcpFbCcmParamFir));
codec->AddFeedbackParam(FeedbackParam(kRtcpFbParamNack, kParamValueEmpty));
codec->AddFeedbackParam(FeedbackParam(kRtcpFbParamNack, kRtcpFbNackParamPli));
@@ -157,6 +157,11 @@ void AddDefaultFeedbackParams(VideoCodec* codec) {
FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty));
}
+void AddDefaultFlexfecFeedbackParams(VideoCodec* codec) {
+ codec->AddFeedbackParam(
+ FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty));
stefan-webrtc 2017/01/10 11:38:56 I think you'd want to add remb here as well in cas
brandtr 2017/01/10 12:33:51 That's right. Done.
+}
+
static std::string CodecVectorToString(const std::vector<VideoCodec>& codecs) {
std::stringstream out;
out << '{';
@@ -570,7 +575,7 @@ static rtc::Optional<int> NextFreePayloadType(
// This is a helper function for GetSupportedCodecs below. It will append new
// unique codecs from |input_codecs| to |unified_codecs|. It will add default
// feedback params to the codecs and will also add an associated RTX codec for
-// recognized codecs (VP8, VP9, H264, and Red).
+// recognized codecs (VP8, VP9, H264, and RED).
static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs,
std::vector<VideoCodec>* unified_codecs) {
for (VideoCodec codec : input_codecs) {
@@ -581,8 +586,12 @@ static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs,
codec.id = *payload_type;
// TODO(magjed): Move the responsibility of setting these parameters to the
// encoder factories instead.
- if (codec.name != kRedCodecName && codec.name != kUlpfecCodecName)
- AddDefaultFeedbackParams(&codec);
+ if (codec.name != kRedCodecName && codec.name != kUlpfecCodecName &&
+ codec.name != kFlexfecCodecName) {
+ AddDefaultMediaFeedbackParams(&codec);
+ } else if (codec.name == kFlexfecCodecName) {
+ AddDefaultFlexfecFeedbackParams(&codec);
magjed_webrtc 2017/01/10 10:46:57 Like the TODO above says, we eventually want this
brandtr 2017/01/10 12:33:51 Right, should have looked more carefully. Done.
+ }
// Don't add same codec twice.
if (FindMatchingCodec(*unified_codecs, codec))
continue;
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698