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

Unified Diff: webrtc/config.cc

Issue 2511703002: Wire up FlexFEC in VideoEngine2. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « webrtc/config.h ('k') | webrtc/media/engine/fakewebrtccall.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/config.cc
diff --git a/webrtc/config.cc b/webrtc/config.cc
index a1789a7f1dbc9a15878baa3d7ad9d800fbb83991..f8e3602851c5640d57dc6e2f436f64f623ff6923 100644
--- a/webrtc/config.cc
+++ b/webrtc/config.cc
@@ -31,6 +31,12 @@ std::string UlpfecConfig::ToString() const {
return ss.str();
}
+bool UlpfecConfig::operator==(const UlpfecConfig& other) const {
+ return ulpfec_payload_type == other.ulpfec_payload_type &&
+ red_payload_type == other.red_payload_type &&
+ red_rtx_payload_type == other.red_rtx_payload_type;
+}
+
FlexfecConfig::FlexfecConfig()
: flexfec_payload_type(-1), flexfec_ssrc(0), protected_media_ssrcs() {}
@@ -50,6 +56,25 @@ std::string FlexfecConfig::ToString() const {
return ss.str();
}
+bool FlexfecConfig::IsCompleteAndEnabled() const {
+ // Check if FlexFEC is enabled.
+ if (flexfec_payload_type < 0)
+ return false;
+ // Do we have the necessary SSRC information?
+ if (flexfec_ssrc == 0)
+ return false;
+ // TODO(brandtr): Update this check when we support multistream protection.
+ if (protected_media_ssrcs.size() != 1u)
+ return false;
+ return true;
+}
+
+bool FlexfecConfig::operator==(const FlexfecConfig& other) const {
+ return flexfec_payload_type == other.flexfec_payload_type &&
+ flexfec_ssrc == other.flexfec_ssrc &&
+ protected_media_ssrcs == other.protected_media_ssrcs;
+}
+
std::string RtpExtension::ToString() const {
std::stringstream ss;
ss << "{uri: " << uri;
« no previous file with comments | « webrtc/config.h ('k') | webrtc/media/engine/fakewebrtccall.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698