Chromium Code Reviews| Index: webrtc/config.cc |
| diff --git a/webrtc/config.cc b/webrtc/config.cc |
| index a1789a7f1dbc9a15878baa3d7ad9d800fbb83991..b8dc996914f3468517cb5aa8d73ccc77a92f6594 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() != 1) |
|
magjed_webrtc
2016/11/18 14:28:00
I think you will need to write 1u to avoid warning
brandtr
2016/11/21 08:52:03
I didn't receive any compiler warnings here, but m
|
| + 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; |