Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED. The new macros will replace the old one when old one's usage will be removed. The idea of the renaming to provide a clear signal that this is debug build only macros and will be stripped in the production build. Bug: webrtc:9065 Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35348}
diff --git a/api/audio/channel_layout.cc b/api/audio/channel_layout.cc index 567f4d9..e4ae356 100644 --- a/api/audio/channel_layout.cc +++ b/api/audio/channel_layout.cc
@@ -275,7 +275,7 @@ case CHANNEL_LAYOUT_BITSTREAM: return "BITSTREAM"; } - RTC_NOTREACHED() << "Invalid channel layout provided: " << layout; + RTC_DCHECK_NOTREACHED() << "Invalid channel layout provided: " << layout; return ""; }
diff --git a/api/audio_codecs/audio_decoder.cc b/api/audio_codecs/audio_decoder.cc index 4fc9951..d5c1cfe 100644 --- a/api/audio_codecs/audio_decoder.cc +++ b/api/audio_codecs/audio_decoder.cc
@@ -161,7 +161,7 @@ case 2: return kComfortNoise; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kSpeech; } }
diff --git a/api/audio_codecs/audio_encoder.cc b/api/audio_codecs/audio_encoder.cc index cd4d200..81cfbe3 100644 --- a/api/audio_codecs/audio_encoder.cc +++ b/api/audio_codecs/audio_encoder.cc
@@ -83,7 +83,7 @@ void AudioEncoder::OnReceivedUplinkRecoverablePacketLossFraction( float uplink_recoverable_packet_loss_fraction) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } void AudioEncoder::OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps) {
diff --git a/api/media_stream_interface.h b/api/media_stream_interface.h index ad497d9..d61dd98 100644 --- a/api/media_stream_interface.h +++ b/api/media_stream_interface.h
@@ -203,7 +203,7 @@ int sample_rate, size_t number_of_channels, size_t number_of_frames) { - RTC_NOTREACHED() << "This method must be overridden, or not used."; + RTC_DCHECK_NOTREACHED() << "This method must be overridden, or not used."; } // In this method, `absolute_capture_timestamp_ms`, when available, is
diff --git a/api/media_types.cc b/api/media_types.cc index 3453ce3..5c7d55b 100644 --- a/api/media_types.cc +++ b/api/media_types.cc
@@ -28,7 +28,7 @@ return kMediaTypeData; case MEDIA_TYPE_UNSUPPORTED: // Unsupported media stores the m=<mediatype> differently. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } RTC_CHECK_NOTREACHED();
diff --git a/api/packet_socket_factory.h b/api/packet_socket_factory.h index a46ba27..29d2606 100644 --- a/api/packet_socket_factory.h +++ b/api/packet_socket_factory.h
@@ -79,7 +79,7 @@ virtual AsyncResolverInterface* CreateAsyncResolver() { // Default implementation, so that downstream users can remove this // immediately after changing to CreateAsyncDnsResolver - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; }
diff --git a/api/rtp_transceiver_interface.cc b/api/rtp_transceiver_interface.cc index fd5085c..454e450 100644 --- a/api/rtp_transceiver_interface.cc +++ b/api/rtp_transceiver_interface.cc
@@ -34,17 +34,19 @@ } RTCError RtpTransceiverInterface::StopStandard() { - RTC_NOTREACHED() << "DEBUG: RtpTransceiverInterface::StopStandard called"; + RTC_DCHECK_NOTREACHED() + << "DEBUG: RtpTransceiverInterface::StopStandard called"; return RTCError::OK(); } void RtpTransceiverInterface::StopInternal() { - RTC_NOTREACHED() << "DEBUG: RtpTransceiverInterface::StopInternal called"; + RTC_DCHECK_NOTREACHED() + << "DEBUG: RtpTransceiverInterface::StopInternal called"; } RTCError RtpTransceiverInterface::SetCodecPreferences( rtc::ArrayView<RtpCodecCapability>) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return {}; } @@ -78,7 +80,7 @@ RTCError RtpTransceiverInterface::SetDirectionWithError( RtpTransceiverDirection new_direction) { - RTC_NOTREACHED() << "Default implementation called"; + RTC_DCHECK_NOTREACHED() << "Default implementation called"; return RTCError::OK(); }
diff --git a/api/stats_types.cc b/api/stats_types.cc index ddba593..60818ee 100644 --- a/api/stats_types.cc +++ b/api/stats_types.cc
@@ -58,7 +58,7 @@ case StatsReport::kStatsReportTypeDataChannel: return "datachannel"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -291,7 +291,7 @@ case kId: return (*value_.id_)->Equals(*other.value_.id_); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -676,7 +676,7 @@ case kId: return (*value_.id_)->ToString(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return std::string(); }
diff --git a/api/test/frame_generator_interface.cc b/api/test/frame_generator_interface.cc index 356fe3a..fe7b1e8 100644 --- a/api/test/frame_generator_interface.cc +++ b/api/test/frame_generator_interface.cc
@@ -26,7 +26,7 @@ case OutputType::kNV12: return "NV12"; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/api/test/video/function_video_encoder_factory.h b/api/test/video/function_video_encoder_factory.h index a452eee..9ae9719 100644 --- a/api/test/video/function_video_encoder_factory.h +++ b/api/test/video/function_video_encoder_factory.h
@@ -39,7 +39,7 @@ // Unused by tests. std::vector<SdpVideoFormat> GetSupportedFormats() const override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/api/transport/rtp/dependency_descriptor.cc b/api/transport/rtp/dependency_descriptor.cc index 2a9b6d9..e784853 100644 --- a/api/transport/rtp/dependency_descriptor.cc +++ b/api/transport/rtp/dependency_descriptor.cc
@@ -43,7 +43,7 @@ indication = DecodeTargetIndication::kSwitch; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } dtis.push_back(indication); }
diff --git a/api/transport/stun.cc b/api/transport/stun.cc index f774e98..87da005 100644 --- a/api/transport/stun.cc +++ b/api/transport/stun.cc
@@ -76,7 +76,7 @@ // Return an arbitrary restriction for all other types. return length <= kTheoreticalMaximumAttributeLength; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return true; }
diff --git a/api/video/i010_buffer.cc b/api/video/i010_buffer.cc index aeea050..b98e586 100644 --- a/api/video/i010_buffer.cc +++ b/api/video/i010_buffer.cc
@@ -117,7 +117,7 @@ switch (rotation) { // This case is covered by the early return. case webrtc::kVideoRotation_0: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case webrtc::kVideoRotation_90: dest_x = src.height() - y - 1;
diff --git a/api/video/rtp_video_frame_assembler.cc b/api/video/rtp_video_frame_assembler.cc index 271ac22..81c0838 100644 --- a/api/video/rtp_video_frame_assembler.cc +++ b/api/video/rtp_video_frame_assembler.cc
@@ -51,7 +51,7 @@ case RtpVideoFrameAssembler::kGeneric: return std::make_unique<VideoRtpDepacketizerGeneric>(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } // namespace
diff --git a/api/video/rtp_video_frame_assembler_unittests.cc b/api/video/rtp_video_frame_assembler_unittests.cc index 74e4906..82defb8 100644 --- a/api/video/rtp_video_frame_assembler_unittests.cc +++ b/api/video/rtp_video_frame_assembler_unittests.cc
@@ -93,7 +93,7 @@ return kVideoCodecGeneric; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return absl::nullopt; }
diff --git a/api/video/video_frame_buffer.cc b/api/video/video_frame_buffer.cc index 7085010..2b493dc 100644 --- a/api/video/video_frame_buffer.cc +++ b/api/video/video_frame_buffer.cc
@@ -81,7 +81,7 @@ case VideoFrameBuffer::Type::kNV12: return "kNV12"; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc b/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc index 3d0e56e..73dedc8 100644 --- a/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc +++ b/api/video_codecs/test/video_decoder_software_fallback_wrapper_unittest.cc
@@ -179,13 +179,13 @@ int32_t Decoded(VideoFrame& decodedImage) override { return 0; } int32_t Decoded(webrtc::VideoFrame& decodedImage, int64_t decode_time_ms) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } void Decoded(webrtc::VideoFrame& decodedImage, absl::optional<int32_t> decode_time_ms, absl::optional<uint8_t> qp) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } callback;
diff --git a/api/video_codecs/video_decoder_software_fallback_wrapper.cc b/api/video_codecs/video_decoder_software_fallback_wrapper.cc index 9d58388..6b8211c 100644 --- a/api/video_codecs/video_decoder_software_fallback_wrapper.cc +++ b/api/video_codecs/video_decoder_software_fallback_wrapper.cc
@@ -215,7 +215,7 @@ return fallback_decoder_->Decode(input_image, missing_frames, render_time_ms); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return WEBRTC_VIDEO_CODEC_ERROR; } } @@ -240,7 +240,7 @@ status = WEBRTC_VIDEO_CODEC_OK; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); status = WEBRTC_VIDEO_CODEC_ERROR; }
diff --git a/api/video_codecs/video_encoder_config.cc b/api/video_codecs/video_encoder_config.cc index 0321da2..206a1d3 100644 --- a/api/video_codecs/video_encoder_config.cc +++ b/api/video_codecs/video_encoder_config.cc
@@ -97,23 +97,24 @@ } else if (codec->codecType == kVideoCodecVP9) { FillVideoCodecVp9(codec->VP9()); } else { - RTC_NOTREACHED() << "Encoder specifics set/used for unknown codec type."; + RTC_DCHECK_NOTREACHED() + << "Encoder specifics set/used for unknown codec type."; } } void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecH264( VideoCodecH264* h264_settings) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecVp8( VideoCodecVP8* vp8_settings) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } void VideoEncoderConfig::EncoderSpecificSettings::FillVideoCodecVp9( VideoCodecVP9* vp9_settings) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } VideoEncoderConfig::H264EncoderSpecificSettings::H264EncoderSpecificSettings(
diff --git a/api/video_codecs/vp8_frame_config.cc b/api/video_codecs/vp8_frame_config.cc index 7253206..05e1911 100644 --- a/api/video_codecs/vp8_frame_config.cc +++ b/api/video_codecs/vp8_frame_config.cc
@@ -56,7 +56,7 @@ case Buffer::kCount: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -71,7 +71,7 @@ case Buffer::kCount: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc index 9c6f672..6c16f43 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc
@@ -918,7 +918,7 @@ // Depending on when the channel is created, the transformer might be set // twice. Don't replace the delegate if it was already initialized. if (!frame_transformer || frame_transformer_delegate_) { - RTC_NOTREACHED() << "Not setting the transformer?"; + RTC_DCHECK_NOTREACHED() << "Not setting the transformer?"; return; }
diff --git a/audio/utility/audio_frame_operations.cc b/audio/utility/audio_frame_operations.cc index 8f3f37a..1b936c2 100644 --- a/audio/utility/audio_frame_operations.cc +++ b/audio/utility/audio_frame_operations.cc
@@ -131,8 +131,8 @@ return; } - RTC_NOTREACHED() << "src_channels: " << src_channels - << ", dst_channels: " << dst_channels; + RTC_DCHECK_NOTREACHED() << "src_channels: " << src_channels + << ", dst_channels: " << dst_channels; } void AudioFrameOperations::DownmixChannels(size_t dst_channels, @@ -149,8 +149,8 @@ int err = QuadToStereo(frame); RTC_DCHECK_EQ(err, 0); } else { - RTC_NOTREACHED() << "src_channels: " << frame->num_channels_ - << ", dst_channels: " << dst_channels; + RTC_DCHECK_NOTREACHED() << "src_channels: " << frame->num_channels_ + << ", dst_channels: " << dst_channels; } }
diff --git a/call/adaptation/video_stream_adapter.cc b/call/adaptation/video_stream_adapter.cc index ca62502..c6560b3 100644 --- a/call/adaptation/video_stream_adapter.cc +++ b/call/adaptation/video_stream_adapter.cc
@@ -509,7 +509,7 @@ max_frame_rate = balanced_settings_.MinFps(input_state.video_codec_type(), frame_size_pixels); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); max_frame_rate = GetLowerFrameRateThan(input_state.frames_per_second()); } if (!CanDecreaseFrameRateTo(max_frame_rate, @@ -584,7 +584,7 @@ return Adaptation::Status::kLimitReached; } } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); max_frame_rate = GetHigherFrameRateThan(input_state.frames_per_second()); } if (current_restrictions.counters.fps_adaptations == 1) {
diff --git a/call/rtp_config.cc b/call/rtp_config.cc index c84a63e..5457a94 100644 --- a/call/rtp_config.cc +++ b/call/rtp_config.cc
@@ -29,7 +29,7 @@ if (ssrcs[i] == ssrc) return associated_ssrcs[i]; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; }
diff --git a/call/rtp_payload_params.cc b/call/rtp_payload_params.cc index 53a4cca..5eff91f 100644 --- a/call/rtp_payload_params.cc +++ b/call/rtp_payload_params.cc
@@ -295,7 +295,7 @@ case VideoCodecType::kVideoCodecMultiplex: return; } - RTC_NOTREACHED() << "Unsupported codec."; + RTC_DCHECK_NOTREACHED() << "Unsupported codec."; } void RtpPayloadParams::GenericToGeneric(int64_t shared_frame_id,
diff --git a/common_audio/fir_filter_factory.cc b/common_audio/fir_filter_factory.cc index 4bcf052..2ecef65 100644 --- a/common_audio/fir_filter_factory.cc +++ b/common_audio/fir_filter_factory.cc
@@ -28,7 +28,7 @@ size_t coefficients_length, size_t max_input_length) { if (!coefficients || coefficients_length <= 0 || max_input_length <= 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; }
diff --git a/common_audio/vad/vad.cc b/common_audio/vad/vad.cc index 987ed52..1647246 100644 --- a/common_audio/vad/vad.cc +++ b/common_audio/vad/vad.cc
@@ -38,7 +38,7 @@ case 1: return kActive; default: - RTC_NOTREACHED() << "WebRtcVad_Process returned an error."; + RTC_DCHECK_NOTREACHED() << "WebRtcVad_Process returned an error."; return kError; } }
diff --git a/common_video/h264/pps_parser_unittest.cc b/common_video/h264/pps_parser_unittest.cc index f5b03dc..652f4c7 100644 --- a/common_video/h264/pps_parser_unittest.cc +++ b/common_video/h264/pps_parser_unittest.cc
@@ -99,7 +99,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/common_video/libyuv/webrtc_libyuv.cc b/common_video/libyuv/webrtc_libyuv.cc index cc6a71a..2e10a60 100644 --- a/common_video/libyuv/webrtc_libyuv.cc +++ b/common_video/libyuv/webrtc_libyuv.cc
@@ -45,7 +45,7 @@ buffer_size = width * height * 4; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } return buffer_size; @@ -106,7 +106,7 @@ case VideoType::kBGRA: return libyuv::FOURCC_BGRA; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return libyuv::FOURCC_ANY; }
diff --git a/common_video/video_frame_buffer_pool.cc b/common_video/video_frame_buffer_pool.cc index a450bd1..9c88f0b 100644 --- a/common_video/video_frame_buffer_pool.cc +++ b/common_video/video_frame_buffer_pool.cc
@@ -31,7 +31,7 @@ ->HasOneRef(); } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return false; }
diff --git a/common_video/video_frame_unittest.cc b/common_video/video_frame_unittest.cc index 53a60e3..9a70f07 100644 --- a/common_video/video_frame_unittest.cc +++ b/common_video/video_frame_unittest.cc
@@ -37,7 +37,7 @@ case VideoFrameBuffer::Type::kI010: return I010Buffer::Create(width, height); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -49,7 +49,7 @@ case VideoFrameBuffer::Type::kI010: return I010Buffer::Copy(*src.GetI010()); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -62,7 +62,7 @@ case VideoFrameBuffer::Type::kI010: return I010Buffer::Rotate(*src.GetI010(), rotation); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -89,7 +89,7 @@ return buffer; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -123,7 +123,7 @@ return buffer; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -367,7 +367,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } rtc::scoped_refptr<PlanarYuvBuffer> buf2 =
diff --git a/examples/androidvoip/jni/android_voip_client.cc b/examples/androidvoip/jni/android_voip_client.cc index 9f859cb..09234e4 100644 --- a/examples/androidvoip/jni/android_voip_client.cc +++ b/examples/androidvoip/jni/android_voip_client.cc
@@ -112,7 +112,7 @@ return static_cast<int>(PayloadType::kIlbc); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; }
diff --git a/examples/peerconnection/client/conductor.cc b/examples/peerconnection/client/conductor.cc index 5f213de..d9adffb 100644 --- a/examples/peerconnection/client/conductor.cc +++ b/examples/peerconnection/client/conductor.cc
@@ -549,7 +549,7 @@ } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/examples/peerconnection/client/linux/main_wnd.cc b/examples/peerconnection/client/linux/main_wnd.cc index fe29d62..e9b6a51 100644 --- a/examples/peerconnection/client/linux/main_wnd.cc +++ b/examples/peerconnection/client/linux/main_wnd.cc
@@ -514,7 +514,7 @@ cairo_fill(cr); cairo_surface_destroy(surface); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); #endif }
diff --git a/examples/peerconnection/client/main.cc b/examples/peerconnection/client/main.cc index e209171..3ab4176 100644 --- a/examples/peerconnection/client/main.cc +++ b/examples/peerconnection/client/main.cc
@@ -101,7 +101,7 @@ MainWnd wnd(server.c_str(), absl::GetFlag(FLAGS_port), absl::GetFlag(FLAGS_autoconnect), absl::GetFlag(FLAGS_autocall)); if (!wnd.Create()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; }
diff --git a/logging/rtc_event_log/encoder/delta_encoding_unittest.cc b/logging/rtc_event_log/encoder/delta_encoding_unittest.cc index 3d91362..d0f7fb9 100644 --- a/logging/rtc_event_log/encoder/delta_encoding_unittest.cc +++ b/logging/rtc_event_log/encoder/delta_encoding_unittest.cc
@@ -44,7 +44,7 @@ SetFixedLengthEncoderDeltaSignednessForTesting(true); return; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } uint64_t RandomWithMaxBitWidth(Random* prng, uint64_t max_width) {
diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc index 6422ea0..ff72163 100644 --- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc +++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_legacy.cc
@@ -78,9 +78,9 @@ case BandwidthUsage::kBwOverusing: return rtclog::DelayBasedBweUpdate::BWE_OVERUSING; case BandwidthUsage::kLast: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::DelayBasedBweUpdate::BWE_NORMAL; } @@ -94,9 +94,9 @@ case ProbeFailureReason::kTimeout: return rtclog::BweProbeResult::TIMEOUT; case ProbeFailureReason::kLast: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::BweProbeResult::SUCCESS; } @@ -107,9 +107,9 @@ case RtcpMode::kReducedSize: return rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE; case RtcpMode::kOff: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::VideoReceiveConfig::RTCP_COMPOUND; } @@ -125,9 +125,9 @@ case IceCandidatePairConfigType::kSelected: return rtclog::IceCandidatePairConfig::SELECTED; case IceCandidatePairConfigType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::IceCandidatePairConfig::ADDED; } @@ -145,9 +145,9 @@ case IceCandidateType::kRelay: return rtclog::IceCandidatePairConfig::RELAY; case IceCandidateType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE; } @@ -165,9 +165,9 @@ case IceCandidatePairProtocol::kTls: return rtclog::IceCandidatePairConfig::TLS; case IceCandidatePairProtocol::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::IceCandidatePairConfig::UNKNOWN_PROTOCOL; } @@ -182,9 +182,9 @@ case IceCandidatePairAddressFamily::kIpv6: return rtclog::IceCandidatePairConfig::IPV6; case IceCandidatePairAddressFamily::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY; } @@ -204,9 +204,9 @@ case IceCandidateNetworkType::kCellular: return rtclog::IceCandidatePairConfig::CELLULAR; case IceCandidateNetworkType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE; } @@ -222,9 +222,9 @@ case IceCandidatePairEventType::kCheckResponseReceived: return rtclog::IceCandidatePairEvent::CHECK_RESPONSE_RECEIVED; case IceCandidatePairEventType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog::IceCandidatePairEvent::CHECK_SENT; } @@ -374,7 +374,7 @@ } int event_type = static_cast<int>(event.GetType()); - RTC_NOTREACHED() << "Unknown event type (" << event_type << ")"; + RTC_DCHECK_NOTREACHED() << "Unknown event type (" << event_type << ")"; return ""; }
diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc index 236aea7..ce9f813 100644 --- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc +++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_new_format.cc
@@ -86,9 +86,9 @@ case BandwidthUsage::kBwOverusing: return rtclog2::DelayBasedBweUpdates::BWE_OVERUSING; case BandwidthUsage::kLast: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::DelayBasedBweUpdates::BWE_UNKNOWN_STATE; } @@ -108,7 +108,7 @@ // This codec type is afaik not used. return rtclog2::FrameDecodedEvents::CODEC_UNKNOWN; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::FrameDecodedEvents::CODEC_UNKNOWN; } @@ -122,9 +122,9 @@ case ProbeFailureReason::kTimeout: return rtclog2::BweProbeResultFailure::TIMEOUT; case ProbeFailureReason::kLast: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::BweProbeResultFailure::UNKNOWN; } @@ -167,9 +167,9 @@ case webrtc::DtlsTransportState::kFailed: return rtclog2::DtlsTransportStateEvent::DTLS_TRANSPORT_FAILED; case webrtc::DtlsTransportState::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::DtlsTransportStateEvent::UNKNOWN_DTLS_TRANSPORT_STATE; } @@ -185,9 +185,9 @@ case IceCandidatePairConfigType::kSelected: return rtclog2::IceCandidatePairConfig::SELECTED; case IceCandidatePairConfigType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::IceCandidatePairConfig::UNKNOWN_CONFIG_TYPE; } @@ -205,9 +205,9 @@ case IceCandidateType::kRelay: return rtclog2::IceCandidatePairConfig::RELAY; case IceCandidateType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE; } @@ -225,9 +225,9 @@ case IceCandidatePairProtocol::kTls: return rtclog2::IceCandidatePairConfig::TLS; case IceCandidatePairProtocol::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::IceCandidatePairConfig::UNKNOWN_PROTOCOL; } @@ -241,9 +241,9 @@ case IceCandidatePairAddressFamily::kIpv6: return rtclog2::IceCandidatePairConfig::IPV6; case IceCandidatePairAddressFamily::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY; } @@ -263,9 +263,9 @@ case IceCandidateNetworkType::kCellular: return rtclog2::IceCandidatePairConfig::CELLULAR; case IceCandidateNetworkType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE; } @@ -281,9 +281,9 @@ case IceCandidatePairEventType::kCheckResponseReceived: return rtclog2::IceCandidatePairEvent::CHECK_RESPONSE_RECEIVED; case IceCandidatePairEventType::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return rtclog2::IceCandidatePairEvent::UNKNOWN_CHECK_TYPE; }
diff --git a/logging/rtc_event_log/events/rtc_event_field_encoding.cc b/logging/rtc_event_log/events/rtc_event_field_encoding.cc index 23aa308..68188ce 100644 --- a/logging/rtc_event_log/events/rtc_event_field_encoding.cc +++ b/logging/rtc_event_log/events/rtc_event_field_encoding.cc
@@ -76,10 +76,10 @@ case FieldType::kVarInt: return EncodeVarInt(value); case FieldType::kString: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return std::string(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return std::string(); }
diff --git a/logging/rtc_event_log/events/rtc_event_field_encoding_parser.cc b/logging/rtc_event_log/events/rtc_event_field_encoding_parser.cc index 3740da9..a9b0c08 100644 --- a/logging/rtc_event_log/events/rtc_event_field_encoding_parser.cc +++ b/logging/rtc_event_log/events/rtc_event_field_encoding_parser.cc
@@ -109,11 +109,11 @@ case FieldType::kVarInt: return ReadVarInt(); case FieldType::kString: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); SetError(); return 0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); SetError(); return 0; }
diff --git a/logging/rtc_event_log/events/rtc_event_field_encoding_unittest.cc b/logging/rtc_event_log/events/rtc_event_field_encoding_unittest.cc index 3ff0114..b155469 100644 --- a/logging/rtc_event_log/events/rtc_event_field_encoding_unittest.cc +++ b/logging/rtc_event_log/events/rtc_event_field_encoding_unittest.cc
@@ -52,7 +52,7 @@ default: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; }
diff --git a/logging/rtc_event_log/rtc_event_log_impl.cc b/logging/rtc_event_log/rtc_event_log_impl.cc index 38cf5f7..4237b2a 100644 --- a/logging/rtc_event_log/rtc_event_log_impl.cc +++ b/logging/rtc_event_log/rtc_event_log_impl.cc
@@ -48,7 +48,7 @@ default: RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type) << ")"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return std::unique_ptr<RtcEventLogEncoder>(nullptr); } }
diff --git a/logging/rtc_event_log/rtc_event_log_parser.cc b/logging/rtc_event_log/rtc_event_log_parser.cc index f778498..3b3eb18 100644 --- a/logging/rtc_event_log/rtc_event_log_parser.cc +++ b/logging/rtc_event_log/rtc_event_log_parser.cc
@@ -174,7 +174,7 @@ case rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE: return RtcpMode::kReducedSize; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return RtcpMode::kOff; } @@ -188,7 +188,7 @@ case rtclog::DelayBasedBweUpdate::BWE_OVERUSING: return BandwidthUsage::kBwOverusing; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return BandwidthUsage::kBwNormal; } @@ -204,7 +204,7 @@ case rtclog::IceCandidatePairConfig::SELECTED: return IceCandidatePairConfigType::kSelected; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairConfigType::kAdded; } @@ -222,7 +222,7 @@ case rtclog::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE: return IceCandidateType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateType::kUnknown; } @@ -240,7 +240,7 @@ case rtclog::IceCandidatePairConfig::UNKNOWN_PROTOCOL: return IceCandidatePairProtocol::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairProtocol::kUnknown; } @@ -254,7 +254,7 @@ case rtclog::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY: return IceCandidatePairAddressFamily::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairAddressFamily::kUnknown; } @@ -274,7 +274,7 @@ case rtclog::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE: return IceCandidateNetworkType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateNetworkType::kUnknown; } @@ -290,7 +290,7 @@ case rtclog::IceCandidatePairEvent::CHECK_RESPONSE_RECEIVED: return IceCandidatePairEventType::kCheckResponseReceived; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairEventType::kCheckSent; } @@ -311,7 +311,7 @@ "VideoCodecType::kVideoCodecMultiplex"; return VideoCodecType::kVideoCodecMultiplex; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return VideoCodecType::kVideoCodecMultiplex; } @@ -768,7 +768,7 @@ case rtclog2::DelayBasedBweUpdates::BWE_UNKNOWN_STATE: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return BandwidthUsage::kBwNormal; } @@ -784,7 +784,7 @@ case rtclog2::BweProbeResultFailure::UNKNOWN: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ProbeFailureReason::kTimeout; } @@ -802,10 +802,10 @@ case rtclog2::DtlsTransportStateEvent::DTLS_TRANSPORT_FAILED: return DtlsTransportState::kFailed; case rtclog2::DtlsTransportStateEvent::UNKNOWN_DTLS_TRANSPORT_STATE: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return DtlsTransportState::kNumValues; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return DtlsTransportState::kNumValues; } @@ -823,7 +823,7 @@ case rtclog2::IceCandidatePairConfig::UNKNOWN_CONFIG_TYPE: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairConfigType::kAdded; } @@ -841,7 +841,7 @@ case rtclog2::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE: return IceCandidateType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateType::kUnknown; } @@ -859,7 +859,7 @@ case rtclog2::IceCandidatePairConfig::UNKNOWN_PROTOCOL: return IceCandidatePairProtocol::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairProtocol::kUnknown; } @@ -873,7 +873,7 @@ case rtclog2::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY: return IceCandidatePairAddressFamily::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairAddressFamily::kUnknown; } @@ -893,7 +893,7 @@ case rtclog2::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE: return IceCandidateNetworkType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateNetworkType::kUnknown; } @@ -911,7 +911,7 @@ case rtclog2::IceCandidatePairEvent::UNKNOWN_CHECK_TYPE: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairEventType::kCheckSent; } @@ -1892,7 +1892,7 @@ } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) { res.failure_reason = ProbeFailureReason::kTimeout; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } RTC_PARSE_CHECK_OR_RETURN(!pr_event.has_bitrate_bps()); @@ -2360,7 +2360,7 @@ } else if (stream.frame_decoded_events_size() == 1) { return StoreFrameDecodedEvents(stream.frame_decoded_events(0)); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ParseStatus::Success(); } }
diff --git a/logging/rtc_event_log/rtc_event_log_unittest.cc b/logging/rtc_event_log/rtc_event_log_unittest.cc index 72e15fc..e0fe46a 100644 --- a/logging/rtc_event_log/rtc_event_log_unittest.cc +++ b/logging/rtc_event_log/rtc_event_log_unittest.cc
@@ -546,7 +546,7 @@ } selection -= count.generic_acks_received; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } event_log->StopLogging();
diff --git a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc index 0960c98..e77a671 100644 --- a/logging/rtc_event_log/rtc_event_log_unittest_helper.cc +++ b/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
@@ -462,7 +462,7 @@ return std::make_unique<RtcEventRtcpPacketIncoming>(buffer); } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); rtc::Buffer buffer; return std::make_unique<RtcEventRtcpPacketIncoming>(buffer); } @@ -531,7 +531,7 @@ return std::make_unique<RtcEventRtcpPacketOutgoing>(buffer); } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); rtc::Buffer buffer; return std::make_unique<RtcEventRtcpPacketOutgoing>(buffer); }
diff --git a/media/base/fake_frame_source.cc b/media/base/fake_frame_source.cc index 8a05536..61bc585 100644 --- a/media/base/fake_frame_source.cc +++ b/media/base/fake_frame_source.cc
@@ -52,7 +52,8 @@ case webrtc::kVideoRotation_270: return GetFrame(height_, width_, webrtc::kVideoRotation_0, interval_us_); } - RTC_NOTREACHED() << "Invalid rotation value: " << static_cast<int>(rotation_); + RTC_DCHECK_NOTREACHED() << "Invalid rotation value: " + << static_cast<int>(rotation_); // Without this return, the Windows Visual Studio compiler complains // "not all control paths return a value". return GetFrame();
diff --git a/media/base/rtp_utils.cc b/media/base/rtp_utils.cc index 97a3c4c..c630cbc 100644 --- a/media/base/rtp_utils.cc +++ b/media/base/rtp_utils.cc
@@ -58,7 +58,7 @@ // | ID | len=2 | absolute send time | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ if (length != kAbsSendTimeExtensionLen) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } @@ -84,7 +84,7 @@ // ROC (rollover counter) is at the beginning of the auth tag. const size_t kRocLength = 4; if (tag_length < kRocLength || tag_length > length) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } @@ -105,7 +105,7 @@ auth_required_length, output, sizeof(output)); if (result < tag_length) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } @@ -372,7 +372,7 @@ size_t rtp_start_pos; size_t rtp_length; if (!UnwrapTurnPacket(data, length, &rtp_start_pos, &rtp_length)) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -380,7 +380,7 @@ auto packet = rtc::MakeArrayView(data + rtp_start_pos, rtp_length); if (!webrtc::IsRtpPacket(packet) || !ValidateRtpHeader(data + rtp_start_pos, rtp_length, nullptr)) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/media/engine/fake_webrtc_call.cc b/media/engine/fake_webrtc_call.cc index 62bcab9..7b9174d 100644 --- a/media/engine/fake_webrtc_call.cc +++ b/media/engine/fake_webrtc_call.cc
@@ -413,7 +413,7 @@ } void FakeFlexfecReceiveStream::OnRtpPacket(const webrtc::RtpPacketReceived&) { - RTC_NOTREACHED() << "Not implemented."; + RTC_DCHECK_NOTREACHED() << "Not implemented."; } FakeCall::FakeCall()
diff --git a/media/engine/internal_decoder_factory.cc b/media/engine/internal_decoder_factory.cc index c309318..a9f30c2 100644 --- a/media/engine/internal_decoder_factory.cc +++ b/media/engine/internal_decoder_factory.cc
@@ -73,7 +73,7 @@ absl::EqualsIgnoreCase(format.name, cricket::kAv1CodecName)) return CreateLibaomAv1Decoder(); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; }
diff --git a/media/engine/simulcast.cc b/media/engine/simulcast.cc index 6d65dd2..3909685 100644 --- a/media/engine/simulcast.cc +++ b/media/engine/simulcast.cc
@@ -175,7 +175,7 @@ return i; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; }
diff --git a/media/engine/simulcast_encoder_adapter_unittest.cc b/media/engine/simulcast_encoder_adapter_unittest.cc index beca9d4..f28a1af 100644 --- a/media/engine/simulcast_encoder_adapter_unittest.cc +++ b/media/engine/simulcast_encoder_adapter_unittest.cc
@@ -992,7 +992,7 @@ if (allow_to_i420_) { return I420Buffer::Create(width_, height_); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; }
diff --git a/modules/audio_coding/acm2/acm_receiver_unittest.cc b/modules/audio_coding/acm2/acm_receiver_unittest.cc index 2338a53..e73acc2 100644 --- a/modules/audio_coding/acm2/acm_receiver_unittest.cc +++ b/modules/audio_coding/acm2/acm_receiver_unittest.cc
@@ -119,7 +119,7 @@ rtp_header_, rtc::ArrayView<const uint8_t>(payload_data, payload_len_bytes)); if (ret_val < 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } rtp_header_.sequenceNumber++;
diff --git a/modules/audio_coding/acm2/acm_resampler.cc b/modules/audio_coding/acm2/acm_resampler.cc index 7c7393d..e307c6c 100644 --- a/modules/audio_coding/acm2/acm_resampler.cc +++ b/modules/audio_coding/acm2/acm_resampler.cc
@@ -30,7 +30,7 @@ size_t in_length = in_freq_hz * num_audio_channels / 100; if (in_freq_hz == out_freq_hz) { if (out_capacity_samples < in_length) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } memcpy(out_audio, in_audio, in_length * sizeof(int16_t));
diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc index b742a82..e2081e2 100644 --- a/modules/audio_coding/acm2/audio_coding_module.cc +++ b/modules/audio_coding/acm2/audio_coding_module.cc
@@ -344,13 +344,13 @@ int AudioCodingModuleImpl::Add10MsDataInternal(const AudioFrame& audio_frame, InputData* input_data) { if (audio_frame.samples_per_channel_ == 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, payload length is zero"; return -1; } if (audio_frame.sample_rate_hz_ > kMaxInputSampleRateHz) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, input frequency not valid"; return -1; }
diff --git a/modules/audio_coding/acm2/call_statistics.cc b/modules/audio_coding/acm2/call_statistics.cc index 0aad594..9f3bdad 100644 --- a/modules/audio_coding/acm2/call_statistics.cc +++ b/modules/audio_coding/acm2/call_statistics.cc
@@ -45,7 +45,7 @@ } case AudioFrame::kUndefined: { // If the audio is decoded by NetEq, `kUndefined` is not an option. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } }
diff --git a/modules/audio_coding/audio_network_adaptor/controller_manager.cc b/modules/audio_coding/audio_network_adaptor/controller_manager.cc index 6708bc0..87759c3 100644 --- a/modules/audio_coding/audio_network_adaptor/controller_manager.cc +++ b/modules/audio_coding/audio_network_adaptor/controller_manager.cc
@@ -265,7 +265,7 @@ break; case audio_network_adaptor::config::Controller::kFecControllerRplrBased: // FecControllerRplrBased has been removed and can't be used anymore. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); continue; case audio_network_adaptor::config::Controller::kFrameLengthController: controller = CreateFrameLengthController( @@ -293,7 +293,7 @@ encoder_frame_lengths_ms); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (controller_config.has_scoring_point()) { auto& scoring_point = controller_config.scoring_point(); @@ -321,7 +321,7 @@ } #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif // WEBRTC_ENABLE_PROTOBUF }
diff --git a/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc b/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc index 669cf5e..2616706 100644 --- a/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc +++ b/modules/audio_coding/audio_network_adaptor/debug_dump_writer.cc
@@ -76,7 +76,7 @@ dump_file_ = FileWrapper(file_handle); RTC_CHECK(dump_file_.is_open()); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); #endif }
diff --git a/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.cc b/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.cc index 936e224..c5e5fa7 100644 --- a/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.cc +++ b/modules/audio_coding/audio_network_adaptor/fec_controller_plr_based.cc
@@ -26,7 +26,7 @@ absl::optional<float> GetAverage() override { return last_sample_; } bool SetTimeConstantMs(int time_constant_ms) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/modules/audio_coding/codecs/isac/isac_webrtc_api_test.cc b/modules/audio_coding/codecs/isac/isac_webrtc_api_test.cc index be8d0c6..cafca75 100644 --- a/modules/audio_coding/codecs/isac/isac_webrtc_api_test.cc +++ b/modules/audio_coding/codecs/isac/isac_webrtc_api_test.cc
@@ -51,8 +51,8 @@ filename = test::ResourcePath("audio_coding/testfile32kHz", "pcm"); break; default: - RTC_NOTREACHED() << "No test file available for " << sample_rate_hz - << " Hz."; + RTC_DCHECK_NOTREACHED() + << "No test file available for " << sample_rate_hz << " Hz."; } auto pcm_file = std::make_unique<PCMFile>(); pcm_file->ReadStereo(false);
diff --git a/modules/audio_coding/codecs/legacy_encoded_audio_frame_unittest.cc b/modules/audio_coding/codecs/legacy_encoded_audio_frame_unittest.cc index 1d0c7fe..f81aeee 100644 --- a/modules/audio_coding/codecs/legacy_encoded_audio_frame_unittest.cc +++ b/modules/audio_coding/codecs/legacy_encoded_audio_frame_unittest.cc
@@ -88,7 +88,7 @@ samples_per_ms_ = 8; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/modules/audio_coding/include/audio_coding_module.h b/modules/audio_coding/include/audio_coding_module.h index 9b1dce8..003d966 100644 --- a/modules/audio_coding/include/audio_coding_module.h +++ b/modules/audio_coding/include/audio_coding_module.h
@@ -54,7 +54,7 @@ uint32_t timestamp, const uint8_t* payload_data, size_t payload_len_bytes) { - RTC_NOTREACHED() << "This method must be overridden, or not used."; + RTC_DCHECK_NOTREACHED() << "This method must be overridden, or not used."; return -1; } };
diff --git a/modules/audio_coding/neteq/dsp_helper.cc b/modules/audio_coding/neteq/dsp_helper.cc index 54ec556..a979f94 100644 --- a/modules/audio_coding/neteq/dsp_helper.cc +++ b/modules/audio_coding/neteq/dsp_helper.cc
@@ -354,7 +354,7 @@ break; } default: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } }
diff --git a/modules/audio_coding/neteq/dtmf_tone_generator.cc b/modules/audio_coding/neteq/dtmf_tone_generator.cc index 49cbf8f..9061e27 100644 --- a/modules/audio_coding/neteq/dtmf_tone_generator.cc +++ b/modules/audio_coding/neteq/dtmf_tone_generator.cc
@@ -119,7 +119,7 @@ } else if (fs == 48000) { fs_index = 3; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); fs_index = 1; // Default to 8000 Hz. }
diff --git a/modules/audio_coding/neteq/merge.cc b/modules/audio_coding/neteq/merge.cc index ca5ec22..22cf6a7 100644 --- a/modules/audio_coding/neteq/merge.cc +++ b/modules/audio_coding/neteq/merge.cc
@@ -372,7 +372,7 @@ while (((best_correlation_index + input_length) < (timestamps_per_call_ + expand_->overlap_length())) || ((best_correlation_index + input_length) < start_position)) { - RTC_NOTREACHED(); // Should never happen. + RTC_DCHECK_NOTREACHED(); // Should never happen. best_correlation_index += expand_period; // Jump one lag ahead. } return best_correlation_index;
diff --git a/modules/audio_coding/neteq/neteq_impl.cc b/modules/audio_coding/neteq/neteq_impl.cc index 6107b17..7e3c4ef 100644 --- a/modules/audio_coding/neteq/neteq_impl.cc +++ b/modules/audio_coding/neteq/neteq_impl.cc
@@ -221,7 +221,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (!vad_enabled) { // Always set kVadUnknown when receive VAD is inactive. @@ -894,7 +894,7 @@ } case Operation::kUndefined: { RTC_LOG(LS_ERROR) << "Invalid operation kUndefined."; - RTC_NOTREACHED(); // This should not happen. + RTC_DCHECK_NOTREACHED(); // This should not happen. last_mode_ = Mode::kError; return kInvalidOperation; } @@ -1057,7 +1057,7 @@ // Don't use this packet, discard it. if (packet_buffer_->DiscardNextPacket(stats_.get()) != PacketBuffer::kOK) { - RTC_NOTREACHED(); // Must be ok by design. + RTC_DCHECK_NOTREACHED(); // Must be ok by design. } // Check buffer again. if (!new_codec_) { @@ -1877,7 +1877,7 @@ // // it must be copied to the speech buffer. // // TODO(hlundin): This code seems incorrect. (Legacy.) Write test and // // verify correct operation. - // RTC_NOTREACHED(); + // RTC_DCHECK_NOTREACHED(); // // Must generate enough data to replace all of the `sync_buffer_` // // "future". // int required_length = sync_buffer_->FutureLength(); @@ -1967,7 +1967,8 @@ next_packet = nullptr; if (!packet) { RTC_LOG(LS_ERROR) << "Should always be able to extract a packet here"; - RTC_NOTREACHED(); // Should always be able to extract a packet here. + RTC_DCHECK_NOTREACHED(); // Should always be able to extract a packet + // here. return -1; } const uint64_t waiting_time_ms = packet->waiting_time->ElapsedMs(); @@ -2001,7 +2002,7 @@ } else if (!has_cng_packet) { RTC_LOG(LS_WARNING) << "Unknown payload type " << static_cast<int>(packet->payload_type); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (packet_duration == 0) {
diff --git a/modules/audio_coding/neteq/sync_buffer.cc b/modules/audio_coding/neteq/sync_buffer.cc index 80e1691..7d7cac7 100644 --- a/modules/audio_coding/neteq/sync_buffer.cc +++ b/modules/audio_coding/neteq/sync_buffer.cc
@@ -28,7 +28,7 @@ next_index_ -= samples_added; } else { // This means that we are pushing out future data that was never used. - // RTC_NOTREACHED(); + // RTC_DCHECK_NOTREACHED(); // TODO(hlundin): This assert must be disabled to support 60 ms frames. // This should not happen even for 60 ms frames, but it does. Investigate // why.
diff --git a/modules/audio_coding/neteq/tools/rtp_encode.cc b/modules/audio_coding/neteq/tools/rtp_encode.cc index 204f169..ee392f2 100644 --- a/modules/audio_coding/neteq/tools/rtp_encode.cc +++ b/modules/audio_coding/neteq/tools/rtp_encode.cc
@@ -191,7 +191,7 @@ config.sample_rate_hz = 48000; return config; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return config; } } @@ -242,7 +242,7 @@ GetCodecConfig<AudioEncoderIsac>(), payload_type); } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -259,7 +259,7 @@ case 48000: return 100; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return 0; };
diff --git a/modules/audio_device/audio_device_data_observer.cc b/modules/audio_device/audio_device_data_observer.cc index be78fd1..f655c5a 100644 --- a/modules/audio_device/audio_device_data_observer.cc +++ b/modules/audio_device/audio_device_data_observer.cc
@@ -110,7 +110,7 @@ void* audio_data, int64_t* elapsed_time_ms, int64_t* ntp_time_ms) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // Override AudioDeviceModule's RegisterAudioCallback method to remember the
diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc index a0ec149..51a8575 100644 --- a/modules/audio_device/audio_device_unittest.cc +++ b/modules/audio_device/audio_device_unittest.cc
@@ -176,7 +176,7 @@ (static_cast<int32_t>(buffer[2 * i]) + buffer[2 * i + 1]) / 2; } } else { - RTC_NOTREACHED() << "Required conversion is not support"; + RTC_DCHECK_NOTREACHED() << "Required conversion is not support"; } fifo_.pop_front(); }
diff --git a/modules/audio_device/win/audio_device_core_win.cc b/modules/audio_device/win/audio_device_core_win.cc index f1b6b93..6365d9f 100644 --- a/modules/audio_device/win/audio_device_core_win.cc +++ b/modules/audio_device/win/audio_device_core_win.cc
@@ -3009,7 +3009,7 @@ if (FAILED(hr)) { _TraceCOMError(hr); keepRecording = false; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } @@ -3021,7 +3021,7 @@ if (FAILED(hr)) { _TraceCOMError(hr); keepRecording = false; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } @@ -3046,7 +3046,7 @@ if (FAILED(hr)) { _TraceCOMError(hr); keepRecording = false; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; }
diff --git a/modules/audio_device/win/core_audio_utility_win.h b/modules/audio_device/win/core_audio_utility_win.h index afadee5..fa7b198 100644 --- a/modules/audio_device/win/core_audio_utility_win.h +++ b/modules/audio_device/win/core_audio_utility_win.h
@@ -244,7 +244,7 @@ void Close() { if (handle_) { if (!::CloseHandle(handle_)) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } handle_ = nullptr; }
diff --git a/modules/audio_processing/aec3/aec3_fft.cc b/modules/audio_processing/aec3/aec3_fft.cc index 8dfa183..9cc8016 100644 --- a/modules/audio_processing/aec3/aec3_fft.cc +++ b/modules/audio_processing/aec3/aec3_fft.cc
@@ -101,10 +101,10 @@ [](float a, float b) { return a * b; }); break; case Window::kSqrtHanning: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } Fft(&fft, X); @@ -125,7 +125,7 @@ std::copy(x.begin(), x.end(), fft.begin() + x_old.size()); break; case Window::kHanning: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case Window::kSqrtHanning: std::transform(x_old.begin(), x_old.end(), std::begin(kSqrtHanning128), @@ -135,7 +135,7 @@ fft.begin() + x_old.size(), std::multiplies<float>()); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } Fft(&fft, X);
diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc index dfa932f..6316a2b 100644 --- a/modules/audio_processing/aec3/echo_canceller3.cc +++ b/modules/audio_processing/aec3/echo_canceller3.cc
@@ -797,7 +797,7 @@ if (linear_output && !linear_output_framer_) { RTC_LOG(LS_ERROR) << "Trying to retrieve the linear AEC output without " "properly configuring AEC3."; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // Report capture call in the metrics and periodically update API call
diff --git a/modules/audio_processing/aec3/echo_remover_metrics.cc b/modules/audio_processing/aec3/echo_remover_metrics.cc index 1ceb329..c3fc807 100644 --- a/modules/audio_processing/aec3/echo_remover_metrics.cc +++ b/modules/audio_processing/aec3/echo_remover_metrics.cc
@@ -113,7 +113,7 @@ ResetMetrics(); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/modules/audio_processing/aec3/matched_filter.cc b/modules/audio_processing/aec3/matched_filter.cc index 1721e9c..c6747cb 100644 --- a/modules/audio_processing/aec3/matched_filter.cc +++ b/modules/audio_processing/aec3/matched_filter.cc
@@ -442,7 +442,7 @@ data_dumper_->DumpRaw("aec3_correlator_9_h", filters_[9]); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } alignment_shift += filter_intra_lag_shift_;
diff --git a/modules/audio_processing/aec3/reverb_decay_estimator.cc b/modules/audio_processing/aec3/reverb_decay_estimator.cc index 24f579b..2daf376 100644 --- a/modules/audio_processing/aec3/reverb_decay_estimator.cc +++ b/modules/audio_processing/aec3/reverb_decay_estimator.cc
@@ -296,7 +296,7 @@ float ReverbDecayEstimator::LateReverbLinearRegressor::Estimate() { RTC_DCHECK(EstimateAvailable()); if (nn_ == 0.f) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0.f; } return nz_ / nn_;
diff --git a/modules/audio_processing/aec_dump/aec_dump_impl.cc b/modules/audio_processing/aec_dump/aec_dump_impl.cc index 4497d57..160583e 100644 --- a/modules/audio_processing/aec_dump/aec_dump_impl.cc +++ b/modules/audio_processing/aec_dump/aec_dump_impl.cc
@@ -230,7 +230,7 @@ break; } case AudioProcessing::RuntimeSetting::Type::kNotSpecified: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } worker_queue_->PostTask(std::move(task));
diff --git a/modules/audio_processing/aec_dump/write_to_file_task.cc b/modules/audio_processing/aec_dump/write_to_file_task.cc index 4839a09..cd083d2 100644 --- a/modules/audio_processing/aec_dump/write_to_file_task.cc +++ b/modules/audio_processing/aec_dump/write_to_file_task.cc
@@ -55,10 +55,10 @@ // Write message preceded by its size. if (!debug_file_->Write(&event_byte_size, sizeof(int32_t))) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (!debug_file_->Write(event_string.data(), event_string.length())) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return true; // Delete task from queue at once. }
diff --git a/modules/audio_processing/agc/agc.cc b/modules/audio_processing/agc/agc.cc index a89ae11..e36d32c 100644 --- a/modules/audio_processing/agc/agc.cc +++ b/modules/audio_processing/agc/agc.cc
@@ -48,7 +48,7 @@ bool Agc::GetRmsErrorDb(int* error) { if (!error) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/modules/audio_processing/agc/clipping_predictor.cc b/modules/audio_processing/agc/clipping_predictor.cc index 982bbca..58b3a27 100644 --- a/modules/audio_processing/agc/clipping_predictor.cc +++ b/modules/audio_processing/agc/clipping_predictor.cc
@@ -377,7 +377,7 @@ config.reference_window_delay, config.clipping_threshold, /*adaptive_step_estimation=*/false); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } // namespace webrtc
diff --git a/modules/audio_processing/agc2/interpolated_gain_curve.cc b/modules/audio_processing/agc2/interpolated_gain_curve.cc index ac7fbec..b522ec3 100644 --- a/modules/audio_processing/agc2/interpolated_gain_curve.cc +++ b/modules/audio_processing/agc2/interpolated_gain_curve.cc
@@ -115,7 +115,7 @@ break; } default: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } }
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc index 169ffe4..8a3ddf5 100644 --- a/modules/audio_processing/audio_processing_impl.cc +++ b/modules/audio_processing/audio_processing_impl.cc
@@ -61,7 +61,7 @@ return true; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -97,7 +97,7 @@ return rate; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return uppermost_native_rate; } @@ -702,12 +702,12 @@ return enqueueing_successful; } case RuntimeSetting::Type::kNotSpecified: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return true; } // The language allows the enum to have a non-enumerator // value. Check that this doesn't happen. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return true; } @@ -878,13 +878,13 @@ break; } case RuntimeSetting::Type::kPlayoutAudioDeviceChange: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case RuntimeSetting::Type::kCustomRenderProcessingRuntimeSetting: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case RuntimeSetting::Type::kNotSpecified: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case RuntimeSetting::Type::kCaptureOutputUsed: bool value; @@ -928,7 +928,7 @@ case RuntimeSetting::Type::kCaptureFixedPostGain: // fall-through case RuntimeSetting::Type::kCaptureOutputUsed: // fall-through case RuntimeSetting::Type::kNotSpecified: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } @@ -1592,7 +1592,7 @@ return true; } RTC_LOG(LS_ERROR) << "No linear AEC output available"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/modules/audio_processing/audio_processing_performance_unittest.cc b/modules/audio_processing/audio_processing_performance_unittest.cc index 9a5e374..67ddcd7 100644 --- a/modules/audio_processing/audio_processing_performance_unittest.cc +++ b/modules/audio_processing/audio_processing_performance_unittest.cc
@@ -367,7 +367,7 @@ // Should not be reached, but the return statement is needed for the code to // build successfully on Android. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/modules/audio_processing/audio_processing_unittest.cc b/modules/audio_processing/audio_processing_unittest.cc index cfb19f9..2a91b6a 100644 --- a/modules/audio_processing/audio_processing_unittest.cc +++ b/modules/audio_processing/audio_processing_unittest.cc
@@ -105,7 +105,7 @@ case AudioProcessing::kStereoAndKeyboard: return 3; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -272,7 +272,7 @@ } else if (num_output_channels == 2) { ss << "stereo"; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ss << output_rate / 1000; if (num_reverse_output_channels == 1) { @@ -280,7 +280,7 @@ } else if (num_reverse_output_channels == 2) { ss << "_rstereo"; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ss << reverse_output_rate / 1000; ss << "_d" << file_direction << "_pcm";
diff --git a/modules/audio_processing/common.h b/modules/audio_processing/common.h index 2c88c4e..e14279e 100644 --- a/modules/audio_processing/common.h +++ b/modules/audio_processing/common.h
@@ -29,7 +29,7 @@ case AudioProcessing::kStereoAndKeyboard: return 2; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; }
diff --git a/modules/audio_processing/echo_control_mobile_impl.cc b/modules/audio_processing/echo_control_mobile_impl.cc index 8116608..667d6bf 100644 --- a/modules/audio_processing/echo_control_mobile_impl.cc +++ b/modules/audio_processing/echo_control_mobile_impl.cc
@@ -36,7 +36,7 @@ case EchoControlMobileImpl::kLoudSpeakerphone: return 4; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; }
diff --git a/modules/audio_processing/gain_control_impl.cc b/modules/audio_processing/gain_control_impl.cc index b5454c0..3fac1f7 100644 --- a/modules/audio_processing/gain_control_impl.cc +++ b/modules/audio_processing/gain_control_impl.cc
@@ -35,7 +35,7 @@ case GainControl::kFixedDigital: return kAgcModeFixedDigital; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; }
diff --git a/modules/audio_processing/high_pass_filter.cc b/modules/audio_processing/high_pass_filter.cc index bff7209..3b4740f 100644 --- a/modules/audio_processing/high_pass_filter.cc +++ b/modules/audio_processing/high_pass_filter.cc
@@ -44,9 +44,9 @@ case 48000: return kHighPassFilterCoefficients48kHz; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kHighPassFilterCoefficients16kHz; }
diff --git a/modules/audio_processing/ns/suppression_params.cc b/modules/audio_processing/ns/suppression_params.cc index 9a6bd5a..7bf1834 100644 --- a/modules/audio_processing/ns/suppression_params.cc +++ b/modules/audio_processing/ns/suppression_params.cc
@@ -42,7 +42,7 @@ use_attenuation_adjustment = true; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/modules/audio_processing/test/bitexactness_tools.cc b/modules/audio_processing/test/bitexactness_tools.cc index f245c2c..0464345 100644 --- a/modules/audio_processing/test/bitexactness_tools.cc +++ b/modules/audio_processing/test/bitexactness_tools.cc
@@ -33,7 +33,7 @@ case 48000: return ResourcePath("far48_stereo", "pcm"); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return ""; } @@ -49,7 +49,7 @@ case 48000: return ResourcePath("near48_stereo", "pcm"); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return ""; }
diff --git a/modules/audio_processing/test/fake_recording_device.cc b/modules/audio_processing/test/fake_recording_device.cc index 5202014..3a35ee9 100644 --- a/modules/audio_processing/test/fake_recording_device.cc +++ b/modules/audio_processing/test/fake_recording_device.cc
@@ -148,7 +148,7 @@ worker_ = std::make_unique<FakeRecordingDeviceAgc1>(initial_mic_level); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/modules/audio_processing/transient/transient_suppressor_impl.cc b/modules/audio_processing/transient/transient_suppressor_impl.cc index 8e43d78..f8161f6 100644 --- a/modules/audio_processing/transient/transient_suppressor_impl.cc +++ b/modules/audio_processing/transient/transient_suppressor_impl.cc
@@ -102,7 +102,7 @@ detector_.reset(new TransientDetector(detection_rate_hz)); data_length_ = sample_rate_hz * ts::kChunkSizeMs / 1000; if (data_length_ > analysis_length_) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } buffer_delay_ = analysis_length_ - data_length_;
diff --git a/modules/audio_processing/voice_detection.cc b/modules/audio_processing/voice_detection.cc index e6c92ae..1a633e2 100644 --- a/modules/audio_processing/voice_detection.cc +++ b/modules/audio_processing/voice_detection.cc
@@ -54,7 +54,7 @@ mode = 0; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } int error = WebRtcVad_set_mode(vad_->state(), mode);
diff --git a/modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.cc b/modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.cc index c7f53c6..33974dc 100644 --- a/modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.cc +++ b/modules/congestion_controller/goog_cc/loss_based_bandwidth_estimation.cc
@@ -36,7 +36,7 @@ } auto rtt_range = config.increase_high_rtt.Get() - config.increase_low_rtt; if (rtt_range <= TimeDelta::Zero()) { - RTC_NOTREACHED(); // Only on misconfiguration. + RTC_DCHECK_NOTREACHED(); // Only on misconfiguration. return config.min_increase_factor; } auto rtt_offset = rtt - config.increase_low_rtt; @@ -57,7 +57,7 @@ DataRate loss_bandwidth_balance, double exponent) { if (exponent <= 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return DataRate::Infinity(); } if (loss < 1e-5) @@ -69,7 +69,7 @@ // Use the convention that exponential window length (which is really // infinite) is the time it takes to dampen to 1/e. if (window <= TimeDelta::Zero()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 1.0f; } return 1.0f - exp(interval / window * -1.0); @@ -134,7 +134,7 @@ const std::vector<PacketResult>& packet_results, Timestamp at_time) { if (packet_results.empty()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } int loss_count = 0;
diff --git a/modules/desktop_capture/cropping_window_capturer_win.cc b/modules/desktop_capture/cropping_window_capturer_win.cc index bbd3553..64d9219 100644 --- a/modules/desktop_capture/cropping_window_capturer_win.cc +++ b/modules/desktop_capture/cropping_window_capturer_win.cc
@@ -118,7 +118,7 @@ // firing an assert when enabled, report that the selected window isn't // topmost to avoid inadvertent capture of other windows. RTC_LOG(LS_ERROR) << "Failed to enumerate windows: " << lastError; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } }
diff --git a/modules/desktop_capture/desktop_frame_rotation.cc b/modules/desktop_capture/desktop_frame_rotation.cc index daef385..f2745cf 100644 --- a/modules/desktop_capture/desktop_frame_rotation.cc +++ b/modules/desktop_capture/desktop_frame_rotation.cc
@@ -28,7 +28,7 @@ case Rotation::CLOCK_WISE_270: return libyuv::kRotate270; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return libyuv::kRotate0; } @@ -54,7 +54,7 @@ case Rotation::CLOCK_WISE_270: return Rotation::CLOCK_WISE_90; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return Rotation::CLOCK_WISE_0; } @@ -67,7 +67,7 @@ case Rotation::CLOCK_WISE_270: return DesktopSize(size.height(), size.width()); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return DesktopSize(); } @@ -86,7 +86,7 @@ return DesktopRect::MakeXYWH(rect.top(), size.width() - rect.right(), rect.height(), rect.width()); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return DesktopRect(); }
diff --git a/modules/desktop_capture/linux/base_capturer_pipewire.cc b/modules/desktop_capture/linux/base_capturer_pipewire.cc index 54ff575..3be24f2 100644 --- a/modules/desktop_capture/linux/base_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/base_capturer_pipewire.cc
@@ -170,7 +170,7 @@ public: Scoped() {} explicit Scoped(T* val) { ptr_ = val; } - ~Scoped() { RTC_NOTREACHED(); } + ~Scoped() { RTC_DCHECK_NOTREACHED(); } T* operator->() { return ptr_; }
diff --git a/modules/desktop_capture/screen_drawer_linux.cc b/modules/desktop_capture/screen_drawer_linux.cc index afd29ce..8231265 100644 --- a/modules/desktop_capture/screen_drawer_linux.cc +++ b/modules/desktop_capture/screen_drawer_linux.cc
@@ -63,7 +63,7 @@ if (!XGetWindowAttributes(display_->display(), RootWindow(display_->display(), screen_num_), &root_attributes)) { - RTC_NOTREACHED() << "Failed to get root window size."; + RTC_DCHECK_NOTREACHED() << "Failed to get root window size."; } window_ = XCreateSimpleWindow( display_->display(), RootWindow(display_->display(), screen_num_), 0, 0, @@ -85,7 +85,7 @@ if (!XTranslateCoordinates(display_->display(), window_, RootWindow(display_->display(), screen_num_), 0, 0, &x, &y, &child)) { - RTC_NOTREACHED() << "Failed to get window position."; + RTC_DCHECK_NOTREACHED() << "Failed to get window position."; } // Some window manager does not allow a window to cover two or more monitors. // So if the window is on the first monitor of a two-monitor system, the
diff --git a/modules/desktop_capture/screen_drawer_lock_posix.cc b/modules/desktop_capture/screen_drawer_lock_posix.cc index 095189b..bfee619 100644 --- a/modules/desktop_capture/screen_drawer_lock_posix.cc +++ b/modules/desktop_capture/screen_drawer_lock_posix.cc
@@ -32,7 +32,7 @@ semaphore_ = sem_open(name, O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 1); if (semaphore_ == SEM_FAILED) { RTC_LOG_ERRNO(LS_ERROR) << "Failed to create named semaphore with " << name; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } sem_wait(semaphore_);
diff --git a/modules/desktop_capture/win/dxgi_output_duplicator.cc b/modules/desktop_capture/win/dxgi_output_duplicator.cc index 177e126..caad6f4 100644 --- a/modules/desktop_capture/win/dxgi_output_duplicator.cc +++ b/modules/desktop_capture/win/dxgi_output_duplicator.cc
@@ -55,7 +55,7 @@ return Rotation::CLOCK_WISE_270; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return Rotation::CLOCK_WISE_0; }
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc index 0a754e1..408f208 100644 --- a/modules/remote_bitrate_estimator/aimd_rate_control.cc +++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -361,7 +361,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } current_bitrate_ = ClampBitrate(new_bitrate.value_or(current_bitrate_)); @@ -416,7 +416,7 @@ rate_control_state_ = RateControlState::kRcHold; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/modules/rtp_rtcp/include/rtp_cvo.h b/modules/rtp_rtcp/include/rtp_cvo.h index bc0b4ee..497946d 100644 --- a/modules/rtp_rtcp/include/rtp_cvo.h +++ b/modules/rtp_rtcp/include/rtp_cvo.h
@@ -30,7 +30,7 @@ case kVideoRotation_270: return 3; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -47,7 +47,7 @@ case 3: return kVideoRotation_270; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kVideoRotation_0; } }
diff --git a/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc b/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc index 59541c4..2fbb3ca 100644 --- a/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc +++ b/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc
@@ -233,7 +233,8 @@ // We must expand it with zeros. return kFlexfecPacketMaskSizes[2]; } - RTC_NOTREACHED() << "Incorrect packet mask size: " << packet_mask_size << "."; + RTC_DCHECK_NOTREACHED() << "Incorrect packet mask size: " << packet_mask_size + << "."; return kFlexfecPacketMaskSizes[2]; } @@ -311,8 +312,8 @@ written_packet_mask[2] |= 0x40; // Set bit 15. } } else { - RTC_NOTREACHED() << "Incorrect packet mask size: " << packet_mask_size - << "."; + RTC_DCHECK_NOTREACHED() + << "Incorrect packet mask size: " << packet_mask_size << "."; } }
diff --git a/modules/rtp_rtcp/source/forward_error_correction_internal.cc b/modules/rtp_rtcp/source/forward_error_correction_internal.cc index 400b640..ac68162 100644 --- a/modules/rtp_rtcp/source/forward_error_correction_internal.cc +++ b/modules/rtp_rtcp/source/forward_error_correction_internal.cc
@@ -266,7 +266,7 @@ } } } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/modules/rtp_rtcp/source/packet_sequencer.cc b/modules/rtp_rtcp/source/packet_sequencer.cc index a0c27de..037542d 100644 --- a/modules/rtp_rtcp/source/packet_sequencer.cc +++ b/modules/rtp_rtcp/source/packet_sequencer.cc
@@ -66,7 +66,7 @@ } packet.SetSequenceNumber(rtx_sequence_number_++); } else { - RTC_NOTREACHED() << "Unexpected ssrc " << packet.Ssrc(); + RTC_DCHECK_NOTREACHED() << "Unexpected ssrc " << packet.Ssrc(); } }
diff --git a/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc b/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc index 71d0ab5..50102c2 100644 --- a/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc +++ b/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc
@@ -484,7 +484,7 @@ return false; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } ++seq_no;
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc index 597bb3c..a07e5aa 100644 --- a/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -742,8 +742,8 @@ } auto builder_it = builders_.find(rtcp_packet_type); if (builder_it == builders_.end()) { - RTC_NOTREACHED() << "Could not find builder for packet type " - << rtcp_packet_type; + RTC_DCHECK_NOTREACHED() + << "Could not find builder for packet type " << rtcp_packet_type; } else { BuilderFunc func = builder_it->second; (this->*func)(context, sender);
diff --git a/modules/rtp_rtcp/source/rtp_header_extension_map.cc b/modules/rtp_rtcp/source/rtp_header_extension_map.cc index 3c96593..4b8c7b5 100644 --- a/modules/rtp_rtcp/source/rtp_header_extension_map.cc +++ b/modules/rtp_rtcp/source/rtp_header_extension_map.cc
@@ -93,7 +93,7 @@ for (const ExtensionInfo& extension : kExtensions) if (type == extension.type) return Register(id, extension.type, extension.uri); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc index 029a5fb..feda738 100644 --- a/modules/rtp_rtcp/source/rtp_sender.cc +++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -125,7 +125,7 @@ return false; case kRtpExtensionNone: case kRtpExtensionNumberOfExtensions: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } RTC_CHECK_NOTREACHED();
diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc index c9fc782..da5dad5 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -107,7 +107,7 @@ case VideoFrameType::kVideoFrameDelta: return "video_delta"; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } }
diff --git a/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc b/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc index 8941f1c..25ceee5 100644 --- a/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc +++ b/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
@@ -509,7 +509,7 @@ } else if (code_type == xor_bursty_code) { CopyMetrics(&kMetricsXorBursty[code_index], metrics_code); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/modules/video_capture/windows/sink_filter_ds.cc b/modules/video_capture/windows/sink_filter_ds.cc index e07cd68..9a0cf47 100644 --- a/modules/video_capture/windows/sink_filter_ds.cc +++ b/modules/video_capture/windows/sink_filter_ds.cc
@@ -58,7 +58,7 @@ } STDMETHOD(Clone)(IEnumPins** pins) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -83,7 +83,7 @@ } STDMETHOD(Skip)(ULONG count) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -274,7 +274,7 @@ // IEnumMediaTypes STDMETHOD(Clone)(IEnumMediaTypes** pins) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -359,12 +359,12 @@ media_type->subtype = MEDIASUBTYPE_MJPG; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } STDMETHOD(Skip)(ULONG count) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -538,7 +538,7 @@ return VFW_E_NOT_STOPPED; if (receive_pin_) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return VFW_E_ALREADY_CONNECTED; } @@ -564,7 +564,7 @@ RTC_DCHECK(Filter()->IsStopped()); if (receive_pin_) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return VFW_E_ALREADY_CONNECTED; }
diff --git a/modules/video_coding/codecs/h264/h264.cc b/modules/video_coding/codecs/h264/h264.cc index ca6ce3c..8324b7c 100644 --- a/modules/video_coding/codecs/h264/h264.cc +++ b/modules/video_coding/codecs/h264/h264.cc
@@ -102,7 +102,7 @@ RTC_LOG(LS_INFO) << "Creating H264EncoderImpl."; return std::make_unique<H264EncoderImpl>(codec); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif } @@ -127,7 +127,7 @@ RTC_LOG(LS_INFO) << "Creating H264DecoderImpl."; return std::make_unique<H264DecoderImpl>(); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif }
diff --git a/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/modules/video_coding/codecs/h264/h264_encoder_impl.cc index 4256926..b8c6916 100644 --- a/modules/video_coding/codecs/h264/h264_encoder_impl.cc +++ b/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -81,7 +81,7 @@ case videoFrameTypeInvalid: break; } - RTC_NOTREACHED() << "Unexpected/invalid frame type: " << type; + RTC_DCHECK_NOTREACHED() << "Unexpected/invalid frame type: " << type; return VideoFrameType::kEmptyFrame; } @@ -537,7 +537,7 @@ } else if (codec_.mode == VideoCodecMode::kScreensharing) { encoder_params.iUsageType = SCREEN_CONTENT_REAL_TIME; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } encoder_params.iPicWidth = configurations_[i].width; encoder_params.iPicHeight = configurations_[i].height;
diff --git a/modules/video_coding/codecs/h264/include/h264_globals.h b/modules/video_coding/codecs/h264/include/h264_globals.h index 073d8f9..b61dc8c 100644 --- a/modules/video_coding/codecs/h264/include/h264_globals.h +++ b/modules/video_coding/codecs/h264/include/h264_globals.h
@@ -52,7 +52,7 @@ } else if (mode == H264PacketizationMode::SingleNalUnit) { return "SingleNalUnit"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; }
diff --git a/modules/video_coding/codecs/interface/libvpx_interface.cc b/modules/video_coding/codecs/interface/libvpx_interface.cc index b24922f..4f33bef 100644 --- a/modules/video_coding/codecs/interface/libvpx_interface.cc +++ b/modules/video_coding/codecs/interface/libvpx_interface.cc
@@ -133,7 +133,7 @@ case VP9E_SET_POSTENCODE_DROP: return vpx_codec_control(ctx, VP9E_SET_POSTENCODE_DROP, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -181,7 +181,7 @@ // Might be intended for uint32_t but int literal used, try fallback. return codec_control(ctx, ctrl_id, static_cast<uint32_t>(param)); } - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -199,7 +199,7 @@ case VP9E_GET_LEVEL: return vpx_codec_control(ctx, VP9E_GET_LEVEL, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -213,7 +213,7 @@ case VP9E_SET_ROI_MAP: return vpx_codec_control(ctx, VP9E_SET_ROI_MAP, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -227,7 +227,7 @@ case VP9E_GET_ACTIVEMAP: return vpx_codec_control(ctx, VP8E_SET_ACTIVEMAP, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -239,7 +239,7 @@ case VP8E_SET_SCALEMODE: return vpx_codec_control(ctx, VP8E_SET_SCALEMODE, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -251,7 +251,7 @@ case VP9E_SET_SVC_PARAMETERS: return vpx_codec_control_(ctx, VP9E_SET_SVC_PARAMETERS, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -263,7 +263,7 @@ case VP9E_SET_SVC_FRAME_DROP_LAYER: return vpx_codec_control_(ctx, VP9E_SET_SVC_FRAME_DROP_LAYER, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -277,7 +277,7 @@ case VP9E_REGISTER_CX_CALLBACK: return vpx_codec_control_(ctx, VP9E_REGISTER_CX_CALLBACK, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -291,7 +291,7 @@ case VP9E_GET_SVC_LAYER_ID: return vpx_codec_control_(ctx, VP9E_GET_SVC_LAYER_ID, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -306,7 +306,7 @@ case VP9E_GET_SVC_REF_FRAME_CONFIG: return vpx_codec_control_(ctx, VP9E_GET_SVC_REF_FRAME_CONFIG, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -319,7 +319,7 @@ case VP9E_SET_SVC_SPATIAL_LAYER_SYNC: return vpx_codec_control_(ctx, VP9E_SET_SVC_SPATIAL_LAYER_SYNC, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; } @@ -331,7 +331,7 @@ case VP9E_SET_EXTERNAL_RATE_CONTROL: return vpx_codec_control_(ctx, VP9E_SET_EXTERNAL_RATE_CONTROL, param); default: - RTC_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; + RTC_DCHECK_NOTREACHED() << "Unsupported libvpx ctrl_id: " << ctrl_id; } return VPX_CODEC_ERROR; }
diff --git a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc index e1bf598..0ad3d38 100644 --- a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc +++ b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
@@ -36,11 +36,11 @@ adapter_->Decoded(stream_idx_, &decoded_image, decode_time_ms, qp); } int32_t Decoded(VideoFrame& decoded_image) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return WEBRTC_VIDEO_CODEC_OK; } int32_t Decoded(VideoFrame& decoded_image, int64_t decode_time_ms) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return WEBRTC_VIDEO_CODEC_OK; }
diff --git a/modules/video_coding/codecs/test/video_codec_unittest.h b/modules/video_coding/codecs/test/video_codec_unittest.h index 13bcbf0..7d05882 100644 --- a/modules/video_coding/codecs/test/video_codec_unittest.h +++ b/modules/video_coding/codecs/test/video_codec_unittest.h
@@ -54,11 +54,11 @@ : test_(test) {} int32_t Decoded(VideoFrame& frame) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } int32_t Decoded(VideoFrame& frame, int64_t decode_time_ms) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } void Decoded(VideoFrame& frame,
diff --git a/modules/video_coding/codecs/test/video_encoder_decoder_instantiation_tests.cc b/modules/video_coding/codecs/test/video_encoder_decoder_instantiation_tests.cc index e7a7f7d..41f2304 100644 --- a/modules/video_coding/codecs/test/video_encoder_decoder_instantiation_tests.cc +++ b/modules/video_coding/codecs/test/video_encoder_decoder_instantiation_tests.cc
@@ -73,7 +73,7 @@ encoder_factory_ = CreateObjCEncoderFactory(); decoder_factory_ = CreateObjCDecoderFactory(); #else - RTC_NOTREACHED() << "Only support Android and iOS."; + RTC_DCHECK_NOTREACHED() << "Only support Android and iOS."; #endif }
diff --git a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc index 0020c80..03da293 100644 --- a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc +++ b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
@@ -350,7 +350,7 @@ EXPECT_FALSE(contains_pps) << "Delta frame should not contain PPS."; EXPECT_FALSE(contains_idr) << "Delta frame should not contain IDR."; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/modules/video_coding/codecs/test/videocodec_test_libvpx.cc b/modules/video_coding/codecs/test/videocodec_test_libvpx.cc index 0eb0d5a..062375b 100644 --- a/modules/video_coding/codecs/test/videocodec_test_libvpx.cc +++ b/modules/video_coding/codecs/test/videocodec_test_libvpx.cc
@@ -49,7 +49,7 @@ } else if (codec == kVideoCodecVP9) { EXPECT_TRUE(vp9::GetQp(encoded_frame.data(), encoded_frame.size(), &qp)); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } EXPECT_EQ(encoded_frame.qp_, qp) << "Encoder QP != parsed bitstream QP."; }
diff --git a/modules/video_coding/codecs/vp8/default_temporal_layers.cc b/modules/video_coding/codecs/vp8/default_temporal_layers.cc index 4de8d91..94860da 100644 --- a/modules/video_coding/codecs/vp8/default_temporal_layers.cc +++ b/modules/video_coding/codecs/vp8/default_temporal_layers.cc
@@ -78,10 +78,10 @@ // 0 0 ... return {0, 3, 2, 3, 1, 3, 2, 3}; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {0}; } @@ -236,10 +236,10 @@ {"----", {kReference, kReference, kReferenceAndUpdate}}, {"----", {kReference, kReference, kReference, kFreezeEntropy}}}; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {{"", {kNone, kNone, kNone}}}; } @@ -694,7 +694,7 @@ return template_structure; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); // To make the compiler happy! return template_structure; } @@ -725,7 +725,7 @@ {0}, {4, 6, 8}, {4, 6, 8}, {4, 8, 10}, {4, 8}, {8, 10, 12}, {8, 10, 12}, {8, 12, 14}}; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; } }
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc index 0d6fdfa..44a379f 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
@@ -205,7 +205,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -1357,7 +1357,7 @@ MaybeUpdatePixelFormat(VPX_IMG_FMT_NV12); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // Prepare `raw_images_` from `mapped_buffer` and, if simulcast, scaled @@ -1399,10 +1399,11 @@ << " instead of " << VideoFrameBufferTypeToString(mapped_buffer->type()) << ". Can't encode frame."; - RTC_NOTREACHED() << "Scaled buffer type " - << VideoFrameBufferTypeToString(scaled_buffer->type()) - << " is not compatible with mapped buffer type " - << VideoFrameBufferTypeToString(mapped_buffer->type()); + RTC_DCHECK_NOTREACHED() + << "Scaled buffer type " + << VideoFrameBufferTypeToString(scaled_buffer->type()) + << " is not compatible with mapped buffer type " + << VideoFrameBufferTypeToString(mapped_buffer->type()); return {}; } SetRawImagePlanes(&raw_images_[i], scaled_buffer);
diff --git a/modules/video_coding/codecs/vp8/screenshare_layers.cc b/modules/video_coding/codecs/vp8/screenshare_layers.cc index 27d070f..71db0b2 100644 --- a/modules/video_coding/codecs/vp8/screenshare_layers.cc +++ b/modules/video_coding/codecs/vp8/screenshare_layers.cc
@@ -212,7 +212,7 @@ ++stats_.num_dropped_frames_; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } DependencyInfo dependency_info; @@ -446,7 +446,7 @@ return template_structure; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); // To make the compiler happy! return template_structure; }
diff --git a/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc b/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc index dd2dad6..e5b3bd4 100644 --- a/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc +++ b/modules/video_coding/codecs/vp8/screenshare_layers_unittest.cc
@@ -565,7 +565,7 @@ } else if (flags == -1) { dropped_frame = true; } else { - RTC_NOTREACHED() << "Unexpected flags"; + RTC_DCHECK_NOTREACHED() << "Unexpected flags"; } clock_.AdvanceTime(TimeDelta::Millis(1000 / 5)); }
diff --git a/modules/video_coding/codecs/vp9/include/vp9_globals.h b/modules/video_coding/codecs/vp9/include/vp9_globals.h index 840d63e..bbd83f3 100644 --- a/modules/video_coding/codecs/vp9/include/vp9_globals.h +++ b/modules/video_coding/codecs/vp9/include/vp9_globals.h
@@ -131,7 +131,7 @@ pid_diff[7][1] = 2; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc b/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc index 40b4d82..5d0f380 100644 --- a/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc +++ b/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc
@@ -64,7 +64,7 @@ transfer = ColorSpace::TransferID::kBT2020_10; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } matrix = ColorSpace::MatrixID::kBT2020_NCL;
diff --git a/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc b/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc index c32673d..443efc2 100644 --- a/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc +++ b/modules/video_coding/codecs/vp9/libvpx_vp9_encoder.cc
@@ -573,7 +573,7 @@ case VP9Profile::kProfile1: // Encoding of profile 1 is not implemented. It would require extended // support for I444, I422, and I440 buffers. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case VP9Profile::kProfile2: img_fmt = VPX_IMG_FMT_I42016; @@ -833,7 +833,7 @@ libvpx_->codec_control(encoder_, VP9E_SET_SVC_INTER_LAYER_PRED, 2); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } memset(&svc_drop_frame_, 0, sizeof(svc_drop_frame_)); @@ -1111,7 +1111,7 @@ break; } case VP9Profile::kProfile1: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } case VP9Profile::kProfile2: { @@ -2001,7 +2001,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return mapped_buffer; }
diff --git a/modules/video_coding/codecs/vp9/vp9.cc b/modules/video_coding/codecs/vp9/vp9.cc index 9570e53..7b787f3 100644 --- a/modules/video_coding/codecs/vp9/vp9.cc +++ b/modules/video_coding/codecs/vp9/vp9.cc
@@ -77,7 +77,7 @@ LibvpxInterface::Create(), FieldTrialBasedConfig()); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif } @@ -88,7 +88,7 @@ return std::make_unique<LibvpxVp9Encoder>(codec, LibvpxInterface::Create(), FieldTrialBasedConfig()); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif } @@ -106,7 +106,7 @@ #ifdef RTC_ENABLE_VP9 return std::make_unique<LibvpxVp9Decoder>(); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif }
diff --git a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc index f399c59..181550c 100644 --- a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc +++ b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
@@ -79,7 +79,7 @@ // TODO(phoglund): this limit is being hit in tests since Oct 5 2016. // See https://bugs.chromium.org/p/webrtc/issues/detail?id=6484. - // RTC_NOTREACHED(); + // RTC_DCHECK_NOTREACHED(); } } }
diff --git a/modules/video_coding/frame_buffer.cc b/modules/video_coding/frame_buffer.cc index 937534a..787da1e 100644 --- a/modules/video_coding/frame_buffer.cc +++ b/modules/video_coding/frame_buffer.cc
@@ -241,7 +241,7 @@ case kStateEmpty: // Should only be set to empty through Reset(). - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } _state = state;
diff --git a/modules/video_coding/h264_packet_buffer.cc b/modules/video_coding/h264_packet_buffer.cc index 7b821a1..6096665 100644 --- a/modules/video_coding/h264_packet_buffer.cc +++ b/modules/video_coding/h264_packet_buffer.cc
@@ -118,7 +118,7 @@ } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return result; }
diff --git a/modules/video_coding/jitter_buffer.cc b/modules/video_coding/jitter_buffer.cc index c3b0961..4c6015e 100644 --- a/modules/video_coding/jitter_buffer.cc +++ b/modules/video_coding/jitter_buffer.cc
@@ -497,7 +497,7 @@ RecycleFrameBuffer(frame); return kFlushIndicator; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return buffer_state; }
diff --git a/modules/video_coding/jitter_estimator.cc b/modules/video_coding/jitter_estimator.cc index 89cf51f..87848ae 100644 --- a/modules/video_coding/jitter_estimator.cc +++ b/modules/video_coding/jitter_estimator.cc
@@ -246,7 +246,7 @@ hMh_sigma = deltaFSBytes * Mh[0] + Mh[1] + sigma; if ((hMh_sigma < 1e-9 && hMh_sigma >= 0) || (hMh_sigma > -1e-9 && hMh_sigma <= 0)) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } kalmanGain[0] = Mh[0] / hMh_sigma; @@ -301,7 +301,7 @@ _lastUpdateT = now; if (_alphaCount == 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } double alpha =
diff --git a/modules/video_coding/nack_requester_unittest.cc b/modules/video_coding/nack_requester_unittest.cc index c9659e3..0e5d415 100644 --- a/modules/video_coding/nack_requester_unittest.cc +++ b/modules/video_coding/nack_requester_unittest.cc
@@ -56,7 +56,7 @@ bool WaitForSendNack() { if (timed_out_) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/modules/video_coding/svc/scalability_structure_full_svc.cc b/modules/video_coding/svc/scalability_structure_full_svc.cc index 7177427..8920592 100644 --- a/modules/video_coding/svc/scalability_structure_full_svc.cc +++ b/modules/video_coding/svc/scalability_structure_full_svc.cc
@@ -123,7 +123,7 @@ } return kDeltaT0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kNone; } @@ -227,7 +227,7 @@ } break; case kNone: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; }
diff --git a/modules/video_coding/svc/scalability_structure_key_svc.cc b/modules/video_coding/svc/scalability_structure_key_svc.cc index 6cd96a6..0ef7e8f 100644 --- a/modules/video_coding/svc/scalability_structure_key_svc.cc +++ b/modules/video_coding/svc/scalability_structure_key_svc.cc
@@ -198,7 +198,7 @@ } return kDeltaT0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kNone; } @@ -227,7 +227,7 @@ case kNone: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/modules/video_coding/svc/scalability_structure_simulcast.cc b/modules/video_coding/svc/scalability_structure_simulcast.cc index 0db91cc..e5fa4c4 100644 --- a/modules/video_coding/svc/scalability_structure_simulcast.cc +++ b/modules/video_coding/svc/scalability_structure_simulcast.cc
@@ -106,7 +106,7 @@ } return kDeltaT0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kDeltaT0; } @@ -184,7 +184,7 @@ } break; case kNone: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; }
diff --git a/modules/video_coding/utility/simulcast_test_fixture_impl.cc b/modules/video_coding/utility/simulcast_test_fixture_impl.cc index 435f472..0789f6a 100644 --- a/modules/video_coding/utility/simulcast_test_fixture_impl.cc +++ b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
@@ -143,7 +143,7 @@ return 0; } int32_t Decoded(VideoFrame& decoded_image, int64_t decode_time_ms) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } void Decoded(VideoFrame& decoded_image,
diff --git a/net/dcsctp/packet/sctp_packet.cc b/net/dcsctp/packet/sctp_packet.cc index 3e419c5..cc66235 100644 --- a/net/dcsctp/packet/sctp_packet.cc +++ b/net/dcsctp/packet/sctp_packet.cc
@@ -82,8 +82,8 @@ // The packet header (CommonHeader) hasn't been written yet: return max_packet_size_ - kHeaderSize; } else if (out_.size() > max_packet_size_) { - RTC_NOTREACHED() << "Exceeded max size, data=" << out_.size() - << ", max_size=" << max_packet_size_; + RTC_DCHECK_NOTREACHED() << "Exceeded max size, data=" << out_.size() + << ", max_size=" << max_packet_size_; return 0; } return max_packet_size_ - out_.size();
diff --git a/p2p/base/basic_ice_controller.cc b/p2p/base/basic_ice_controller.cc index ac22e1d..81fb324 100644 --- a/p2p/base/basic_ice_controller.cc +++ b/p2p/base/basic_ice_controller.cc
@@ -846,7 +846,7 @@ return selected || better_than_selected; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } }
diff --git a/p2p/base/connection.cc b/p2p/base/connection.cc index f7bd47d..e0e5c15 100644 --- a/p2p/base/connection.cc +++ b/p2p/base/connection.cc
@@ -216,7 +216,7 @@ request->AddAttribute(std::make_unique<StunUInt64Attribute>( STUN_ATTR_ICE_CONTROLLED, connection_->port()->IceTiebreaker())); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // Adding PRIORITY Attribute. @@ -528,7 +528,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/p2p/base/dtls_transport.cc b/p2p/base/dtls_transport.cc index 172d061..bf8583f 100644 --- a/p2p/base/dtls_transport.cc +++ b/p2p/base/dtls_transport.cc
@@ -433,7 +433,7 @@ "webrtc::DtlsTransportState::kClosed."; return -1; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } } @@ -532,7 +532,7 @@ "webrtc::DtlsTransportState::kClosed."; break; case webrtc::DtlsTransportState::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } @@ -720,7 +720,7 @@ // packets in this state, the incoming queue must be empty. We // ignore write errors, thus any errors must be because of // configuration and therefore are our fault. - RTC_NOTREACHED() << "StartSSL failed."; + RTC_DCHECK_NOTREACHED() << "StartSSL failed."; RTC_LOG(LS_ERROR) << ToString() << ": Couldn't start DTLS handshake"; set_dtls_state(webrtc::DtlsTransportState::kFailed); return;
diff --git a/p2p/base/p2p_transport_channel.cc b/p2p/base/p2p_transport_channel.cc index 5c6b32c..655490b 100644 --- a/p2p/base/p2p_transport_channel.cc +++ b/p2p/base/p2p_transport_channel.cc
@@ -1128,7 +1128,7 @@ << remote_candidate.ToSensitiveString(); return; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); port->SendBindingErrorResponse(stun_msg, address, STUN_ERROR_SERVER_ERROR, STUN_ERROR_REASON_SERVER_ERROR); return; @@ -1300,7 +1300,7 @@ }); if (p == resolvers_.end()) { RTC_LOG(LS_ERROR) << "Unexpected AsyncDnsResolver return"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } Candidate candidate = p->candidate_; @@ -1953,7 +1953,7 @@ state == IceTransportState::STATE_COMPLETED); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } state_ = state;
diff --git a/p2p/base/p2p_transport_channel_unittest.cc b/p2p/base/p2p_transport_channel_unittest.cc index dfc3cec..6d04468 100644 --- a/p2p/base/p2p_transport_channel_unittest.cc +++ b/p2p/base/p2p_transport_channel_unittest.cc
@@ -1178,7 +1178,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/p2p/base/port.cc b/p2p/base/port.cc index 4b2685d..51297c4 100644 --- a/p2p/base/port.cc +++ b/p2p/base/port.cc
@@ -697,7 +697,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return ret; } @@ -715,7 +715,7 @@ size_t size, const rtc::SocketAddress& remote_addr, int64_t packet_time_us) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/p2p/base/pseudo_tcp.cc b/p2p/base/pseudo_tcp.cc index 13e7a22..f168227 100644 --- a/p2p/base/pseudo_tcp.cc +++ b/p2p/base/pseudo_tcp.cc
@@ -288,7 +288,7 @@ // Check if it's time to retransmit a segment if (m_rto_base && (rtc::TimeDiff32(m_rto_base + m_rx_rto, now) <= 0)) { if (m_slist.empty()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } else { // Note: (m_slist.front().xmit == 0)) { // retransmit segments @@ -375,7 +375,7 @@ } else if (opt == OPT_RCVBUF) { *value = m_rbuf_len; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } void PseudoTcp::SetOption(Option opt, int value) { @@ -390,7 +390,7 @@ RTC_DCHECK(m_state == TCP_LISTEN); resizeReceiveBuffer(value); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/p2p/base/stun_port.cc b/p2p/base/stun_port.cc index f2b12f7..1ebd15e 100644 --- a/p2p/base/stun_port.cc +++ b/p2p/base/stun_port.cc
@@ -248,7 +248,7 @@ // it would lead to a crash when accessing the local candidate of the // connection that would be created below. if (Candidates().empty()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } // When the socket is shared, the srflx candidate is gathered by the UDPPort.
diff --git a/p2p/base/test_turn_server.h b/p2p/base/test_turn_server.h index 6cad135..bbdc566 100644 --- a/p2p/base/test_turn_server.h +++ b/p2p/base/test_turn_server.h
@@ -125,7 +125,7 @@ server_.AddInternalServerSocket(socket, proto); } } else { - RTC_NOTREACHED() << "Unknown protocol type: " << proto; + RTC_DCHECK_NOTREACHED() << "Unknown protocol type: " << proto; } }
diff --git a/p2p/base/transport_description_factory.cc b/p2p/base/transport_description_factory.cc index 6beae34..e46114e 100644 --- a/p2p/base/transport_description_factory.cc +++ b/p2p/base/transport_description_factory.cc
@@ -109,7 +109,7 @@ } else { RTC_LOG(LS_ERROR) << "Remote offer connection role is " << role << " which is a protocol violation"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (!SetSecurityInfo(desc.get(), role)) {
diff --git a/p2p/client/basic_port_allocator.cc b/p2p/client/basic_port_allocator.cc index 15f59bd..9967d9a 100644 --- a/p2p/client/basic_port_allocator.cc +++ b/p2p/client/basic_port_allocator.cc
@@ -56,7 +56,7 @@ case cricket::PROTO_TLS: return 0; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } } @@ -68,7 +68,7 @@ case AF_INET: return 1; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } } @@ -1173,7 +1173,7 @@ return; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } BasicPortAllocatorSession::PortData* BasicPortAllocatorSession::FindPort( @@ -1397,7 +1397,7 @@ break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (state() == kRunning) { @@ -1653,7 +1653,7 @@ relay_ports_.erase(it); } else { RTC_LOG(LS_ERROR) << "Unexpected OnPortDestroyed for nonexistent port."; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/pc/channel.cc b/pc/channel.cc index 9e717208f..9e113c8 100644 --- a/pc/channel.cc +++ b/pc/channel.cc
@@ -422,7 +422,7 @@ // (and SetSend(true) is called). RTC_LOG(LS_ERROR) << "Can't send outgoing RTP packet for " << ToString() << " when SRTP is inactive and crypto is required"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/pc/dtls_srtp_transport.cc b/pc/dtls_srtp_transport.cc index 1b9d1a0..9a4135b 100644 --- a/pc/dtls_srtp_transport.cc +++ b/pc/dtls_srtp_transport.cc
@@ -235,7 +235,7 @@ false, &dtls_buffer[0], dtls_buffer.size())) { RTC_LOG(LS_WARNING) << "DTLS-SRTP key export failed"; - RTC_NOTREACHED(); // This should never happen + RTC_DCHECK_NOTREACHED(); // This should never happen return false; }
diff --git a/pc/dtmf_sender.cc b/pc/dtmf_sender.cc index 69ef2fb..46811c8 100644 --- a/pc/dtmf_sender.cc +++ b/pc/dtmf_sender.cc
@@ -194,7 +194,7 @@ if (!GetDtmfCode(tone, &code)) { // The find_first_of(kDtmfValidTones) should have guarantee `tone` is // a valid DTMF tone. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/pc/ice_server_parsing.cc b/pc/ice_server_parsing.cc index b7395c8..b70322e 100644 --- a/pc/ice_server_parsing.cc +++ b/pc/ice_server_parsing.cc
@@ -275,7 +275,7 @@ default: // We shouldn't get to this point with an invalid service_type, we should // have returned an error already. - RTC_NOTREACHED() << "Unexpected service type"; + RTC_DCHECK_NOTREACHED() << "Unexpected service type"; return RTCErrorType::INTERNAL_ERROR; } return RTCErrorType::NONE;
diff --git a/pc/jsep_transport.cc b/pc/jsep_transport.cc index a94af42..5c7f01a 100644 --- a/pc/jsep_transport.cc +++ b/pc/jsep_transport.cc
@@ -460,7 +460,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (!ret) { @@ -670,7 +670,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } else {
diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc index b1fccbe..b7e9f36 100644 --- a/pc/jsep_transport_controller.cc +++ b/pc/jsep_transport_controller.cc
@@ -1167,7 +1167,7 @@ const cricket::Candidate& candidate) { // We should never signal peer-reflexive candidates. if (candidate.type() == cricket::PRFLX_PORT_TYPE) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } @@ -1311,7 +1311,7 @@ // "connected", "completed" or "closed" state. new_ice_connection_state = PeerConnectionInterface::kIceConnectionConnected; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (standardized_ice_connection_state_ != new_ice_connection_state) { @@ -1369,7 +1369,7 @@ new_combined_state = PeerConnectionInterface::PeerConnectionState::kConnected; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (combined_connection_state_ != new_combined_state) {
diff --git a/pc/jsep_transport_controller_unittest.cc b/pc/jsep_transport_controller_unittest.cc index 4c2ee2a..52d8182 100644 --- a/pc/jsep_transport_controller_unittest.cc +++ b/pc/jsep_transport_controller_unittest.cc
@@ -82,7 +82,9 @@ cricket::PortAllocator* port_allocator = nullptr) { config.transport_observer = this; config.rtcp_handler = [](const rtc::CopyOnWriteBuffer& packet, - int64_t packet_time_us) { RTC_NOTREACHED(); }; + int64_t packet_time_us) { + RTC_DCHECK_NOTREACHED(); + }; config.ice_transport_factory = fake_ice_transport_factory_.get(); config.dtls_transport_factory = fake_dtls_transport_factory_.get(); config.on_dtls_handshake_error_ = [](rtc::SSLHandshakeError s) {};
diff --git a/pc/jsep_transport_unittest.cc b/pc/jsep_transport_unittest.cc index 41c9bab..d06fa95 100644 --- a/pc/jsep_transport_unittest.cc +++ b/pc/jsep_transport_unittest.cc
@@ -124,7 +124,7 @@ rtp_dtls_transport.get(), rtcp_dtls_transport.get()); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } auto jsep_transport = std::make_unique<JsepTransport>(
diff --git a/pc/media_session.cc b/pc/media_session.cc index 426eadc..054d570 100644 --- a/pc/media_session.cc +++ b/pc/media_session.cc
@@ -1691,7 +1691,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ++msection_index; } @@ -1867,7 +1867,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ++msection_index; // See if we can add the newly generated m= section to the BUNDLE group in @@ -2798,7 +2798,7 @@ bool offer_uses_sctpmap = offer_data_description->use_sctpmap(); data_answer->as_sctp()->set_use_sctpmap(offer_uses_sctpmap); } else { - RTC_NOTREACHED() << "Non-SCTP data content found"; + RTC_DCHECK_NOTREACHED() << "Non-SCTP data content found"; } bool secure = bundle_transport ? bundle_transport->description.secure()
diff --git a/pc/media_session_unittest.cc b/pc/media_session_unittest.cc index a02b4c1..cfe9ac8 100644 --- a/pc/media_session_unittest.cc +++ b/pc/media_session_unittest.cc
@@ -363,7 +363,7 @@ num_sim_layer); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -4623,7 +4623,7 @@ break; case RtpTransceiverDirection::kStopped: // This does not happen in any current test. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } auto format_codecs = [](const std::vector<AudioCodec>& codecs) {
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index c02518c..95a251e 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc
@@ -102,7 +102,7 @@ case PeerConnectionInterface::kAll: return cricket::CF_ALL; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return cricket::CF_NONE; } @@ -220,7 +220,7 @@ gathering_policy = cricket::GATHER_CONTINUALLY; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); gathering_policy = cricket::GATHER_ONCE; } @@ -2298,7 +2298,7 @@ NoteUsageEvent(UsageEvent::ICE_STATE_CONNECTED); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -2650,7 +2650,7 @@ OnIceGatheringChange(PeerConnectionInterface::kIceGatheringNew); } else { RTC_LOG(LS_ERROR) << "Unknown state received: " << state; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -2774,7 +2774,7 @@ rtc::kSrtpCryptoSuiteMaxValue); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); continue; } } @@ -2799,7 +2799,7 @@ rtc::kSslCipherSuiteMaxValue); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); continue; } }
diff --git a/pc/peer_connection_bundle_unittest.cc b/pc/peer_connection_bundle_unittest.cc index be05af9..e5eb6c4 100644 --- a/pc/peer_connection_bundle_unittest.cc +++ b/pc/peer_connection_bundle_unittest.cc
@@ -80,7 +80,7 @@ return pc()->AddIceCandidate(jsep_candidate.get()); } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; }
diff --git a/pc/peer_connection_ice_unittest.cc b/pc/peer_connection_ice_unittest.cc index a27d174..112d8df 100644 --- a/pc/peer_connection_ice_unittest.cc +++ b/pc/peer_connection_ice_unittest.cc
@@ -228,7 +228,7 @@ return dtls_transport->ice_transport()->internal()->GetIceRole(); } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return cricket::ICEROLE_UNKNOWN; }
diff --git a/pc/peer_connection_message_handler.cc b/pc/peer_connection_message_handler.cc index 4b7913d..54f75f0 100644 --- a/pc/peer_connection_message_handler.cc +++ b/pc/peer_connection_message_handler.cc
@@ -129,7 +129,7 @@ break; } default: - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; break; } }
diff --git a/pc/peer_connection_signaling_unittest.cc b/pc/peer_connection_signaling_unittest.cc index dbb0cab..8df90b7 100644 --- a/pc/peer_connection_signaling_unittest.cc +++ b/pc/peer_connection_signaling_unittest.cc
@@ -82,7 +82,7 @@ function_(desc); } - void OnFailure(RTCError error) override { RTC_NOTREACHED(); } + void OnFailure(RTCError error) override { RTC_DCHECK_NOTREACHED(); } private: bool was_called_ = false; @@ -273,9 +273,10 @@ break; } case SignalingState::kClosed: { - RTC_NOTREACHED() << "Set the second member of the tuple to true to " - "achieve a closed state from an existing, valid " - "state."; + RTC_DCHECK_NOTREACHED() + << "Set the second member of the tuple to true to " + "achieve a closed state from an existing, valid " + "state."; } }
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc index 7f815f2..025feb9 100644 --- a/pc/rtc_stats_collector.cc +++ b/pc/rtc_stats_collector.cc
@@ -170,7 +170,7 @@ return RTCIceCandidateType::kPrflx; if (type == cricket::RELAY_PORT_TYPE) return RTCIceCandidateType::kRelay; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -186,7 +186,7 @@ case DataChannelInterface::kClosed: return RTCDataChannelState::kClosed; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -203,7 +203,7 @@ case cricket::IceCandidatePairState::FAILED: return RTCStatsIceCandidatePairState::kFailed; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -246,7 +246,7 @@ case rtc::ADAPTER_TYPE_ANY: return RTCNetworkType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -1008,7 +1008,7 @@ timestamp_us, *track, *video_sender_info, sender->AttachmentId()); report->AddStats(std::move(video_track_stats)); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } } @@ -1047,7 +1047,7 @@ receiver->AttachmentId()); report->AddStats(std::move(video_track_stats)); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } } @@ -1799,7 +1799,7 @@ } else if (stats.media_type == cricket::MEDIA_TYPE_VIDEO) { ProduceVideoRTPStreamStats_n(timestamp_us, stats, report); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } } @@ -2163,7 +2163,7 @@ video_stats[video_channel->media_channel()] = std::make_unique<cricket::VideoMediaInfo>(); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } });
diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc index 53387e8..4ee5dc8 100644 --- a/pc/rtc_stats_collector_unittest.cc +++ b/pc/rtc_stats_collector_unittest.cc
@@ -2837,7 +2837,7 @@ return "Video"; case cricket::MEDIA_TYPE_DATA: case cricket::MEDIA_TYPE_UNSUPPORTED: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } } @@ -2896,7 +2896,7 @@ } case cricket::MEDIA_TYPE_DATA: case cricket::MEDIA_TYPE_UNSUPPORTED: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/pc/rtc_stats_traversal.cc b/pc/rtc_stats_traversal.cc index 49e79fe..6d886f5 100644 --- a/pc/rtc_stats_traversal.cc +++ b/pc/rtc_stats_traversal.cc
@@ -140,7 +140,7 @@ AddIdIfDefined(transport.local_certificate_id, &neighbor_ids); AddIdIfDefined(transport.remote_certificate_id, &neighbor_ids); } else { - RTC_NOTREACHED() << "Unrecognized type: " << type; + RTC_DCHECK_NOTREACHED() << "Unrecognized type: " << type; } return neighbor_ids; }
diff --git a/pc/rtp_media_utils.cc b/pc/rtp_media_utils.cc index c5d642b..52c5bb0 100644 --- a/pc/rtp_media_utils.cc +++ b/pc/rtp_media_utils.cc
@@ -49,7 +49,7 @@ case RtpTransceiverDirection::kRecvOnly: return RtpTransceiverDirection::kSendOnly; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return direction; } } @@ -81,7 +81,7 @@ case RtpTransceiverDirection::kStopped: return "kStopped"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; }
diff --git a/pc/rtp_transmission_manager.cc b/pc/rtp_transmission_manager.cc index 9040a69..e917154 100644 --- a/pc/rtp_transmission_manager.cc +++ b/pc/rtp_transmission_manager.cc
@@ -345,7 +345,7 @@ return transceiver; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -360,7 +360,7 @@ return transceiver; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -527,7 +527,7 @@ } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { CreateVideoReceiver(stream, sender_info); } else { - RTC_NOTREACHED() << "Invalid media type"; + RTC_DCHECK_NOTREACHED() << "Invalid media type"; } } @@ -562,7 +562,7 @@ stream->RemoveTrack(video_track); } } else { - RTC_NOTREACHED() << "Invalid media type"; + RTC_DCHECK_NOTREACHED() << "Invalid media type"; } if (receiver) { RTC_DCHECK(!closed_);
diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 35d8461..8f5cec2 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc
@@ -578,7 +578,7 @@ case cricket::MEDIA_TYPE_UNSUPPORTED: return "not supported"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } @@ -695,7 +695,7 @@ std::string cname; if (!rtc::CreateRandomString(kRtcpCnameLength, &cname)) { RTC_LOG(LS_ERROR) << "Failed to generate CNAME."; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return cname; } @@ -3915,7 +3915,7 @@ case SessionError::kTransport: return "ERROR_TRANSPORT"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } @@ -4409,7 +4409,7 @@ semantics_negotiated = kSdpSemanticNegotiatedMixed; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } RTC_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.SdpSemanticNegotiated", semantics_negotiated, kSdpSemanticNegotiatedMax); @@ -4721,11 +4721,12 @@ static_cast<cricket::VideoChannel*>(channel)); break; case cricket::MEDIA_TYPE_DATA: - RTC_NOTREACHED() + RTC_DCHECK_NOTREACHED() << "Trying to destroy datachannel through DestroyChannelInterface"; break; default: - RTC_NOTREACHED() << "Unknown media type: " << channel->media_type(); + RTC_DCHECK_NOTREACHED() + << "Unknown media type: " << channel->media_type(); break; }
diff --git a/pc/srtp_transport_unittest.cc b/pc/srtp_transport_unittest.cc index 46e7397..9ae3d5e 100644 --- a/pc/srtp_transport_unittest.cc +++ b/pc/srtp_transport_unittest.cc
@@ -101,7 +101,7 @@ EXPECT_EQ(80 / 8, overhead); // 80-bit tag. break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; }
diff --git a/pc/stats_collector.cc b/pc/stats_collector.cc index 113716c..01c519f 100644 --- a/pc/stats_collector.cc +++ b/pc/stats_collector.cc
@@ -505,7 +505,7 @@ if (candidate_type == cricket::RELAY_PORT_TYPE) { return STATSREPORT_RELAY_PORT_TYPE; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return "unknown"; } @@ -530,7 +530,7 @@ case rtc::ADAPTER_TYPE_ANY: return STATSREPORT_ADAPTER_TYPE_WILDCARD; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } } @@ -572,7 +572,7 @@ CreateTrackReport(static_cast<VideoTrackInterface*>(track), &reports_, &track_ids_); } else { - RTC_NOTREACHED() << "Illegal track kind"; + RTC_DCHECK_NOTREACHED() << "Illegal track kind"; } }
diff --git a/pc/test/fake_audio_capture_module.cc b/pc/test/fake_audio_capture_module.cc index 214ed6b..41611d1 100644 --- a/pc/test/fake_audio_capture_module.cc +++ b/pc/test/fake_audio_capture_module.cc
@@ -72,7 +72,7 @@ int32_t FakeAudioCaptureModule::ActiveAudioLayer( AudioLayer* /*audio_layer*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -94,17 +94,17 @@ } bool FakeAudioCaptureModule::Initialized() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int16_t FakeAudioCaptureModule::PlayoutDevices() { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int16_t FakeAudioCaptureModule::RecordingDevices() { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -112,7 +112,7 @@ uint16_t /*index*/, char /*name*/[webrtc::kAdmMaxDeviceNameSize], char /*guid*/[webrtc::kAdmMaxGuidSize]) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -120,7 +120,7 @@ uint16_t /*index*/, char /*name*/[webrtc::kAdmMaxDeviceNameSize], char /*guid*/[webrtc::kAdmMaxGuidSize]) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -150,7 +150,7 @@ } int32_t FakeAudioCaptureModule::PlayoutIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -164,7 +164,7 @@ } int32_t FakeAudioCaptureModule::RecordingIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -241,7 +241,7 @@ } bool FakeAudioCaptureModule::SpeakerIsInitialized() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -251,40 +251,40 @@ } bool FakeAudioCaptureModule::MicrophoneIsInitialized() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SpeakerVolumeIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SetSpeakerVolume(uint32_t /*volume*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SpeakerVolume(uint32_t* /*volume*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::MaxSpeakerVolume( uint32_t* /*max_volume*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::MinSpeakerVolume( uint32_t* /*min_volume*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::MicrophoneVolumeIsAvailable( bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -308,37 +308,37 @@ int32_t FakeAudioCaptureModule::MinMicrophoneVolume( uint32_t* /*min_volume*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SpeakerMuteIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SetSpeakerMute(bool /*enable*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SpeakerMute(bool* /*enabled*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::MicrophoneMuteIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::SetMicrophoneMute(bool /*enable*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } int32_t FakeAudioCaptureModule::MicrophoneMute(bool* /*enabled*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -357,7 +357,7 @@ } int32_t FakeAudioCaptureModule::StereoPlayout(bool* /*enabled*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -376,7 +376,7 @@ } int32_t FakeAudioCaptureModule::StereoRecording(bool* /*enabled*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -397,7 +397,7 @@ default: // All existing messages should be caught. Getting here should never // happen. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -506,7 +506,7 @@ kNumberOfChannels, kSamplesPerSecond, rec_buffer_, nSamplesOut, &elapsed_time_ms, &ntp_time_ms) != 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } RTC_CHECK(nSamplesOut == kNumberSamples); @@ -532,7 +532,7 @@ send_buffer_, kNumberSamples, kNumberBytesPerSample, kNumberOfChannels, kSamplesPerSecond, kTotalDelayMs, kClockDriftMs, current_mic_level, key_pressed, current_mic_level) != 0) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } current_mic_level_ = current_mic_level; }
diff --git a/pc/test/fake_rtc_certificate_generator.h b/pc/test/fake_rtc_certificate_generator.h index fc931ad..dadd5bb 100644 --- a/pc/test/fake_rtc_certificate_generator.h +++ b/pc/test/fake_rtc_certificate_generator.h
@@ -171,7 +171,7 @@ case rtc::KT_ECDSA: return rtc::RTCCertificate::FromPEM(kEcdsaPems[0]); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -190,7 +190,7 @@ case rtc::KT_ECDSA: return kEcdsaPems[key_index_]; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kEcdsaPems[key_index_]; } }
diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc index 8439616..f95983b 100644 --- a/pc/webrtc_sdp.cc +++ b/pc/webrtc_sdp.cc
@@ -782,7 +782,7 @@ } else if (type == cricket::RELAY_PORT_TYPE) { preference = kPreferenceRelayed; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return preference; } @@ -1417,14 +1417,14 @@ fmt.append(kDefaultSctpmapProtocol); } } else { - RTC_NOTREACHED() << "Data description without SCTP"; + RTC_DCHECK_NOTREACHED() << "Data description without SCTP"; } } else if (media_type == cricket::MEDIA_TYPE_UNSUPPORTED) { const UnsupportedContentDescription* unsupported_desc = media_desc->as_unsupported(); type = unsupported_desc->media_type(); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // The fmt must never be empty. If no codecs are found, set the fmt attribute // to 0. @@ -1620,7 +1620,7 @@ InitAttrLine(kAttributeSendRecv, &os); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); InitAttrLine(kAttributeSendRecv, &os); break; } @@ -1995,7 +1995,7 @@ type = kCandidatePrflx; // Peer reflexive candidate may be signaled for being removed. } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); // Never write out candidates if we don't know the type. continue; }
diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc index a2a884a..883249c 100644 --- a/pc/webrtc_sdp_unittest.cc +++ b/pc/webrtc_sdp_unittest.cc
@@ -966,7 +966,7 @@ break; case RtpTransceiverDirection::kStopped: default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); new_direction = "a=sendrecv"; break; } @@ -1602,7 +1602,7 @@ } else if (mline_index == 1) { content_name = kVideoContentName; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } TransportInfo transport_info(content_name, TransportDescription(ufrag, pwd));
diff --git a/pc/webrtc_session_description_factory.cc b/pc/webrtc_session_description_factory.cc index 995ef5e..ac20308 100644 --- a/pc/webrtc_session_description_factory.cc +++ b/pc/webrtc_session_description_factory.cc
@@ -324,7 +324,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/rtc_base/async_resolver.cc b/rtc_base/async_resolver.cc index 0fd1097..ad1598f 100644 --- a/rtc_base/async_resolver.cc +++ b/rtc_base/async_resolver.cc
@@ -70,7 +70,7 @@ int family, std::vector<IPAddress>* addresses) { #ifdef __native_client__ - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); RTC_LOG(LS_WARNING) << "ResolveHostname() is not implemented for NaCl"; return -1; #else // __native_client__
diff --git a/rtc_base/async_tcp_socket.cc b/rtc_base/async_tcp_socket.cc index bc8b7dd..c248075 100644 --- a/rtc_base/async_tcp_socket.cc +++ b/rtc_base/async_tcp_socket.cc
@@ -99,7 +99,7 @@ case Socket::CS_CONNECTED: return STATE_CONNECTED; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return STATE_CLOSED; } } @@ -143,7 +143,7 @@ break; } if (static_cast<size_t>(res) > view.size()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); res = -1; break; } @@ -217,7 +217,7 @@ if (size > inbuf_.size()) { RTC_LOG(LS_ERROR) << "input buffer overflow"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); inbuf_.Clear(); } else { inbuf_.SetSize(size); @@ -323,7 +323,7 @@ case Socket::CS_CONNECTING: return State::kBound; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return State::kClosed; } }
diff --git a/rtc_base/boringssl_certificate.cc b/rtc_base/boringssl_certificate.cc index e1bcd61..99b2ab3 100644 --- a/rtc_base/boringssl_certificate.cc +++ b/rtc_base/boringssl_certificate.cc
@@ -106,7 +106,7 @@ } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } if (!CBB_flush(cbb)) {
diff --git a/rtc_base/checks.h b/rtc_base/checks.h index 4015338..028de45 100644 --- a/rtc_base/checks.h +++ b/rtc_base/checks.h
@@ -444,6 +444,8 @@ #endif #define RTC_UNREACHABLE_CODE_HIT false +#define RTC_DCHECK_NOTREACHED() RTC_DCHECK(RTC_UNREACHABLE_CODE_HIT) +// Deprecated. Use RTC_DCHECK_NOTREACHED instead #define RTC_NOTREACHED() RTC_DCHECK(RTC_UNREACHABLE_CODE_HIT) // Kills the process with an error message. Never returns. Use when you wish to
diff --git a/rtc_base/experiments/field_trial_list.cc b/rtc_base/experiments/field_trial_list.cc index de897bf..ac3fd88 100644 --- a/rtc_base/experiments/field_trial_list.cc +++ b/rtc_base/experiments/field_trial_list.cc
@@ -34,7 +34,7 @@ } bool FieldTrialStructListBase::Parse(absl::optional<std::string> str_value) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return true; }
diff --git a/rtc_base/experiments/min_video_bitrate_experiment.cc b/rtc_base/experiments/min_video_bitrate_experiment.cc index 11450d0..f37c4e9 100644 --- a/rtc_base/experiments/min_video_bitrate_experiment.cc +++ b/rtc_base/experiments/min_video_bitrate_experiment.cc
@@ -105,7 +105,7 @@ return absl::nullopt; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return absl::nullopt;
diff --git a/rtc_base/fake_ssl_identity.cc b/rtc_base/fake_ssl_identity.cc index 0648363..87ede73 100644 --- a/rtc_base/fake_ssl_identity.cc +++ b/rtc_base/fake_ssl_identity.cc
@@ -103,17 +103,17 @@ } std::string FakeSSLIdentity::PrivateKeyToPEMString() const { - RTC_NOTREACHED(); // Not implemented. + RTC_DCHECK_NOTREACHED(); // Not implemented. return ""; } std::string FakeSSLIdentity::PublicKeyToPEMString() const { - RTC_NOTREACHED(); // Not implemented. + RTC_DCHECK_NOTREACHED(); // Not implemented. return ""; } bool FakeSSLIdentity::operator==(const SSLIdentity& other) const { - RTC_NOTREACHED(); // Not implemented. + RTC_DCHECK_NOTREACHED(); // Not implemented. return false; }
diff --git a/rtc_base/logging.cc b/rtc_base/logging.cc index 321d848..5061eae 100644 --- a/rtc_base/logging.cc +++ b/rtc_base/logging.cc
@@ -481,7 +481,7 @@ } #endif default: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); va_end(args); return; } @@ -535,7 +535,7 @@ reinterpret_cast<uintptr_t>(va_arg(args, const void*))); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); va_end(args); return; }
diff --git a/rtc_base/nat_types.cc b/rtc_base/nat_types.cc index 50d7de0..9ca0360 100644 --- a/rtc_base/nat_types.cc +++ b/rtc_base/nat_types.cc
@@ -53,7 +53,7 @@ case NAT_SYMMETRIC: return new SymmetricNAT(); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } }
diff --git a/rtc_base/network.cc b/rtc_base/network.cc index 98e4769..dbcdcc4 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc
@@ -138,7 +138,7 @@ return kNetworkCostMax + vpnCost; case rtc::ADAPTER_TYPE_VPN: // The cost of a VPN should be computed using its underlying network type. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kNetworkCostUnknown; default: return kNetworkCostUnknown + vpnCost; @@ -537,7 +537,7 @@ bool BasicNetworkManager::CreateNetworks(bool include_ignored, NetworkList* networks) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); RTC_LOG(LS_WARNING) << "BasicNetworkManager doesn't work on NaCl yet"; return false; } @@ -965,7 +965,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/rtc_base/network_constants.cc b/rtc_base/network_constants.cc index 905aa36..9e6ab52 100644 --- a/rtc_base/network_constants.cc +++ b/rtc_base/network_constants.cc
@@ -39,7 +39,7 @@ case ADAPTER_TYPE_LOOPBACK: return "Loopback"; default: - RTC_NOTREACHED() << "Invalid type " << type; + RTC_DCHECK_NOTREACHED() << "Invalid type " << type; return std::string(); } }
diff --git a/rtc_base/null_socket_server.cc b/rtc_base/null_socket_server.cc index ce1e963..4705163 100644 --- a/rtc_base/null_socket_server.cc +++ b/rtc_base/null_socket_server.cc
@@ -30,7 +30,7 @@ } rtc::Socket* NullSocketServer::CreateSocket(int /* family */, int /* type */) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; }
diff --git a/rtc_base/numerics/histogram_percentile_counter.cc b/rtc_base/numerics/histogram_percentile_counter.cc index 4bc8cb0..29d2341 100644 --- a/rtc_base/numerics/histogram_percentile_counter.cc +++ b/rtc_base/numerics/histogram_percentile_counter.cc
@@ -72,7 +72,7 @@ elements_to_skip -= it.second; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return absl::nullopt; }
diff --git a/rtc_base/openssl_key_pair.cc b/rtc_base/openssl_key_pair.cc index 911a751..6ac546e 100644 --- a/rtc_base/openssl_key_pair.cc +++ b/rtc_base/openssl_key_pair.cc
@@ -143,14 +143,14 @@ BIO* temp_memory_bio = BIO_new(BIO_s_mem()); if (!temp_memory_bio) { RTC_LOG_F(LS_ERROR) << "Failed to allocate temporary memory bio"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } if (!PEM_write_bio_PrivateKey(temp_memory_bio, pkey_, nullptr, nullptr, 0, nullptr, nullptr)) { RTC_LOG_F(LS_ERROR) << "Failed to write private key"; BIO_free(temp_memory_bio); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } char* buffer; @@ -164,13 +164,13 @@ BIO* temp_memory_bio = BIO_new(BIO_s_mem()); if (!temp_memory_bio) { RTC_LOG_F(LS_ERROR) << "Failed to allocate temporary memory bio"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } if (!PEM_write_bio_PUBKEY(temp_memory_bio, pkey_)) { RTC_LOG_F(LS_ERROR) << "Failed to write public key"; BIO_free(temp_memory_bio); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } BIO_write(temp_memory_bio, "\0", 1);
diff --git a/rtc_base/openssl_stream_adapter.cc b/rtc_base/openssl_stream_adapter.cc index 95408f5..dd82e4f 100644 --- a/rtc_base/openssl_stream_adapter.cc +++ b/rtc_base/openssl_stream_adapter.cc
@@ -842,7 +842,7 @@ } ContinueSSL(); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // This callback will never run again (stopped above). return webrtc::TimeDelta::PlusInfinity();
diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc index 47d41ee..040904a 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc
@@ -601,7 +601,7 @@ case OPT_RTP_SENDTIME_EXTN_ID: return -1; // No logging is necessary as this not a OS socket option. default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } return 0; @@ -737,7 +737,7 @@ // This is dangerous: if we keep attempting to access a FD after close, // it could be reopened by something else making us think it's still // open. Note that this is only a DCHECK. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return true; // Returned during ungraceful peer shutdown. case ECONNRESET: @@ -1649,7 +1649,7 @@ // Failed? // TODO(pthatcher): need a better strategy than this! WSAGetLastError(); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } else if (dw == WSA_WAIT_TIMEOUT) { // Timeout?
diff --git a/rtc_base/socket_adapters.cc b/rtc_base/socket_adapters.cc index abe5e30..0bd6efa 100644 --- a/rtc_base/socket_adapters.cc +++ b/rtc_base/socket_adapters.cc
@@ -97,7 +97,7 @@ if (data_len_ >= buffer_size_) { RTC_LOG(LS_ERROR) << "Input buffer overflow"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); data_len_ = 0; }
diff --git a/rtc_base/ssl_identity.cc b/rtc_base/ssl_identity.cc index c24f46e..81cf1d7 100644 --- a/rtc_base/ssl_identity.cc +++ b/rtc_base/ssl_identity.cc
@@ -121,7 +121,7 @@ params_.rsa.mod_size = kRsaDefaultModSize; params_.rsa.pub_exp = kRsaDefaultExponent; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/rtc_base/strings/string_builder.cc b/rtc_base/strings/string_builder.cc index caa931b..7536cd7 100644 --- a/rtc_base/strings/string_builder.cc +++ b/rtc_base/strings/string_builder.cc
@@ -98,7 +98,7 @@ } else { // This should never happen, but we're paranoid, so re-write the // terminator in case vsnprintf() overwrote it. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); buffer_[size_] = '\0'; } va_end(args);
diff --git a/rtc_base/system_time.cc b/rtc_base/system_time.cc index 9efe76e..d53d923 100644 --- a/rtc_base/system_time.cc +++ b/rtc_base/system_time.cc
@@ -48,7 +48,7 @@ // Get the timebase if this is the first time we run. // Recommended by Apple's QA1398. if (mach_timebase_info(&timebase) != KERN_SUCCESS) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } // Use timebase to convert absolute time tick units into nanoseconds.
diff --git a/rtc_base/task_queue_libevent.cc b/rtc_base/task_queue_libevent.cc index a8b0dbf..4f56400 100644 --- a/rtc_base/task_queue_libevent.cc +++ b/rtc_base/task_queue_libevent.cc
@@ -288,7 +288,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } }
diff --git a/rtc_base/task_queue_win.cc b/rtc_base/task_queue_win.cc index da0535d..6382d6b 100644 --- a/rtc_base/task_queue_win.cc +++ b/rtc_base/task_queue_win.cc
@@ -335,7 +335,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } else {
diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc index 692d802..46e082f 100644 --- a/rtc_base/thread.cc +++ b/rtc_base/thread.cc
@@ -116,7 +116,7 @@ ThreadManager::~ThreadManager() { // By above RTC_DEFINE_STATIC_LOCAL. - RTC_NOTREACHED() << "ThreadManager should never be destructed."; + RTC_DCHECK_NOTREACHED() << "ThreadManager should never be destructed."; } // static
diff --git a/rtc_base/virtual_socket_server.cc b/rtc_base/virtual_socket_server.cc index bcda9cd..88c6eb9 100644 --- a/rtc_base/virtual_socket_server.cc +++ b/rtc_base/virtual_socket_server.cc
@@ -372,7 +372,7 @@ } else if (pmsg->message_id == MSG_ID_SIGNALREADEVENT) { signal_read_event = !recv_buffer_.empty(); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } // Signal events without holding `mutex_`, to avoid recursive locking, as well
diff --git a/rtc_base/win/windows_version.cc b/rtc_base/win/windows_version.cc index 68866da..80e49f2 100644 --- a/rtc_base/win/windows_version.cc +++ b/rtc_base/win/windows_version.cc
@@ -215,7 +215,7 @@ return VERSION_WIN10_20H1; } } else if (major > 6) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return VERSION_WIN_LAST; }
diff --git a/rtc_base/win32_socket_server.cc b/rtc_base/win32_socket_server.cc index 835d1a7..3f3a826 100644 --- a/rtc_base/win32_socket_server.cc +++ b/rtc_base/win32_socket_server.cc
@@ -566,7 +566,7 @@ RTC_LOG(LS_WARNING) << "Socket::OPT_DSCP not supported."; return -1; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } return 0;
diff --git a/rtc_tools/network_tester/test_controller.cc b/rtc_tools/network_tester/test_controller.cc index 9c0d324..d0e2f4c 100644 --- a/rtc_tools/network_tester/test_controller.cc +++ b/rtc_tools/network_tester/test_controller.cc
@@ -126,7 +126,7 @@ break; } default: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } }
diff --git a/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc b/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc index 02184a6..69a753b 100644 --- a/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc +++ b/rtc_tools/rtc_event_log_visualizer/analyze_audio.cc
@@ -266,7 +266,7 @@ file_sample_rate_hz_(file_sample_rate_hz) {} std::vector<AudioCodecSpec> GetSupportedDecoders() override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.cc b/rtc_tools/rtc_event_log_visualizer/analyzer.cc index bdde2c9..b438016 100644 --- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc +++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
@@ -959,7 +959,7 @@ last_series = &overusing_series; break; case BandwidthUsage::kLast: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/rtc_tools/video_replay.cc b/rtc_tools/video_replay.cc index 02202dd..c9fe40f 100644 --- a/rtc_tools/video_replay.cc +++ b/rtc_tools/video_replay.cc
@@ -292,7 +292,7 @@ video_codec_type_ = VideoCodecType::kVideoCodecH264; } else { RTC_LOG(LS_ERROR) << "Unsupported video codec " << codec; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } ~DecoderIvfFileWriter() override { file_writer_->Close(); }
diff --git a/sdk/android/src/jni/android_network_monitor.cc b/sdk/android/src/jni/android_network_monitor.cc index 08b77fe..9dbc27f 100644 --- a/sdk/android/src/jni/android_network_monitor.cc +++ b/sdk/android/src/jni/android_network_monitor.cc
@@ -104,7 +104,7 @@ if (enum_name == "CONNECTION_NONE") { return NetworkType::NETWORK_NONE; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return NetworkType::NETWORK_UNKNOWN; } @@ -138,7 +138,7 @@ // Map it to VPN for now. return rtc::ADAPTER_TYPE_VPN; default: - RTC_NOTREACHED() << "Invalid network type " << network_type; + RTC_DCHECK_NOTREACHED() << "Invalid network type " << network_type; return rtc::ADAPTER_TYPE_UNKNOWN; } }
diff --git a/sdk/android/src/jni/logging/log_sink.cc b/sdk/android/src/jni/logging/log_sink.cc index 412a781..cebc866 100644 --- a/sdk/android/src/jni/logging/log_sink.cc +++ b/sdk/android/src/jni/logging/log_sink.cc
@@ -28,7 +28,7 @@ } void JNILogSink::OnLogMessage(const std::string& msg) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } // namespace jni
diff --git a/sdk/android/src/jni/pc/peer_connection.cc b/sdk/android/src/jni/pc/peer_connection.cc index abd7ac7..7875fe9 100644 --- a/sdk/android/src/jni/pc/peer_connection.cc +++ b/sdk/android/src/jni/pc/peer_connection.cc
@@ -117,7 +117,7 @@ if (enum_name == "UNIFIED_PLAN") return SdpSemantics::kUnifiedPlan; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return SdpSemantics::kPlanB; }
diff --git a/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc b/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc index baa3f27..b8eae73 100644 --- a/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc +++ b/sdk/android/src/jni/pc/rtc_stats_collector_callback_wrapper.cc
@@ -112,7 +112,7 @@ NativeToJavaDouble(env, entry.second)); }); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; }
diff --git a/sdk/objc/api/logging/RTCCallbackLogger.mm b/sdk/objc/api/logging/RTCCallbackLogger.mm index 443fee1..12cedd6 100644 --- a/sdk/objc/api/logging/RTCCallbackLogger.mm +++ b/sdk/objc/api/logging/RTCCallbackLogger.mm
@@ -36,7 +36,7 @@ CallbackWithSeverityLogSink(RTCCallbackLoggerMessageAndSeverityHandler callbackHandler) : callback_handler_(callbackHandler) {} - void OnLogMessage(const std::string& message) override { RTC_NOTREACHED(); } + void OnLogMessage(const std::string& message) override { RTC_DCHECK_NOTREACHED(); } void OnLogMessage(const std::string& message, rtc::LoggingSeverity severity) override { if (callback_handler_) {
diff --git a/sdk/objc/api/peerconnection/RTCAudioSource.mm b/sdk/objc/api/peerconnection/RTCAudioSource.mm index b56c6e9..1541045 100644 --- a/sdk/objc/api/peerconnection/RTCAudioSource.mm +++ b/sdk/objc/api/peerconnection/RTCAudioSource.mm
@@ -35,7 +35,7 @@ - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory nativeMediaSource:(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource type:(RTCMediaSourceType)type { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nil; }
diff --git a/sdk/objc/api/peerconnection/RTCRtpCodecParameters.mm b/sdk/objc/api/peerconnection/RTCRtpCodecParameters.mm index b48d51f..753667b 100644 --- a/sdk/objc/api/peerconnection/RTCRtpCodecParameters.mm +++ b/sdk/objc/api/peerconnection/RTCRtpCodecParameters.mm
@@ -61,10 +61,10 @@ _kind = kRTCMediaStreamTrackKindVideo; break; case cricket::MEDIA_TYPE_DATA: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case cricket::MEDIA_TYPE_UNSUPPORTED: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } if (nativeParameters.clock_rate) { @@ -94,7 +94,7 @@ } else if (_kind == kRTCMediaStreamTrackKindVideo) { parameters.kind = cricket::MEDIA_TYPE_VIDEO; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (_clockRate != nil) { parameters.clock_rate = absl::optional<int>(_clockRate.intValue);
diff --git a/sdk/objc/api/peerconnection/RTCSessionDescription.mm b/sdk/objc/api/peerconnection/RTCSessionDescription.mm index 4ff02e8..539c90b 100644 --- a/sdk/objc/api/peerconnection/RTCSessionDescription.mm +++ b/sdk/objc/api/peerconnection/RTCSessionDescription.mm
@@ -95,7 +95,7 @@ } else if (string == webrtc::SessionDescriptionInterface::kRollback) { return RTCSdpTypeRollback; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return RTCSdpTypeOffer; } }
diff --git a/sdk/objc/api/peerconnection/RTCStatisticsReport.mm b/sdk/objc/api/peerconnection/RTCStatisticsReport.mm index 967683f..28ef326 100644 --- a/sdk/objc/api/peerconnection/RTCStatisticsReport.mm +++ b/sdk/objc/api/peerconnection/RTCStatisticsReport.mm
@@ -112,7 +112,7 @@ return [dictionary copy]; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/sdk/objc/api/peerconnection/RTCVideoSource.mm b/sdk/objc/api/peerconnection/RTCVideoSource.mm index 0b1d4a6..3211f18 100644 --- a/sdk/objc/api/peerconnection/RTCVideoSource.mm +++ b/sdk/objc/api/peerconnection/RTCVideoSource.mm
@@ -44,7 +44,7 @@ - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory nativeMediaSource:(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource type:(RTCMediaSourceType)type { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nil; }
diff --git a/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm b/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm index 48d09cf..261874d 100644 --- a/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm +++ b/sdk/objc/api/video_codec/RTCWrappedNativeVideoDecoder.mm
@@ -33,16 +33,16 @@ #pragma mark - RTC_OBJC_TYPE(RTCVideoDecoder) - (void)setCallback:(RTCVideoDecoderCallback)callback { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } - (NSInteger)releaseDecoder { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -50,12 +50,12 @@ missingFrames:(BOOL)missingFrames codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info renderTimeMs:(int64_t)renderTimeMs { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } - (NSString *)implementationName { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nil; }
diff --git a/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm b/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm index 6b04d83..4160572 100644 --- a/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm +++ b/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm
@@ -33,54 +33,54 @@ #pragma mark - RTC_OBJC_TYPE(RTCVideoEncoder) - (void)setCallback:(RTCVideoEncoderCallback)callback { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } - (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings numberOfCores:(int)numberOfCores { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } - (NSInteger)releaseEncoder { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } - (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info frameTypes:(NSArray<NSNumber *> *)frameTypes { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } - (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } - (NSString *)implementationName { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nil; } - (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nil; } - (NSInteger)resolutionAlignment { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 1; } - (BOOL)applyAlignmentToAllSimulcastLayers { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return NO; } - (BOOL)supportsNativeHandle { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return NO; } @end
diff --git a/sdk/objc/components/renderer/metal/RTCMTLRGBRenderer.mm b/sdk/objc/components/renderer/metal/RTCMTLRGBRenderer.mm index c6adcd0..e5dc4ef 100644 --- a/sdk/objc/components/renderer/metal/RTCMTLRGBRenderer.mm +++ b/sdk/objc/components/renderer/metal/RTCMTLRGBRenderer.mm
@@ -126,7 +126,7 @@ mtlPixelFormat = MTLPixelFormatRGBA8Unorm; isARGB = true; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return NO; }
diff --git a/sdk/objc/components/renderer/metal/RTCMTLRenderer.mm b/sdk/objc/components/renderer/metal/RTCMTLRenderer.mm index e8d1613..410590a 100644 --- a/sdk/objc/components/renderer/metal/RTCMTLRenderer.mm +++ b/sdk/objc/components/renderer/metal/RTCMTLRenderer.mm
@@ -153,12 +153,12 @@ } - (NSString *)shaderSource { - RTC_NOTREACHED() << "Virtual method not implemented in subclass."; + RTC_DCHECK_NOTREACHED() << "Virtual method not implemented in subclass."; return nil; } - (void)uploadTexturesToRenderEncoder:(id<MTLRenderCommandEncoder>)renderEncoder { - RTC_NOTREACHED() << "Virtual method not implemented in subclass."; + RTC_DCHECK_NOTREACHED() << "Virtual method not implemented in subclass."; } - (void)getWidth:(int *)width @@ -168,7 +168,7 @@ cropX:(int *)cropX cropY:(int *)cropY ofFrame:(nonnull RTC_OBJC_TYPE(RTCVideoFrame) *)frame { - RTC_NOTREACHED() << "Virtual method not implemented in subclass."; + RTC_DCHECK_NOTREACHED() << "Virtual method not implemented in subclass."; } - (BOOL)setupTexturesForFrame:(nonnull RTC_OBJC_TYPE(RTCVideoFrame) *)frame {
diff --git a/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.mm b/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.mm index df8077b..8e39edd 100644 --- a/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.mm +++ b/sdk/objc/components/video_frame_buffer/RTCCVPixelBuffer.mm
@@ -116,7 +116,7 @@ return 0; // Scaling RGBA frames does not require a temporary buffer. } } - RTC_NOTREACHED() << "Unsupported pixel format."; + RTC_DCHECK_NOTREACHED() << "Unsupported pixel format."; return 0; } @@ -146,7 +146,9 @@ [self cropAndScaleARGBTo:outputPixelBuffer]; break; } - default: { RTC_NOTREACHED() << "Unsupported pixel format."; } + default: { + RTC_DCHECK_NOTREACHED() << "Unsupported pixel format."; + } } return YES; @@ -242,7 +244,9 @@ } break; } - default: { RTC_NOTREACHED() << "Unsupported pixel format."; } + default: { + RTC_DCHECK_NOTREACHED() << "Unsupported pixel format."; + } } CVPixelBufferUnlockBaseAddress(_pixelBuffer, kCVPixelBufferLock_ReadOnly);
diff --git a/sdk/objc/native/src/audio/audio_device_ios.mm b/sdk/objc/native/src/audio/audio_device_ios.mm index 3ec7d0b..248f3fc 100644 --- a/sdk/objc/native/src/audio/audio_device_ios.mm +++ b/sdk/objc/native/src/audio/audio_device_ios.mm
@@ -779,7 +779,7 @@ switch (audio_unit_->GetState()) { case VoiceProcessingAudioUnit::kInitRequired: RTCLog(@"VPAU state: InitRequired"); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; case VoiceProcessingAudioUnit::kUninitialized: RTCLog(@"VPAU state: Uninitialized"); @@ -1006,22 +1006,22 @@ } int32_t AudioDeviceIOS::SetSpeakerVolume(uint32_t volume) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::SpeakerVolume(uint32_t& volume) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::MaxSpeakerVolume(uint32_t& maxVolume) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::MinSpeakerVolume(uint32_t& minVolume) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } @@ -1031,12 +1031,12 @@ } int32_t AudioDeviceIOS::SetSpeakerMute(bool enable) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::SpeakerMute(bool& enabled) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } @@ -1046,7 +1046,7 @@ } int32_t AudioDeviceIOS::SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } @@ -1064,12 +1064,12 @@ } int32_t AudioDeviceIOS::SetMicrophoneMute(bool enable) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::MicrophoneMute(bool& enabled) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } @@ -1109,36 +1109,36 @@ } int32_t AudioDeviceIOS::SetMicrophoneVolume(uint32_t volume) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::MicrophoneVolume(uint32_t& volume) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::MaxMicrophoneVolume(uint32_t& maxVolume) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::MinMicrophoneVolume(uint32_t& minVolume) const { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::PlayoutDeviceName(uint16_t index, char name[kAdmMaxDeviceNameSize], char guid[kAdmMaxGuidSize]) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } int32_t AudioDeviceIOS::RecordingDeviceName(uint16_t index, char name[kAdmMaxDeviceNameSize], char guid[kAdmMaxGuidSize]) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } @@ -1148,7 +1148,7 @@ } int32_t AudioDeviceIOS::SetRecordingDevice(AudioDeviceModule::WindowsDeviceType) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; }
diff --git a/system_wrappers/include/metrics.h b/system_wrappers/include/metrics.h index e540b70..c9924584 100644 --- a/system_wrappers/include/metrics.h +++ b/system_wrappers/include/metrics.h
@@ -270,7 +270,7 @@ macro_invocation; \ break; \ default: \ - RTC_NOTREACHED(); \ + RTC_DCHECK_NOTREACHED(); \ } \ } while (0)
diff --git a/system_wrappers/source/field_trial.cc b/system_wrappers/source/field_trial.cc index d10b5cf..d16ea7e 100644 --- a/system_wrappers/source/field_trial.cc +++ b/system_wrappers/source/field_trial.cc
@@ -85,7 +85,7 @@ (*fieldtrial_map)[tokens[idx]] = tokens[idx + 1]; } } else { - RTC_NOTREACHED() << "Invalid field trials string:" << trials_string; + RTC_DCHECK_NOTREACHED() << "Invalid field trials string:" << trials_string; } }
diff --git a/test/audio_decoder_proxy_factory.h b/test/audio_decoder_proxy_factory.h index 04f397f6..95606d6 100644 --- a/test/audio_decoder_proxy_factory.h +++ b/test/audio_decoder_proxy_factory.h
@@ -31,7 +31,7 @@ // Unused by tests. std::vector<AudioCodecSpec> GetSupportedDecoders() override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/test/frame_generator.cc b/test/frame_generator.cc index 913a4fb..92e95f6 100644 --- a/test/frame_generator.cc +++ b/test/frame_generator.cc
@@ -82,7 +82,7 @@ break; } default: - RTC_NOTREACHED() << "The given output format is not supported."; + RTC_DCHECK_NOTREACHED() << "The given output format is not supported."; } for (const auto& square : squares_)
diff --git a/test/frame_generator.h b/test/frame_generator.h index 94e15cb..a5521bf 100644 --- a/test/frame_generator.h +++ b/test/frame_generator.h
@@ -75,7 +75,7 @@ VideoFrameData NextFrame() override; void ChangeResolution(size_t width, size_t height) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } private: @@ -104,7 +104,7 @@ VideoFrameData NextFrame() override; void ChangeResolution(size_t width, size_t height) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } private: @@ -134,7 +134,7 @@ VideoFrameData NextFrame() override; void ChangeResolution(size_t width, size_t height) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } private:
diff --git a/test/function_audio_decoder_factory.h b/test/function_audio_decoder_factory.h index a5ee593..8464f3d 100644 --- a/test/function_audio_decoder_factory.h +++ b/test/function_audio_decoder_factory.h
@@ -41,7 +41,7 @@ // Unused by tests. std::vector<AudioCodecSpec> GetSupportedDecoders() override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/test/layer_filtering_transport.cc b/test/layer_filtering_transport.cc index d906e07..08c90f7 100644 --- a/test/layer_filtering_transport.cc +++ b/test/layer_filtering_transport.cc
@@ -163,7 +163,7 @@ } } } else { - RTC_NOTREACHED() << "Parse error"; + RTC_DCHECK_NOTREACHED() << "Parse error"; } }
diff --git a/test/mappable_native_buffer.cc b/test/mappable_native_buffer.cc index bd0b304..5625731 100644 --- a/test/mappable_native_buffer.cc +++ b/test/mappable_native_buffer.cc
@@ -173,7 +173,7 @@ break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } mapped_buffers_.push_back(mapped_buffer); return mapped_buffer;
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc index 392ebc2..64df2b8 100644 --- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc +++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
@@ -93,7 +93,8 @@ mode_ = SimulcastMode::kSimulcast; break; default: - RTC_NOTREACHED() << "Unknown codec_settings->VP9().interLayerPred"; + RTC_DCHECK_NOTREACHED() + << "Unknown codec_settings->VP9().interLayerPred"; break; } } @@ -344,7 +345,7 @@ return *cur_spatial_index != *required_spatial_index; } } else { - RTC_NOTREACHED() << "Unsupported encoder mode"; + RTC_DCHECK_NOTREACHED() << "Unsupported encoder mode"; } } return false;
diff --git a/test/peer_scenario/peer_scenario_client.cc b/test/peer_scenario/peer_scenario_client.cc index 7ff6d41..cd5beee 100644 --- a/test/peer_scenario/peer_scenario_client.cc +++ b/test/peer_scenario/peer_scenario_client.cc
@@ -130,7 +130,7 @@ on_success_(absl::WrapUnique(desc)); } void OnFailure(RTCError error) override { - RTC_NOTREACHED() << error.message(); + RTC_DCHECK_NOTREACHED() << error.message(); } private:
diff --git a/test/scenario/hardware_codecs.cc b/test/scenario/hardware_codecs.cc index 5267e89..cac0f10 100644 --- a/test/scenario/hardware_codecs.cc +++ b/test/scenario/hardware_codecs.cc
@@ -28,7 +28,8 @@ #ifdef WEBRTC_MAC return CreateObjCEncoderFactory(); #else - RTC_NOTREACHED() << "Hardware encoder not implemented on this platform."; + RTC_DCHECK_NOTREACHED() + << "Hardware encoder not implemented on this platform."; return nullptr; #endif #endif @@ -41,7 +42,8 @@ #ifdef WEBRTC_MAC return CreateObjCDecoderFactory(); #else - RTC_NOTREACHED() << "Hardware decoder not implemented on this platform."; + RTC_DCHECK_NOTREACHED() + << "Hardware decoder not implemented on this platform."; return nullptr; #endif #endif
diff --git a/test/scenario/video_stream.cc b/test/scenario/video_stream.cc index 2cce904..9e10613 100644 --- a/test/scenario/video_stream.cc +++ b/test/scenario/video_stream.cc
@@ -49,7 +49,7 @@ case VideoCodecType::kVideoCodecH264: return CallTest::kPayloadTypeH264; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return {}; } @@ -64,7 +64,7 @@ case VideoCodecType::kVideoCodecH264: return cricket::kH264CodecName; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return {}; } @@ -222,7 +222,7 @@ case Codec::kVideoCodecAV1: return nullptr; case Codec::kVideoCodecMultiplex: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -382,7 +382,7 @@ } else if (config_.encoder.codec == Codec::kVideoCodecGeneric) { encoder = std::make_unique<test::FakeEncoder>(sender_->clock_); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } fake_encoders_.push_back(encoder.get()); if (config_.encoder.fake.max_rate.IsFinite())
diff --git a/test/testsupport/file_utils.cc b/test/testsupport/file_utils.cc index c66f67c..777d789 100644 --- a/test/testsupport/file_utils.cc +++ b/test/testsupport/file_utils.cc
@@ -106,7 +106,7 @@ if (::GetTempFileNameW(rtc::ToUtf16(dir).c_str(), rtc::ToUtf16(prefix).c_str(), 0, filename) != 0) return rtc::ToUtf8(filename); - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; #else int len = dir.size() + prefix.size() + 2 + 6; @@ -115,7 +115,7 @@ snprintf(tempname.get(), len, "%s/%sXXXXXX", dir.c_str(), prefix.c_str()); int fd = ::mkstemp(tempname.get()); if (fd == -1) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } else { ::close(fd);
diff --git a/test/testsupport/file_utils_override.cc b/test/testsupport/file_utils_override.cc index 4339155..1e4d56d 100644 --- a/test/testsupport/file_utils_override.cc +++ b/test/testsupport/file_utils_override.cc
@@ -91,7 +91,7 @@ char buf[PATH_MAX]; ssize_t count = ::readlink("/proc/self/exe", buf, arraysize(buf)); if (count <= 0) { - RTC_NOTREACHED() << "Unable to resolve /proc/self/exe."; + RTC_DCHECK_NOTREACHED() << "Unable to resolve /proc/self/exe."; return absl::nullopt; } // On POSIX, tests execute in out/Whatever, so src is two levels up.
diff --git a/test/testsupport/perf_result_reporter.cc b/test/testsupport/perf_result_reporter.cc index 158f1cd..436d1ba 100644 --- a/test/testsupport/perf_result_reporter.cc +++ b/test/testsupport/perf_result_reporter.cc
@@ -71,7 +71,7 @@ case Unit::kSigma: return "sigma"; default: - RTC_NOTREACHED() << "Unknown unit " << unit; + RTC_DCHECK_NOTREACHED() << "Unknown unit " << unit; return "unitless"; } }
diff --git a/test/testsupport/perf_test_histogram_writer.cc b/test/testsupport/perf_test_histogram_writer.cc index 096ca44..93924ba 100644 --- a/test/testsupport/perf_test_histogram_writer.cc +++ b/test/testsupport/perf_test_histogram_writer.cc
@@ -181,7 +181,7 @@ case ImproveDirection::kBiggerIsBetter: return proto::BIGGER_IS_BETTER; default: - RTC_NOTREACHED() << "Invalid enum value " << improve_direction; + RTC_DCHECK_NOTREACHED() << "Invalid enum value " << improve_direction; } }
diff --git a/test/testsupport/perf_test_histogram_writer_no_protobuf.cc b/test/testsupport/perf_test_histogram_writer_no_protobuf.cc index 14deb37..6bc810b 100644 --- a/test/testsupport/perf_test_histogram_writer_no_protobuf.cc +++ b/test/testsupport/perf_test_histogram_writer_no_protobuf.cc
@@ -14,8 +14,9 @@ namespace test { PerfTestResultWriter* CreateHistogramWriter() { - RTC_NOTREACHED() << "Cannot run perf tests with rtc_enable_protobuf = false. " - "Perf write results as protobufs."; + RTC_DCHECK_NOTREACHED() + << "Cannot run perf tests with rtc_enable_protobuf = false. " + "Perf write results as protobufs."; return nullptr; }
diff --git a/test/time_controller/external_time_controller.cc b/test/time_controller/external_time_controller.cc index ca8b5ac..e374d45 100644 --- a/test/time_controller/external_time_controller.cc +++ b/test/time_controller/external_time_controller.cc
@@ -109,7 +109,7 @@ void Delete() override { // ProcessThread shouldn't be deleted as a TaskQueue. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ModuleWrapper* GetWrapper(Module* module) { @@ -200,12 +200,12 @@ std::unique_ptr<rtc::Thread> ExternalTimeController::CreateThread( const std::string& name, std::unique_ptr<rtc::SocketServer> socket_server) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } rtc::Thread* ExternalTimeController::GetMainThread() { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; }
diff --git a/test/time_controller/simulated_process_thread.h b/test/time_controller/simulated_process_thread.h index 54d5db7..9a0efac 100644 --- a/test/time_controller/simulated_process_thread.h +++ b/test/time_controller/simulated_process_thread.h
@@ -49,7 +49,7 @@ private: void Delete() override { // ProcessThread shouldn't be deleted as a TaskQueue. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } Timestamp GetNextTime(Module* module, Timestamp at_time);
diff --git a/test/time_controller/simulated_thread.cc b/test/time_controller/simulated_thread.cc index 73a52b2..4de36c5 100644 --- a/test/time_controller/simulated_thread.cc +++ b/test/time_controller/simulated_thread.cc
@@ -23,7 +23,7 @@ class DummySocketServer : public rtc::SocketServer { public: rtc::Socket* CreateSocket(int family, int type) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } bool Wait(int cms, bool process_io) override {
diff --git a/test/time_controller/simulated_time_controller.h b/test/time_controller/simulated_time_controller.h index 595c18d..b79de3b 100644 --- a/test/time_controller/simulated_time_controller.h +++ b/test/time_controller/simulated_time_controller.h
@@ -109,13 +109,13 @@ // Promoted to public using CurrentTaskQueueSetter = TaskQueueBase::CurrentTaskQueueSetter; - void Delete() override { RTC_NOTREACHED(); } + void Delete() override { RTC_DCHECK_NOTREACHED(); } void PostTask(std::unique_ptr<QueuedTask> /*task*/) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } void PostDelayedTask(std::unique_ptr<QueuedTask> /*task*/, uint32_t /*milliseconds*/) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } };
diff --git a/test/time_controller/time_controller_conformance_test.cc b/test/time_controller/time_controller_conformance_test.cc index 3d582ca..6a35165 100644 --- a/test/time_controller/time_controller_conformance_test.cc +++ b/test/time_controller/time_controller_conformance_test.cc
@@ -54,7 +54,7 @@ case webrtc::TimeMode::kSimulated: return "SimulatedTime"; default: - RTC_NOTREACHED() << "Time mode not supported"; + RTC_DCHECK_NOTREACHED() << "Time mode not supported"; } }
diff --git a/test/video_decoder_proxy_factory.h b/test/video_decoder_proxy_factory.h index f294f62..6fd3805 100644 --- a/test/video_decoder_proxy_factory.h +++ b/test/video_decoder_proxy_factory.h
@@ -30,7 +30,7 @@ // Unused by tests. std::vector<SdpVideoFormat> GetSupportedFormats() const override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/test/video_encoder_proxy_factory.h b/test/video_encoder_proxy_factory.h index 7c412ba..f40e69d 100644 --- a/test/video_encoder_proxy_factory.h +++ b/test/video_encoder_proxy_factory.h
@@ -43,7 +43,7 @@ // Unused by tests. std::vector<SdpVideoFormat> GetSupportedFormats() const override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; }
diff --git a/video/call_stats2.h b/video/call_stats2.h index 878a43f..74bd348 100644 --- a/video/call_stats2.h +++ b/video/call_stats2.h
@@ -93,7 +93,7 @@ // propagating the rtt from the RtpRtcp module, which does not call // LastProcessedRtt(). Down the line we should consider removing // LastProcessedRtt() and use the interface for event notifications only. - RTC_NOTREACHED() << "Legacy call path"; + RTC_DCHECK_NOTREACHED() << "Legacy call path"; return 0; }
diff --git a/video/cpu_scaling_tests.cc b/video/cpu_scaling_tests.cc index 108c118..5f3dbd7 100644 --- a/video/cpu_scaling_tests.cc +++ b/video/cpu_scaling_tests.cc
@@ -96,7 +96,7 @@ observation_complete_.Set(); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } }
diff --git a/video/encoder_bitrate_adjuster.cc b/video/encoder_bitrate_adjuster.cc index 6a2c99f..9f4d855 100644 --- a/video/encoder_bitrate_adjuster.cc +++ b/video/encoder_bitrate_adjuster.cc
@@ -163,7 +163,7 @@ weight * ti_media_utilization_factor.value(); } } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (layer_info.link_utilization_factor < 1.0) {
diff --git a/video/end_to_end_tests/multi_codec_receive_tests.cc b/video/end_to_end_tests/multi_codec_receive_tests.cc index e529ae4..4ab16cc 100644 --- a/video/end_to_end_tests/multi_codec_receive_tests.cc +++ b/video/end_to_end_tests/multi_codec_receive_tests.cc
@@ -42,7 +42,7 @@ } else if (payload_name == "H264") { return test::CallTest::kPayloadTypeH264; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } } @@ -223,7 +223,7 @@ if (format.name == "H264") { return H264Encoder::Create(cricket::VideoCodec("H264")); } - RTC_NOTREACHED() << format.name; + RTC_DCHECK_NOTREACHED() << format.name; return nullptr; }); test::FunctionVideoDecoderFactory decoder_factory( @@ -237,7 +237,7 @@ if (format.name == "H264") { return H264Decoder::Create(); } - RTC_NOTREACHED() << format.name; + RTC_DCHECK_NOTREACHED() << format.name; return nullptr; }); // Create and start call.
diff --git a/video/end_to_end_tests/rtp_rtcp_tests.cc b/video/end_to_end_tests/rtp_rtcp_tests.cc index a698328..90830d1 100644 --- a/video/end_to_end_tests/rtp_rtcp_tests.cc +++ b/video/end_to_end_tests/rtp_rtcp_tests.cc
@@ -82,7 +82,7 @@ observation_complete_.Set(); break; case RtcpMode::kOff: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; }
diff --git a/video/picture_id_tests.cc b/video/picture_id_tests.cc index df7b082..6dda450 100644 --- a/video/picture_id_tests.cc +++ b/video/picture_id_tests.cc
@@ -111,7 +111,7 @@ parsed->tl0_pic_idx = vp9_header->tl0_pic_idx; parsed->temporal_idx = vp9_header->temporal_idx; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } parsed->frame_type = parsed_payload->video_header.frame_type;
diff --git a/video/quality_scaling_tests.cc b/video/quality_scaling_tests.cc index 9837517..c7c393e 100644 --- a/video/quality_scaling_tests.cc +++ b/video/quality_scaling_tests.cc
@@ -82,7 +82,7 @@ return VP9Encoder::Create(); if (format.name == "H264") return H264Encoder::Create(cricket::VideoCodec("H264")); - RTC_NOTREACHED() << format.name; + RTC_DCHECK_NOTREACHED() << format.name; return nullptr; }), payload_name_(payload_name),
diff --git a/video/send_statistics_proxy.cc b/video/send_statistics_proxy.cc index a50008c..eeb379f 100644 --- a/video/send_statistics_proxy.cc +++ b/video/send_statistics_proxy.cc
@@ -60,7 +60,7 @@ case VideoEncoderConfig::ContentType::kScreen: return kScreenPrefix; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -795,7 +795,7 @@ } else if (is_flexfec) { entry->type = VideoSendStream::StreamStats::StreamType::kFlexfec; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } switch (entry->type) { case VideoSendStream::StreamStats::StreamType::kMedia:
diff --git a/video/stats_counter.cc b/video/stats_counter.cc index fed9f66..dc548ea 100644 --- a/video/stats_counter.cc +++ b/video/stats_counter.cc
@@ -354,7 +354,7 @@ } int MaxCounter::GetValueForEmptyInterval() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -378,7 +378,7 @@ } int PercentCounter::GetValueForEmptyInterval() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -402,7 +402,7 @@ } int PermilleCounter::GetValueForEmptyInterval() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; }
diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc index ac565cc..9fa7a98 100644 --- a/video/video_quality_test.cc +++ b/video/video_quality_test.cc
@@ -888,9 +888,9 @@ // aom_codec_enc_cfg_t::rc_resize_mode in Av1 encoder wrapper. // Until then do nothing, specially do not crash. } else { - RTC_NOTREACHED() << "Automatic scaling not supported for codec " - << params_.video[video_idx].codec << ", stream " - << video_idx; + RTC_DCHECK_NOTREACHED() + << "Automatic scaling not supported for codec " + << params_.video[video_idx].codec << ", stream " << video_idx; } } else { // Default mode. Single SL, no automatic_scaling,
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc index 34a8b15..fcd4d7d 100644 --- a/video/video_receive_stream.cc +++ b/video/video_receive_stream.cc
@@ -459,7 +459,7 @@ void VideoReceiveStream::SetRtpExtensions( std::vector<RtpExtension> extensions) { // VideoReceiveStream is deprecated and this function not supported. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } bool VideoReceiveStream::SetBaseMinimumPlayoutDelayMs(int delay_ms) { @@ -584,14 +584,14 @@ bool VideoReceiveStream::GetPlayoutRtpTimestamp(uint32_t* rtp_timestamp, int64_t* time_ms) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } void VideoReceiveStream::SetEstimatedPlayoutNtpTimestampMs( int64_t ntp_timestamp_ms, int64_t time_ms) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } bool VideoReceiveStream::SetMinimumPlayoutDelay(int delay_ms) {
diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index 0776a40..87117ea 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc
@@ -695,14 +695,14 @@ bool VideoReceiveStream2::GetPlayoutRtpTimestamp(uint32_t* rtp_timestamp, int64_t* time_ms) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } void VideoReceiveStream2::SetEstimatedPlayoutNtpTimestampMs( int64_t ntp_timestamp_ms, int64_t time_ms) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } bool VideoReceiveStream2::SetMinimumPlayoutDelay(int delay_ms) {
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc index 91d5ccc..485072e 100644 --- a/video/video_send_stream_tests.cc +++ b/video/video_send_stream_tests.cc
@@ -3227,7 +3227,7 @@ VerifyTemporalLayerStructure3(vp9); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -3945,7 +3945,7 @@ state_ = StreamState::kAfterSwitchBack; break; case StreamState::kAfterSwitchBack: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } content_switch_event_.Set(); @@ -4095,7 +4095,7 @@ &parsed_payload->video_header.video_type_header)) { parsed.temporal_idx = vp8_header->temporalIdx; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return true; }
diff --git a/video/video_stream_encoder_unittest.cc b/video/video_stream_encoder_unittest.cc index 49e5619..1331b8c 100644 --- a/video/video_stream_encoder_unittest.cc +++ b/video/video_stream_encoder_unittest.cc
@@ -8382,7 +8382,7 @@ false); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ConfigureEncoderAndBitrate(codec_type_, std::move(encoder)); } @@ -8609,7 +8609,7 @@ str = "Multiplex"; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } str += allow_i420_conversion ? "_AllowToI420" : "_DisallowToI420"; return str;