1941 Precision::constructFractionSignificant( |
1941 Precision::constructFractionSignificant( |
1942 const FractionPrecision &base, |
1942 const FractionPrecision &base, |
1943 diff --git a/third_party/libwebrtc/api/adaptation/resource.cc b/third_party/libwebrtc/api/adaptation/resource.cc |
1943 diff --git a/third_party/libwebrtc/api/adaptation/resource.cc b/third_party/libwebrtc/api/adaptation/resource.cc |
1944 --- a/third_party/libwebrtc/api/adaptation/resource.cc |
1944 --- a/third_party/libwebrtc/api/adaptation/resource.cc |
1945 +++ b/third_party/libwebrtc/api/adaptation/resource.cc |
1945 +++ b/third_party/libwebrtc/api/adaptation/resource.cc |
1946 @@ -4,25 +4,29 @@ |
1946 @@ -17,16 +17,17 @@ namespace webrtc { |
1947 * Use of this source code is governed by a BSD-style license |
|
1948 * that can be found in the LICENSE file in the root of the source |
|
1949 * tree. An additional intellectual property rights grant can be found |
|
1950 * in the file PATENTS. All contributing project authors may |
|
1951 * be found in the AUTHORS file in the root of the source tree. |
|
1952 */ |
|
1953 |
|
1954 #include "api/adaptation/resource.h" |
|
1955 +#include "rtc_base/checks.h" |
|
1956 |
|
1957 namespace webrtc { |
|
1958 |
|
1959 const char* ResourceUsageStateToString(ResourceUsageState usage_state) { |
1947 const char* ResourceUsageStateToString(ResourceUsageState usage_state) { |
1960 switch (usage_state) { |
1948 switch (usage_state) { |
1961 case ResourceUsageState::kOveruse: |
1949 case ResourceUsageState::kOveruse: |
1962 return "kOveruse"; |
1950 return "kOveruse"; |
1963 case ResourceUsageState::kUnderuse: |
1951 case ResourceUsageState::kUnderuse: |
1964 return "kUnderuse"; |
1952 return "kUnderuse"; |
1965 + default: |
|
1966 + RTC_NOTREACHED(); |
|
1967 + return ""; |
|
1968 } |
1953 } |
|
1954 RTC_CHECK_NOTREACHED(); |
|
1955 + return nullptr; |
1969 } |
1956 } |
1970 |
1957 |
1971 ResourceListener::~ResourceListener() {} |
1958 ResourceListener::~ResourceListener() {} |
1972 |
1959 |
1973 Resource::Resource() {} |
1960 Resource::Resource() {} |
1974 |
1961 |
1975 Resource::~Resource() {} |
1962 Resource::~Resource() {} |
|
1963 |
1976 diff --git a/third_party/libwebrtc/api/rtp_parameters.cc b/third_party/libwebrtc/api/rtp_parameters.cc |
1964 diff --git a/third_party/libwebrtc/api/rtp_parameters.cc b/third_party/libwebrtc/api/rtp_parameters.cc |
1977 --- a/third_party/libwebrtc/api/rtp_parameters.cc |
1965 --- a/third_party/libwebrtc/api/rtp_parameters.cc |
1978 +++ b/third_party/libwebrtc/api/rtp_parameters.cc |
1966 +++ b/third_party/libwebrtc/api/rtp_parameters.cc |
1979 @@ -24,16 +24,19 @@ const char* DegradationPreferenceToStrin |
1967 @@ -27,16 +27,17 @@ const char* DegradationPreferenceToStrin |
1980 case DegradationPreference::DISABLED: |
|
1981 return "disabled"; |
|
1982 case DegradationPreference::MAINTAIN_FRAMERATE: |
1968 case DegradationPreference::MAINTAIN_FRAMERATE: |
1983 return "maintain-framerate"; |
1969 return "maintain-framerate"; |
1984 case DegradationPreference::MAINTAIN_RESOLUTION: |
1970 case DegradationPreference::MAINTAIN_RESOLUTION: |
1985 return "maintain-resolution"; |
1971 return "maintain-resolution"; |
1986 case DegradationPreference::BALANCED: |
1972 case DegradationPreference::BALANCED: |
1987 return "balanced"; |
1973 return "balanced"; |
1988 + default: |
|
1989 + RTC_NOTREACHED(); |
|
1990 + return ""; |
|
1991 } |
1974 } |
|
1975 RTC_CHECK_NOTREACHED(); |
|
1976 + return ""; |
1992 } |
1977 } |
1993 |
1978 |
1994 const double kDefaultBitratePriority = 1.0; |
1979 const double kDefaultBitratePriority = 1.0; |
1995 |
1980 |
1996 RtcpFeedback::RtcpFeedback() = default; |
1981 RtcpFeedback::RtcpFeedback() = default; |
1997 RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {} |
1982 RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {} |
1998 RtcpFeedback::RtcpFeedback(RtcpFeedbackType type, |
1983 RtcpFeedback::RtcpFeedback(RtcpFeedbackType type, |
|
1984 RtcpFeedbackMessageType message_type) |
|
1985 diff --git a/third_party/libwebrtc/api/video/video_frame_buffer.cc b/third_party/libwebrtc/api/video/video_frame_buffer.cc |
|
1986 --- a/third_party/libwebrtc/api/video/video_frame_buffer.cc |
|
1987 +++ b/third_party/libwebrtc/api/video/video_frame_buffer.cc |
|
1988 @@ -87,16 +87,18 @@ const char* VideoFrameBufferTypeToString |
|
1989 return "kI422"; |
|
1990 case VideoFrameBuffer::Type::kI010: |
|
1991 return "kI010"; |
|
1992 case VideoFrameBuffer::Type::kNV12: |
|
1993 return "kNV12"; |
|
1994 default: |
|
1995 RTC_DCHECK_NOTREACHED(); |
|
1996 } |
|
1997 + RTC_DCHECK_NOTREACHED(); |
|
1998 + return nullptr; |
|
1999 } |
|
2000 |
|
2001 int I420BufferInterface::ChromaWidth() const { |
|
2002 return (width() + 1) / 2; |
|
2003 } |
|
2004 |
|
2005 int I420BufferInterface::ChromaHeight() const { |
|
2006 return (height() + 1) / 2; |
1999 diff --git a/third_party/libwebrtc/api/video_codecs/video_codec.cc b/third_party/libwebrtc/api/video_codecs/video_codec.cc |
2007 diff --git a/third_party/libwebrtc/api/video_codecs/video_codec.cc b/third_party/libwebrtc/api/video_codecs/video_codec.cc |
2000 --- a/third_party/libwebrtc/api/video_codecs/video_codec.cc |
2008 --- a/third_party/libwebrtc/api/video_codecs/video_codec.cc |
2001 +++ b/third_party/libwebrtc/api/video_codecs/video_codec.cc |
2009 +++ b/third_party/libwebrtc/api/video_codecs/video_codec.cc |
2002 @@ -114,16 +114,19 @@ const char* CodecTypeToPayloadString(Vid |
2010 @@ -117,16 +117,17 @@ const char* CodecTypeToPayloadString(Vid |
2003 case kVideoCodecAV1: |
|
2004 return kPayloadNameAv1; |
|
2005 case kVideoCodecH264: |
2011 case kVideoCodecH264: |
2006 return kPayloadNameH264; |
2012 return kPayloadNameH264; |
2007 case kVideoCodecMultiplex: |
2013 case kVideoCodecMultiplex: |
2008 return kPayloadNameMultiplex; |
2014 return kPayloadNameMultiplex; |
2009 case kVideoCodecGeneric: |
2015 case kVideoCodecGeneric: |
2010 return kPayloadNameGeneric; |
2016 return kPayloadNameGeneric; |
2011 + default: |
|
2012 + RTC_NOTREACHED(); |
|
2013 + return ""; |
|
2014 } |
2017 } |
|
2018 RTC_CHECK_NOTREACHED(); |
|
2019 + return ""; |
2015 } |
2020 } |
2016 |
2021 |
2017 VideoCodecType PayloadStringToCodecType(const std::string& name) { |
2022 VideoCodecType PayloadStringToCodecType(const std::string& name) { |
2018 if (absl::EqualsIgnoreCase(name, kPayloadNameVp8)) |
2023 if (absl::EqualsIgnoreCase(name, kPayloadNameVp8)) |
2019 return kVideoCodecVP8; |
2024 return kVideoCodecVP8; |
2020 if (absl::EqualsIgnoreCase(name, kPayloadNameVp9)) |
2025 if (absl::EqualsIgnoreCase(name, kPayloadNameVp9)) |
2021 return kVideoCodecVP9; |
2026 return kVideoCodecVP9; |
|
2027 if (absl::EqualsIgnoreCase(name, kPayloadNameAv1) || |
2022 diff --git a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2028 diff --git a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2023 --- a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2029 --- a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2024 +++ b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2030 +++ b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2025 @@ -156,16 +156,19 @@ class VideoEncoderSoftwareFallbackWrappe |
2031 @@ -158,16 +158,17 @@ class VideoEncoderSoftwareFallbackWrappe |
2026 << "Trying to access encoder in uninitialized fallback wrapper."; |
2032 [[fallthrough]]; |
2027 // Return main encoder to preserve previous behavior. |
|
2028 ABSL_FALLTHROUGH_INTENDED; |
|
2029 case EncoderState::kMainEncoderUsed: |
2033 case EncoderState::kMainEncoderUsed: |
2030 return encoder_.get(); |
2034 return encoder_.get(); |
2031 case EncoderState::kFallbackDueToFailure: |
2035 case EncoderState::kFallbackDueToFailure: |
2032 case EncoderState::kForcedFallback: |
2036 case EncoderState::kForcedFallback: |
2033 return fallback_encoder_.get(); |
2037 return fallback_encoder_.get(); |
2034 + default: |
2038 } |
2035 + RTC_NOTREACHED(); |
2039 RTC_CHECK_NOTREACHED(); |
2036 + return nullptr; |
2040 + return nullptr; |
2037 } |
|
2038 } |
2041 } |
2039 |
2042 |
2040 // Updates encoder with last observed parameters, such as callbacks, rates, |
2043 // Updates encoder with last observed parameters, such as callbacks, rates, |
2041 // etc. |
2044 // etc. |
2042 void PrimeEncoder(VideoEncoder* encoder) const; |
2045 void PrimeEncoder(VideoEncoder* encoder) const; |
2043 |
2046 |
2044 // Settings used in the last InitEncode call and used if a dynamic fallback to |
2047 // Settings used in the last InitEncode call and used if a dynamic fallback to |
2045 @@ -334,16 +337,19 @@ int32_t VideoEncoderSoftwareFallbackWrap |
2048 // software is required. |
2046 case EncoderState::kUninitialized: |
2049 @@ -338,16 +339,17 @@ int32_t VideoEncoderSoftwareFallbackWrap |
2047 return WEBRTC_VIDEO_CODEC_ERROR; |
|
2048 case EncoderState::kMainEncoderUsed: { |
2050 case EncoderState::kMainEncoderUsed: { |
2049 return EncodeWithMainEncoder(frame, frame_types); |
2051 return EncodeWithMainEncoder(frame, frame_types); |
2050 } |
2052 } |
2051 case EncoderState::kFallbackDueToFailure: |
2053 case EncoderState::kFallbackDueToFailure: |
2052 case EncoderState::kForcedFallback: |
2054 case EncoderState::kForcedFallback: |
2053 return fallback_encoder_->Encode(frame, frame_types); |
2055 return fallback_encoder_->Encode(frame, frame_types); |
2054 + default: |
|
2055 + RTC_NOTREACHED(); |
|
2056 + return WEBRTC_VIDEO_CODEC_ERROR; |
|
2057 } |
2056 } |
2058 } |
2057 RTC_CHECK_NOTREACHED(); |
|
2058 + return WEBRTC_VIDEO_CODEC_ERROR; |
|
2059 } |
|
2060 |
2059 int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder( |
2061 int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder( |
2060 const VideoFrame& frame, |
2062 const VideoFrame& frame, |
2061 const std::vector<VideoFrameType>* frame_types) { |
2063 const std::vector<VideoFrameType>* frame_types) { |
2062 int32_t ret = encoder_->Encode(frame, frame_types); |
2064 int32_t ret = encoder_->Encode(frame, frame_types); |
2063 // If requested, try a software fallback. |
2065 // If requested, try a software fallback. |
2064 bool fallback_requested = (ret == WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE); |
2066 bool fallback_requested = (ret == WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE); |
2065 diff --git a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2067 diff --git a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2066 --- a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2068 --- a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2067 +++ b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2069 +++ b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2068 @@ -156,16 +156,19 @@ const char* Adaptation::StatusToString(A |
2070 @@ -163,16 +163,17 @@ const char* Adaptation::StatusToString(A |
2069 case Adaptation::Status::kAwaitingPreviousAdaptation: |
|
2070 return "kAwaitingPreviousAdaptation"; |
|
2071 case Status::kInsufficientInput: |
2071 case Status::kInsufficientInput: |
2072 return "kInsufficientInput"; |
2072 return "kInsufficientInput"; |
2073 case Status::kAdaptationDisabled: |
2073 case Status::kAdaptationDisabled: |
2074 return "kAdaptationDisabled"; |
2074 return "kAdaptationDisabled"; |
2075 case Status::kRejectedByConstraint: |
2075 case Status::kRejectedByConstraint: |
2076 return "kRejectedByConstraint"; |
2076 return "kRejectedByConstraint"; |
2077 + default: |
|
2078 + RTC_NOTREACHED(); |
|
2079 + return ""; |
|
2080 } |
2077 } |
|
2078 RTC_CHECK_NOTREACHED(); |
|
2079 + return ""; |
2081 } |
2080 } |
2082 |
2081 |
2083 Adaptation::Adaptation(int validation_id, |
2082 Adaptation::Adaptation(int validation_id, |
2084 VideoSourceRestrictions restrictions, |
2083 VideoSourceRestrictions restrictions, |
2085 VideoAdaptationCounters counters, |
2084 VideoAdaptationCounters counters, |
2086 VideoStreamInputState input_state) |
2085 VideoStreamInputState input_state) |
2087 : validation_id_(validation_id), |
2086 : validation_id_(validation_id), |
2088 @@ -375,16 +378,19 @@ VideoStreamAdapter::RestrictionsOrState |
2087 status_(Status::kValid), |
2089 return IncreaseResolution(input_state, current_restrictions_); |
2088 @@ -385,16 +386,17 @@ VideoStreamAdapter::RestrictionsOrState |
2090 } |
|
2091 case DegradationPreference::MAINTAIN_RESOLUTION: { |
2089 case DegradationPreference::MAINTAIN_RESOLUTION: { |
2092 // Scale up framerate. |
2090 // Scale up framerate. |
2093 return IncreaseFramerate(input_state, current_restrictions_); |
2091 return IncreaseFramerate(input_state, current_restrictions_); |
2094 } |
2092 } |
2095 case DegradationPreference::DISABLED: |
2093 case DegradationPreference::DISABLED: |
2096 return Adaptation::Status::kAdaptationDisabled; |
2094 return Adaptation::Status::kAdaptationDisabled; |
2097 + default: |
|
2098 + RTC_NOTREACHED(); |
|
2099 + return Adaptation::Status::kAdaptationDisabled; |
|
2100 } |
2095 } |
|
2096 RTC_CHECK_NOTREACHED(); |
|
2097 + return Adaptation::Status::kAdaptationDisabled; |
2101 } |
2098 } |
2102 |
2099 |
2103 Adaptation VideoStreamAdapter::GetAdaptationDown() { |
2100 Adaptation VideoStreamAdapter::GetAdaptationDown() { |
2104 RTC_DCHECK_RUN_ON(&sequence_checker_); |
2101 RTC_DCHECK_RUN_ON(&sequence_checker_); |
2105 VideoStreamInputState input_state = input_state_provider_->InputState(); |
2102 VideoStreamInputState input_state = input_state_provider_->InputState(); |
2106 ++adaptation_validation_id_; |
2103 ++adaptation_validation_id_; |
2107 RestrictionsOrState restrictions_or_state = |
2104 RestrictionsOrState restrictions_or_state = |
2108 @@ -454,16 +460,19 @@ VideoStreamAdapter::GetAdaptationDownSte |
2105 GetAdaptationDownStep(input_state, current_restrictions_); |
2109 case DegradationPreference::MAINTAIN_FRAMERATE: { |
2106 @@ -467,16 +469,17 @@ VideoStreamAdapter::GetAdaptationDownSte |
2110 return DecreaseResolution(input_state, current_restrictions); |
|
2111 } |
2107 } |
2112 case DegradationPreference::MAINTAIN_RESOLUTION: { |
2108 case DegradationPreference::MAINTAIN_RESOLUTION: { |
2113 return DecreaseFramerate(input_state, current_restrictions); |
2109 return DecreaseFramerate(input_state, current_restrictions); |
2114 } |
2110 } |
2115 case DegradationPreference::DISABLED: |
2111 case DegradationPreference::DISABLED: |
2116 return Adaptation::Status::kAdaptationDisabled; |
2112 return Adaptation::Status::kAdaptationDisabled; |
2117 + default: |
|
2118 + RTC_NOTREACHED(); |
|
2119 + return Adaptation::Status::kAdaptationDisabled; |
|
2120 } |
2113 } |
|
2114 RTC_CHECK_NOTREACHED(); |
|
2115 + return Adaptation::Status::kAdaptationDisabled; |
2121 } |
2116 } |
2122 |
2117 |
2123 VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution( |
2118 VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution( |
2124 const VideoStreamInputState& input_state, |
2119 const VideoStreamInputState& input_state, |
2125 const RestrictionsWithCounters& current_restrictions) { |
2120 const RestrictionsWithCounters& current_restrictions) { |
2126 int target_pixels = |
2121 int target_pixels = |
2127 GetLowerResolutionThan(input_state.frame_size_pixels().value()); |
2122 GetLowerResolutionThan(input_state.frame_size_pixels().value()); |
2128 @@ -594,16 +603,18 @@ Adaptation VideoStreamAdapter::GetAdaptD |
2123 // Use single active stream if set, this stream could be lower than the input. |
|
2124 @@ -620,16 +623,18 @@ Adaptation VideoStreamAdapter::GetAdaptD |
2129 case DegradationPreference::MAINTAIN_FRAMERATE: |
2125 case DegradationPreference::MAINTAIN_FRAMERATE: |
2130 return GetAdaptationDown(); |
2126 return GetAdaptationDown(); |
2131 case DegradationPreference::BALANCED: { |
2127 case DegradationPreference::BALANCED: { |
2132 return RestrictionsOrStateToAdaptation( |
2128 return RestrictionsOrStateToAdaptation( |
2133 GetAdaptDownResolutionStepForBalanced(input_state), input_state); |
2129 GetAdaptDownResolutionStepForBalanced(input_state), input_state); |
2134 } |
2130 } |
2135 default: |
|
2136 RTC_NOTREACHED(); |
|
2137 + return RestrictionsOrStateToAdaptation( |
|
2138 + Adaptation::Status::kAdaptationDisabled, input_state); |
|
2139 } |
2131 } |
|
2132 RTC_CHECK_NOTREACHED(); |
|
2133 + return RestrictionsOrStateToAdaptation( |
|
2134 + Adaptation::Status::kAdaptationDisabled, input_state); |
2140 } |
2135 } |
2141 |
2136 |
2142 VideoStreamAdapter::RestrictionsOrState |
2137 VideoStreamAdapter::RestrictionsOrState |
2143 VideoStreamAdapter::GetAdaptDownResolutionStepForBalanced( |
2138 VideoStreamAdapter::GetAdaptDownResolutionStepForBalanced( |
2144 const VideoStreamInputState& input_state) const { |
2139 const VideoStreamInputState& input_state) const { |
2145 // Adapt twice if the first adaptation did not decrease resolution. |
2140 // Adapt twice if the first adaptation did not decrease resolution. |
2146 auto first_step = GetAdaptationDownStep(input_state, current_restrictions_); |
2141 auto first_step = GetAdaptationDownStep(input_state, current_restrictions_); |
|
2142 if (!absl::holds_alternative<RestrictionsWithCounters>(first_step)) { |
2147 diff --git a/third_party/libwebrtc/call/simulated_network.cc b/third_party/libwebrtc/call/simulated_network.cc |
2143 diff --git a/third_party/libwebrtc/call/simulated_network.cc b/third_party/libwebrtc/call/simulated_network.cc |
2148 --- a/third_party/libwebrtc/call/simulated_network.cc |
2144 --- a/third_party/libwebrtc/call/simulated_network.cc |
2149 +++ b/third_party/libwebrtc/call/simulated_network.cc |
2145 +++ b/third_party/libwebrtc/call/simulated_network.cc |
2150 @@ -72,16 +72,18 @@ bool CoDelSimulation::DropDequeuedPacket |
2146 @@ -73,16 +73,17 @@ bool CoDelSimulation::DropDequeuedPacket |
2151 if (queue_size - packet_size < kMaxPacketSize) |
|
2152 state_ = kPending; |
2147 state_ = kPending; |
2153 last_drop_at_ = next_drop_at; |
2148 last_drop_at_ = next_drop_at; |
2154 ++drop_count_; |
2149 ++drop_count_; |
2155 return true; |
2150 return true; |
2156 } |
2151 } |
2157 return false; |
2152 return false; |
2158 } |
2153 } |
2159 + RTC_NOTREACHED(); |
2154 RTC_CHECK_NOTREACHED(); |
2160 + return false; |
2155 + return false; |
2161 } |
2156 } |
2162 |
2157 |
2163 SimulatedNetwork::SimulatedNetwork(Config config, uint64_t random_seed) |
2158 SimulatedNetwork::SimulatedNetwork(Config config, uint64_t random_seed) |
2164 : random_(random_seed), bursting_(false) { |
2159 : random_(random_seed), bursting_(false) { |
2167 |
2162 |
2168 SimulatedNetwork::~SimulatedNetwork() = default; |
2163 SimulatedNetwork::~SimulatedNetwork() = default; |
2169 diff --git a/third_party/libwebrtc/call/video_send_stream.cc b/third_party/libwebrtc/call/video_send_stream.cc |
2164 diff --git a/third_party/libwebrtc/call/video_send_stream.cc b/third_party/libwebrtc/call/video_send_stream.cc |
2170 --- a/third_party/libwebrtc/call/video_send_stream.cc |
2165 --- a/third_party/libwebrtc/call/video_send_stream.cc |
2171 +++ b/third_party/libwebrtc/call/video_send_stream.cc |
2166 +++ b/third_party/libwebrtc/call/video_send_stream.cc |
2172 @@ -22,16 +22,19 @@ namespace { |
2167 @@ -25,16 +25,17 @@ const char* StreamTypeToString(VideoSend |
2173 const char* StreamTypeToString(VideoSendStream::StreamStats::StreamType type) { |
|
2174 switch (type) { |
|
2175 case VideoSendStream::StreamStats::StreamType::kMedia: |
2168 case VideoSendStream::StreamStats::StreamType::kMedia: |
2176 return "media"; |
2169 return "media"; |
2177 case VideoSendStream::StreamStats::StreamType::kRtx: |
2170 case VideoSendStream::StreamStats::StreamType::kRtx: |
2178 return "rtx"; |
2171 return "rtx"; |
2179 case VideoSendStream::StreamStats::StreamType::kFlexfec: |
2172 case VideoSendStream::StreamStats::StreamType::kFlexfec: |
2180 return "flexfec"; |
2173 return "flexfec"; |
2181 + default: |
|
2182 + RTC_NOTREACHED(); |
|
2183 + return ""; |
|
2184 } |
2174 } |
|
2175 RTC_CHECK_NOTREACHED(); |
|
2176 + return ""; |
2185 } |
2177 } |
2186 |
2178 |
2187 } // namespace |
2179 } // namespace |
2188 |
2180 |
2189 VideoSendStream::StreamStats::StreamStats() = default; |
2181 VideoSendStream::StreamStats::StreamStats() = default; |
2190 VideoSendStream::StreamStats::~StreamStats() = default; |
2182 VideoSendStream::StreamStats::~StreamStats() = default; |
2191 |
2183 |
2192 diff --git a/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc b/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
2184 std::string VideoSendStream::StreamStats::ToString() const { |
2193 --- a/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
2185 diff --git a/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc b/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc |
2194 +++ b/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
2186 --- a/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc |
2195 @@ -347,17 +347,17 @@ NetEq::Operation DecisionLogic::FuturePa |
2187 +++ b/third_party/libwebrtc/modules/audio_processing/agc/clipping_predictor.cc |
2196 return NetEq::Operation::kNormal; |
2188 @@ -373,11 +373,12 @@ std::unique_ptr<ClippingPredictor> Creat |
|
2189 /*adaptive_step_estimation=*/true); |
|
2190 case ClippingPredictorMode::kFixedStepClippingPeakPrediction: |
|
2191 return std::make_unique<ClippingPeakPredictor>( |
|
2192 num_channels, config.window_length, config.reference_window_length, |
|
2193 config.reference_window_delay, config.clipping_threshold, |
|
2194 /*adaptive_step_estimation=*/false); |
2197 } |
2195 } |
2198 |
2196 RTC_DCHECK_NOTREACHED(); |
2199 // If previous was comfort noise, then no merge is needed. |
2197 + return nullptr; |
2200 if (prev_mode == NetEq::Mode::kRfc3389Cng || |
2198 } |
2201 prev_mode == NetEq::Mode::kCodecInternalCng) { |
2199 |
2202 size_t cur_size_samples = |
2200 } // namespace webrtc |
2203 estimate_dtx_delay_ |
2201 diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc |
2204 - ? cur_size_samples = span_samples_in_packet_buffer |
2202 --- a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc |
2205 + ? span_samples_in_packet_buffer |
2203 +++ b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc |
2206 : num_packets_in_packet_buffer * decoder_frame_length; |
2204 @@ -54,16 +54,18 @@ std::vector<float> PreprocessWeights(rtc |
2207 // Target level is in number of packets in Q8. |
2205 rtc::FunctionView<float(float)> GetActivationFunction( |
2208 const size_t target_level_samples = |
2206 ActivationFunction activation_function) { |
2209 (delay_manager_->TargetLevel() * packet_length_samples_) >> 8; |
2207 switch (activation_function) { |
2210 const bool generated_enough_noise = |
2208 case ActivationFunction::kTansigApproximated: |
2211 static_cast<uint32_t>(generated_noise_samples + target_timestamp) >= |
2209 return ::rnnoise::TansigApproximated; |
2212 available_timestamp; |
2210 case ActivationFunction::kSigmoidApproximated: |
2213 |
2211 return ::rnnoise::SigmoidApproximated; |
|
2212 } |
|
2213 + // supposed to be never reached apparently therefore returning bogus |
|
2214 + return ::rnnoise::TansigApproximated; |
|
2215 } |
|
2216 |
|
2217 } // namespace |
|
2218 |
|
2219 FullyConnectedLayer::FullyConnectedLayer( |
|
2220 const int input_size, |
|
2221 const int output_size, |
|
2222 const rtc::ArrayView<const int8_t> bias, |
2214 diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2223 diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2215 --- a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2224 --- a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2216 +++ b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2225 +++ b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2217 @@ -108,16 +108,19 @@ GainControl::Mode Agc1ConfigModeToInterf |
2226 @@ -116,16 +116,17 @@ GainControl::Mode Agc1ConfigModeToInterf |
2218 using Agc1Config = AudioProcessing::Config::GainController1; |
|
2219 switch (mode) { |
|
2220 case Agc1Config::kAdaptiveAnalog: |
2227 case Agc1Config::kAdaptiveAnalog: |
2221 return GainControl::kAdaptiveAnalog; |
2228 return GainControl::kAdaptiveAnalog; |
2222 case Agc1Config::kAdaptiveDigital: |
2229 case Agc1Config::kAdaptiveDigital: |
2223 return GainControl::kAdaptiveDigital; |
2230 return GainControl::kAdaptiveDigital; |
2224 case Agc1Config::kFixedDigital: |
2231 case Agc1Config::kFixedDigital: |
2225 return GainControl::kFixedDigital; |
2232 return GainControl::kFixedDigital; |
2226 + default: |
|
2227 + RTC_NOTREACHED(); |
|
2228 + return GainControl::kAdaptiveAnalog; |
|
2229 } |
2233 } |
|
2234 RTC_CHECK_NOTREACHED(); |
|
2235 + return GainControl::kAdaptiveAnalog; |
|
2236 } |
|
2237 |
|
2238 bool MinimizeProcessingForUnusedOutput() { |
|
2239 return !field_trial::IsEnabled("WebRTC-MutedStateKillSwitch"); |
2230 } |
2240 } |
2231 |
2241 |
2232 // Maximum lengths that frame of samples being passed from the render side to |
2242 // Maximum lengths that frame of samples being passed from the render side to |
2233 // the capture side can have (does not apply to AEC3). |
2243 // the capture side can have (does not apply to AEC3). |
2234 static const size_t kMaxAllowedValuesOfSamplesPerBand = 160; |
2244 @@ -1921,16 +1922,17 @@ void AudioProcessingImpl::InitializeNois |
2235 static const size_t kMaxAllowedValuesOfSamplesPerFrame = 480; |
|
2236 |
|
2237 @@ -1847,16 +1850,17 @@ void AudioProcessingImpl::InitializeNois |
|
2238 case NoiseSuppresionConfig::kModerate: |
2245 case NoiseSuppresionConfig::kModerate: |
2239 return NsConfig::SuppressionLevel::k12dB; |
2246 return NsConfig::SuppressionLevel::k12dB; |
2240 case NoiseSuppresionConfig::kHigh: |
2247 case NoiseSuppresionConfig::kHigh: |
2241 return NsConfig::SuppressionLevel::k18dB; |
2248 return NsConfig::SuppressionLevel::k18dB; |
2242 case NoiseSuppresionConfig::kVeryHigh: |
2249 case NoiseSuppresionConfig::kVeryHigh: |
2243 return NsConfig::SuppressionLevel::k21dB; |
2250 return NsConfig::SuppressionLevel::k21dB; |
2244 default: |
|
2245 RTC_NOTREACHED(); |
|
2246 + return NsConfig::SuppressionLevel::k6dB; |
|
2247 } |
2251 } |
|
2252 RTC_CHECK_NOTREACHED(); |
|
2253 + return NsConfig::SuppressionLevel::k6dB; |
2248 }; |
2254 }; |
2249 |
2255 |
2250 NsConfig cfg; |
2256 NsConfig cfg; |
2251 cfg.target_level = map_level(config_.noise_suppression.level); |
2257 cfg.target_level = map_level(config_.noise_suppression.level); |
2252 submodules_.noise_suppressor = std::make_unique<NoiseSuppressor>( |
2258 submodules_.noise_suppressor = std::make_unique<NoiseSuppressor>( |
2253 cfg, proc_sample_rate_hz(), num_proc_channels()); |
2259 cfg, proc_sample_rate_hz(), num_proc_channels()); |
2254 } |
2260 } |
|
2261 } |
2255 diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2262 diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2256 --- a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2263 --- a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2257 +++ b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2264 +++ b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2258 @@ -22,38 +22,47 @@ std::string NoiseSuppressionLevelToStrin |
2265 @@ -27,28 +27,30 @@ std::string NoiseSuppressionLevelToStrin |
2259 case AudioProcessing::Config::NoiseSuppression::Level::kLow: |
|
2260 return "Low"; |
|
2261 case AudioProcessing::Config::NoiseSuppression::Level::kModerate: |
2266 case AudioProcessing::Config::NoiseSuppression::Level::kModerate: |
2262 return "Moderate"; |
2267 return "Moderate"; |
2263 case AudioProcessing::Config::NoiseSuppression::Level::kHigh: |
2268 case AudioProcessing::Config::NoiseSuppression::Level::kHigh: |
2264 return "High"; |
2269 return "High"; |
2265 case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh: |
2270 case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh: |
2266 return "VeryHigh"; |
2271 return "VeryHigh"; |
2267 + default: |
|
2268 + RTC_NOTREACHED(); |
|
2269 + return ""; |
|
2270 } |
2272 } |
2271 } |
2273 RTC_CHECK_NOTREACHED(); |
2272 |
2274 + return ""; |
2273 std::string GainController1ModeToString( |
2275 } |
2274 const AudioProcessing::Config::GainController1::Mode& mode) { |
2276 |
|
2277 std::string GainController1ModeToString(const Agc1Config::Mode& mode) { |
2275 switch (mode) { |
2278 switch (mode) { |
2276 case AudioProcessing::Config::GainController1::Mode::kAdaptiveAnalog: |
2279 case Agc1Config::Mode::kAdaptiveAnalog: |
2277 return "AdaptiveAnalog"; |
2280 return "AdaptiveAnalog"; |
2278 case AudioProcessing::Config::GainController1::Mode::kAdaptiveDigital: |
2281 case Agc1Config::Mode::kAdaptiveDigital: |
2279 return "AdaptiveDigital"; |
2282 return "AdaptiveDigital"; |
2280 case AudioProcessing::Config::GainController1::Mode::kFixedDigital: |
2283 case Agc1Config::Mode::kFixedDigital: |
2281 return "FixedDigital"; |
2284 return "FixedDigital"; |
2282 + default: |
|
2283 + RTC_NOTREACHED(); |
|
2284 + return ""; |
|
2285 } |
2285 } |
2286 } |
2286 RTC_CHECK_NOTREACHED(); |
2287 |
2287 + return ""; |
2288 std::string GainController2LevelEstimatorToString( |
|
2289 const AudioProcessing::Config::GainController2::LevelEstimator& level) { |
|
2290 switch (level) { |
|
2291 case AudioProcessing::Config::GainController2::LevelEstimator::kRms: |
|
2292 return "Rms"; |
|
2293 case AudioProcessing::Config::GainController2::LevelEstimator::kPeak: |
|
2294 return "Peak"; |
|
2295 + default: |
|
2296 + RTC_NOTREACHED(); |
|
2297 + return ""; |
|
2298 } |
|
2299 } |
|
2300 |
|
2301 int GetDefaultMaxInternalRate() { |
|
2302 #ifdef WEBRTC_ARCH_ARM_FAMILY |
|
2303 return 32000; |
|
2304 #else |
|
2305 return 48000; |
|
2306 diff --git a/third_party/libwebrtc/modules/pacing/pacing_controller.cc b/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
|
2307 --- a/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
|
2308 +++ b/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
|
2309 @@ -78,16 +78,19 @@ int GetPriorityForType(RtpPacketMediaTyp |
|
2310 // Video has "normal" priority, in the old speak. |
|
2311 // Send redundancy concurrently to video. If it is delayed it might have a |
|
2312 // lower chance of being useful. |
|
2313 return kFirstPriority + 3; |
|
2314 case RtpPacketMediaType::kPadding: |
|
2315 // Packets that are in themselves likely useless, only sent to keep the |
|
2316 // BWE high. |
|
2317 return kFirstPriority + 4; |
|
2318 + default: |
|
2319 + RTC_NOTREACHED(); |
|
2320 + return -1; |
|
2321 } |
|
2322 } |
2288 } |
2323 |
2289 |
2324 } // namespace |
2290 } // namespace |
2325 |
2291 |
2326 const TimeDelta PacingController::kMaxExpectedQueueLength = |
2292 constexpr int AudioProcessing::kNativeSampleRatesHz[]; |
2327 TimeDelta::Millis(2000); |
2293 |
2328 const float PacingController::kDefaultPaceMultiplier = 2.5f; |
2294 void CustomProcessing::SetRuntimeSetting( |
|
2295 AudioProcessing::RuntimeSetting setting) {} |
2329 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2296 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2330 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2297 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2331 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2298 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2332 @@ -31,12 +31,15 @@ std::unique_ptr<VideoRtpDepacketizer> Cr |
2299 @@ -33,11 +33,12 @@ std::unique_ptr<VideoRtpDepacketizer> Cr |
2333 return std::make_unique<VideoRtpDepacketizerVp8>(); |
|
2334 case kVideoCodecVP9: |
|
2335 return std::make_unique<VideoRtpDepacketizerVp9>(); |
2300 return std::make_unique<VideoRtpDepacketizerVp9>(); |
2336 case kVideoCodecAV1: |
2301 case kVideoCodecAV1: |
2337 return std::make_unique<VideoRtpDepacketizerAv1>(); |
2302 return std::make_unique<VideoRtpDepacketizerAv1>(); |
2338 case kVideoCodecGeneric: |
2303 case kVideoCodecGeneric: |
2339 case kVideoCodecMultiplex: |
2304 case kVideoCodecMultiplex: |
2340 return std::make_unique<VideoRtpDepacketizerGeneric>(); |
2305 return std::make_unique<VideoRtpDepacketizerGeneric>(); |
2341 + default: |
|
2342 + RTC_NOTREACHED(); |
|
2343 + return nullptr; |
|
2344 } |
2306 } |
|
2307 RTC_CHECK_NOTREACHED(); |
|
2308 + return nullptr; |
2345 } |
2309 } |
2346 |
2310 |
2347 } // namespace webrtc |
2311 } // namespace webrtc |
2348 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2312 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2349 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2313 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2350 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2314 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2351 @@ -125,16 +125,19 @@ bool IsNonVolatile(RTPExtensionType type |
2315 @@ -132,16 +132,17 @@ bool IsNonVolatile(RTPExtensionType type |
2352 case kRtpExtensionNone: |
2316 #if defined(WEBRTC_MOZILLA_BUILD) |
2353 case kRtpExtensionNumberOfExtensions: |
|
2354 RTC_NOTREACHED(); |
|
2355 return false; |
|
2356 case kRtpExtensionCsrcAudioLevel: |
2317 case kRtpExtensionCsrcAudioLevel: |
2357 // TODO: Mozilla implement for CsrcAudioLevel |
2318 // TODO: Mozilla implement for CsrcAudioLevel |
2358 RTC_CHECK(false); |
2319 RTC_CHECK(false); |
2359 return false; |
2320 return false; |
2360 + default: |
2321 #endif |
2361 + RTC_NOTREACHED(); |
|
2362 + return false; |
|
2363 } |
2322 } |
|
2323 RTC_CHECK_NOTREACHED(); |
|
2324 + return false; |
2364 } |
2325 } |
2365 |
2326 |
2366 bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) { |
2327 bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) { |
2367 return extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber) || |
2328 return extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber) || |
2368 extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber02) || |
2329 extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber02) || |
2369 extensions_map.IsRegistered(kRtpExtensionAbsoluteSendTime) || |
2330 extensions_map.IsRegistered(kRtpExtensionAbsoluteSendTime) || |
2370 extensions_map.IsRegistered(kRtpExtensionTransmissionTimeOffset); |
2331 extensions_map.IsRegistered(kRtpExtensionTransmissionTimeOffset); |
|
2332 } |
2371 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2333 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2372 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2334 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2373 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2335 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2374 @@ -40,16 +40,19 @@ namespace { |
2336 @@ -42,16 +42,17 @@ const char* FrameTypeToString(AudioFrame |
2375 const char* FrameTypeToString(AudioFrameType frame_type) { |
|
2376 switch (frame_type) { |
|
2377 case AudioFrameType::kEmptyFrame: |
2337 case AudioFrameType::kEmptyFrame: |
2378 return "empty"; |
2338 return "empty"; |
2379 case AudioFrameType::kAudioFrameSpeech: |
2339 case AudioFrameType::kAudioFrameSpeech: |
2380 return "audio_speech"; |
2340 return "audio_speech"; |
2381 case AudioFrameType::kAudioFrameCN: |
2341 case AudioFrameType::kAudioFrameCN: |
2382 return "audio_cn"; |
2342 return "audio_cn"; |
2383 + default: |
|
2384 + RTC_NOTREACHED(); |
|
2385 + return ""; |
|
2386 } |
2343 } |
|
2344 RTC_CHECK_NOTREACHED(); |
|
2345 + return ""; |
2387 } |
2346 } |
2388 #endif |
2347 #endif |
2389 |
2348 |
2390 constexpr char kIncludeCaptureClockOffset[] = |
2349 constexpr char kIncludeCaptureClockOffset[] = |
2391 "WebRTC-IncludeCaptureClockOffset"; |
2350 "WebRTC-IncludeCaptureClockOffset"; |
2392 |
2351 |
2393 } // namespace |
2352 } // namespace |
|
2353 |
2394 diff --git a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2354 diff --git a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2395 --- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2355 --- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2396 +++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2356 +++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2397 @@ -23,16 +23,19 @@ TemporalLayersChecker::CreateTemporalLay |
2357 @@ -25,16 +25,17 @@ TemporalLayersChecker::CreateTemporalLay |
2398 int num_temporal_layers) { |
|
2399 switch (type) { |
|
2400 case Vp8TemporalLayersType::kFixedPattern: |
2358 case Vp8TemporalLayersType::kFixedPattern: |
2401 return std::make_unique<DefaultTemporalLayersChecker>( |
2359 return std::make_unique<DefaultTemporalLayersChecker>( |
2402 num_temporal_layers); |
2360 num_temporal_layers); |
2403 case Vp8TemporalLayersType::kBitrateDynamic: |
2361 case Vp8TemporalLayersType::kBitrateDynamic: |
2404 // Conference mode temporal layering for screen content in base stream. |
2362 // Conference mode temporal layering for screen content in base stream. |
2405 return std::make_unique<TemporalLayersChecker>(num_temporal_layers); |
2363 return std::make_unique<TemporalLayersChecker>(num_temporal_layers); |
2406 + default: |
|
2407 + RTC_NOTREACHED(); |
|
2408 + return nullptr; |
|
2409 } |
2364 } |
|
2365 RTC_CHECK_NOTREACHED(); |
|
2366 + return nullptr; |
2410 } |
2367 } |
2411 |
2368 |
2412 TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers) |
2369 TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers) |
2413 : num_temporal_layers_(num_temporal_layers), |
2370 : num_temporal_layers_(num_temporal_layers), |
2414 sequence_number_(0), |
2371 sequence_number_(0), |
2415 last_sync_sequence_number_(0), |
2372 last_sync_sequence_number_(0), |
2416 last_tl0_sequence_number_(0) {} |
2373 last_tl0_sequence_number_(0) {} |
|
2374 |
2417 diff --git a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2375 diff --git a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2418 --- a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2376 --- a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2419 +++ b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2377 +++ b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2420 @@ -49,16 +49,19 @@ bool IsFramerateScalingEnabled(Degradati |
2378 @@ -58,16 +58,17 @@ bool IsFramerateScalingEnabled(Degradati |
2421 } |
|
2422 |
|
2423 std::string ToString(VideoAdaptationReason reason) { |
2379 std::string ToString(VideoAdaptationReason reason) { |
2424 switch (reason) { |
2380 switch (reason) { |
2425 case VideoAdaptationReason::kQuality: |
2381 case VideoAdaptationReason::kQuality: |
2426 return "quality"; |
2382 return "quality"; |
2427 case VideoAdaptationReason::kCpu: |
2383 case VideoAdaptationReason::kCpu: |
2428 return "cpu"; |
2384 return "cpu"; |
2429 + default: |
|
2430 + RTC_NOTREACHED(); |
|
2431 + return ""; |
|
2432 } |
2385 } |
2433 } |
2386 RTC_CHECK_NOTREACHED(); |
2434 |
2387 + return ""; |
2435 } // namespace |
2388 } |
2436 |
2389 |
2437 class VideoStreamEncoderResourceManager::InitialFrameDropper { |
2390 std::vector<bool> GetActiveLayersFlags(const VideoCodec& codec) { |
2438 public: |
2391 std::vector<bool> flags; |
2439 explicit InitialFrameDropper( |
2392 if (codec.codecType == VideoCodecType::kVideoCodecVP9) { |
|
2393 flags.resize(codec.VP9().numberOfSpatialLayers); |
|
2394 for (size_t i = 0; i < flags.size(); ++i) { |
|
2395 flags[i] = codec.spatialLayers[i].active; |
2440 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2396 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2441 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2397 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2442 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2398 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2443 @@ -2646,16 +2646,17 @@ get_type_name_for_precision_qualifier(co |
2399 @@ -2646,16 +2646,17 @@ get_type_name_for_precision_qualifier(co |
2444 unreachable("Unsupported sampler/image type"); |
2400 unreachable("Unsupported sampler/image type"); |