diff --git a/api/audio/channel_layout.cc b/api/audio/channel_layout.cc index 567f4d9b26..e4ae356fab 100644 --- a/api/audio/channel_layout.cc +++ b/api/audio/channel_layout.cc @@ -275,7 +275,7 @@ const char* ChannelLayoutToString(ChannelLayout layout) { 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 4fc995172b..d5c1cfed99 100644 --- a/api/audio_codecs/audio_decoder.cc +++ b/api/audio_codecs/audio_decoder.cc @@ -161,7 +161,7 @@ AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) { 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 cd4d2000d2..81cfbe31c6 100644 --- a/api/audio_codecs/audio_encoder.cc +++ b/api/audio_codecs/audio_encoder.cc @@ -83,7 +83,7 @@ void AudioEncoder::OnReceivedUplinkPacketLossFraction( 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 ad497d943b..d61dd98498 100644 --- a/api/media_stream_interface.h +++ b/api/media_stream_interface.h @@ -203,7 +203,7 @@ class AudioTrackSinkInterface { 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 3453ce3905..5c7d55b876 100644 --- a/api/media_types.cc +++ b/api/media_types.cc @@ -28,7 +28,7 @@ std::string MediaTypeToString(MediaType type) { return kMediaTypeData; case MEDIA_TYPE_UNSUPPORTED: // Unsupported media stores the m= 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 a46ba27247..29d2606b9b 100644 --- a/api/packet_socket_factory.h +++ b/api/packet_socket_factory.h @@ -79,7 +79,7 @@ class RTC_EXPORT PacketSocketFactory { 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 fd5085c336..454e450c8d 100644 --- a/api/rtp_transceiver_interface.cc +++ b/api/rtp_transceiver_interface.cc @@ -34,17 +34,19 @@ void RtpTransceiverInterface::Stop() { } 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) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return {}; } @@ -78,7 +80,7 @@ void RtpTransceiverInterface::SetDirection( 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 ddba593a1e..60818ee439 100644 --- a/api/stats_types.cc +++ b/api/stats_types.cc @@ -58,7 +58,7 @@ const char* InternalTypeToString(StatsReport::StatsType type) { case StatsReport::kStatsReportTypeDataChannel: return "datachannel"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -291,7 +291,7 @@ bool StatsReport::Value::Equals(const Value& other) const { case kId: return (*value_.id_)->Equals(*other.value_.id_); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -676,7 +676,7 @@ std::string StatsReport::Value::ToString() const { 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 356fe3af53..fe7b1e883d 100644 --- a/api/test/frame_generator_interface.cc +++ b/api/test/frame_generator_interface.cc @@ -26,7 +26,7 @@ const char* FrameGeneratorInterface::OutputTypeToString( 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 a452eee7c4..9ae9719916 100644 --- a/api/test/video/function_video_encoder_factory.h +++ b/api/test/video/function_video_encoder_factory.h @@ -39,7 +39,7 @@ class FunctionVideoEncoderFactory final : public VideoEncoderFactory { // Unused by tests. std::vector 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 2a9b6d9a71..e784853cd6 100644 --- a/api/transport/rtp/dependency_descriptor.cc +++ b/api/transport/rtp/dependency_descriptor.cc @@ -43,7 +43,7 @@ absl::InlinedVector StringToDecodeTargetIndications( 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 f774e989b6..87da0058d3 100644 --- a/api/transport/stun.cc +++ b/api/transport/stun.cc @@ -76,7 +76,7 @@ bool LengthValid(int type, int length) { // 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 aeea0501cb..b98e586562 100644 --- a/api/video/i010_buffer.cc +++ b/api/video/i010_buffer.cc @@ -117,7 +117,7 @@ rtc::scoped_refptr I010Buffer::Rotate( 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 271ac2225d..81c08389bb 100644 --- a/api/video/rtp_video_frame_assembler.cc +++ b/api/video/rtp_video_frame_assembler.cc @@ -51,7 +51,7 @@ std::unique_ptr CreateDepacketizer( case RtpVideoFrameAssembler::kGeneric: return std::make_unique(); } - 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 74e49064ec..82defb8399 100644 --- a/api/video/rtp_video_frame_assembler_unittests.cc +++ b/api/video/rtp_video_frame_assembler_unittests.cc @@ -93,7 +93,7 @@ class PacketBuilder { 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 7085010325..2b493dcc42 100644 --- a/api/video/video_frame_buffer.cc +++ b/api/video/video_frame_buffer.cc @@ -81,7 +81,7 @@ const char* VideoFrameBufferTypeToString(VideoFrameBuffer::Type type) { 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 3d0e56e5fc..73dedc8395 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 @@ TEST_F(VideoDecoderSoftwareFallbackWrapperTest, 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 decode_time_ms, absl::optional 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 9d583881f5..6b8211c335 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 @@ int32_t VideoDecoderSoftwareFallbackWrapper::Decode( 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 @@ int32_t VideoDecoderSoftwareFallbackWrapper::Release() { 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 0321da24da..206a1d3984 100644 --- a/api/video_codecs/video_encoder_config.cc +++ b/api/video_codecs/video_encoder_config.cc @@ -97,23 +97,24 @@ void VideoEncoderConfig::EncoderSpecificSettings::FillEncoderSpecificSettings( } 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 7253206bd1..05e1911bb7 100644 --- a/api/video_codecs/vp8_frame_config.cc +++ b/api/video_codecs/vp8_frame_config.cc @@ -56,7 +56,7 @@ bool Vp8FrameConfig::References(Buffer buffer) const { case Buffer::kCount: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -71,7 +71,7 @@ bool Vp8FrameConfig::Updates(Buffer buffer) const { case Buffer::kCount: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc index 9c6f672c3f..6c16f435fa 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -918,7 +918,7 @@ void ChannelReceive::SetDepacketizerToDecoderFrameTransformer( // 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 8f3f37a037..1b936c239b 100644 --- a/audio/utility/audio_frame_operations.cc +++ b/audio/utility/audio_frame_operations.cc @@ -131,8 +131,8 @@ void AudioFrameOperations::DownmixChannels(const int16_t* src_audio, 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 @@ void AudioFrameOperations::DownmixChannels(size_t dst_channels, 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 ca625022b8..c6560b316e 100644 --- a/call/adaptation/video_stream_adapter.cc +++ b/call/adaptation/video_stream_adapter.cc @@ -509,7 +509,7 @@ VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseFramerate( 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 @@ VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::IncreaseFramerate( 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 c84a63ee4e..5457a94696 100644 --- a/call/rtp_config.cc +++ b/call/rtp_config.cc @@ -29,7 +29,7 @@ uint32_t FindAssociatedSsrc(uint32_t ssrc, 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 53a4ccab35..5eff91fa5c 100644 --- a/call/rtp_payload_params.cc +++ b/call/rtp_payload_params.cc @@ -295,7 +295,7 @@ void RtpPayloadParams::SetGeneric(const CodecSpecificInfo* codec_specific_info, 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 4bcf05245f..2ecef6501f 100644 --- a/common_audio/fir_filter_factory.cc +++ b/common_audio/fir_filter_factory.cc @@ -28,7 +28,7 @@ FIRFilter* CreateFirFilter(const float* coefficients, 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 987ed526c0..1647246590 100644 --- a/common_audio/vad/vad.cc +++ b/common_audio/vad/vad.cc @@ -38,7 +38,7 @@ class VadImpl final : public Vad { 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 f5b03dccfd..652f4c7ce0 100644 --- a/common_video/h264/pps_parser_unittest.cc +++ b/common_video/h264/pps_parser_unittest.cc @@ -99,7 +99,7 @@ void WritePps(const PpsParser::PpsState& pps, break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } diff --git a/common_video/libyuv/webrtc_libyuv.cc b/common_video/libyuv/webrtc_libyuv.cc index cc6a71a61c..2e10a60776 100644 --- a/common_video/libyuv/webrtc_libyuv.cc +++ b/common_video/libyuv/webrtc_libyuv.cc @@ -45,7 +45,7 @@ size_t CalcBufferSize(VideoType type, int width, int height) { buffer_size = width * height * 4; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } return buffer_size; @@ -106,7 +106,7 @@ int ConvertVideoType(VideoType video_type) { 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 a450bd1e4b..9c88f0b0df 100644 --- a/common_video/video_frame_buffer_pool.cc +++ b/common_video/video_frame_buffer_pool.cc @@ -31,7 +31,7 @@ bool HasOneRef(const rtc::scoped_refptr& buffer) { ->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 53a60e3eda..9a70f07b34 100644 --- a/common_video/video_frame_unittest.cc +++ b/common_video/video_frame_unittest.cc @@ -37,7 +37,7 @@ class PlanarYuvBufferFactory { case VideoFrameBuffer::Type::kI010: return I010Buffer::Create(width, height); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -49,7 +49,7 @@ class PlanarYuvBufferFactory { case VideoFrameBuffer::Type::kI010: return I010Buffer::Copy(*src.GetI010()); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -62,7 +62,7 @@ class PlanarYuvBufferFactory { case VideoFrameBuffer::Type::kI010: return I010Buffer::Rotate(*src.GetI010(), rotation); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -89,7 +89,7 @@ class PlanarYuvBufferFactory { return buffer; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -123,7 +123,7 @@ class PlanarYuvBufferFactory { return buffer; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return nullptr; } @@ -367,7 +367,7 @@ TEST_P(TestPlanarYuvBuffer, Copy) { break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } rtc::scoped_refptr buf2 = diff --git a/examples/androidvoip/jni/android_voip_client.cc b/examples/androidvoip/jni/android_voip_client.cc index 9f859cba28..09234e46e1 100644 --- a/examples/androidvoip/jni/android_voip_client.cc +++ b/examples/androidvoip/jni/android_voip_client.cc @@ -112,7 +112,7 @@ int GetPayloadType(const std::string& codec_name) { return static_cast(PayloadType::kIlbc); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } diff --git a/examples/peerconnection/client/conductor.cc b/examples/peerconnection/client/conductor.cc index 5f213deeeb..d9adffb07b 100644 --- a/examples/peerconnection/client/conductor.cc +++ b/examples/peerconnection/client/conductor.cc @@ -549,7 +549,7 @@ void Conductor::UIThreadCallback(int msg_id, void* data) { } 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 fe29d6220a..e9b6a514b1 100644 --- a/examples/peerconnection/client/linux/main_wnd.cc +++ b/examples/peerconnection/client/linux/main_wnd.cc @@ -514,7 +514,7 @@ void GtkMainWnd::Draw(GtkWidget* widget, cairo_t* cr) { 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 e209171116..3ab4176083 100644 --- a/examples/peerconnection/client/main.cc +++ b/examples/peerconnection/client/main.cc @@ -101,7 +101,7 @@ int PASCAL wWinMain(HINSTANCE instance, 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 3d91362f4d..d0f7fb93db 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 @@ void MaybeSetSignedness(DeltaSignedness signedness) { 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 6422ea07e0..ff72163a81 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 @@ rtclog::DelayBasedBweUpdate::DetectorState ConvertDetectorState( 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 @@ rtclog::BweProbeResult::ResultType ConvertProbeResultType( 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 @@ rtclog::VideoReceiveConfig_RtcpMode ConvertRtcpMode(RtcpMode rtcp_mode) { 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 @@ ConvertIceCandidatePairConfigType(IceCandidatePairConfigType type) { 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 @@ rtclog::IceCandidatePairConfig::IceCandidateType ConvertIceCandidateType( 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 @@ rtclog::IceCandidatePairConfig::Protocol ConvertIceCandidatePairProtocol( 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 @@ ConvertIceCandidatePairAddressFamily( 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 @@ rtclog::IceCandidatePairConfig::NetworkType ConvertIceCandidateNetworkType( 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 @@ ConvertIceCandidatePairEventType(IceCandidatePairEventType type) { 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 @@ std::string RtcEventLogEncoderLegacy::Encode(const RtcEvent& event) { } int event_type = static_cast(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 236aea7754..ce9f813924 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 @@ rtclog2::DelayBasedBweUpdates::DetectorState ConvertToProtoFormat( 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 @@ rtclog2::FrameDecodedEvents::Codec ConvertToProtoFormat(VideoCodecType codec) { // 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 @@ rtclog2::BweProbeResultFailure::FailureReason ConvertToProtoFormat( 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 @@ rtclog2::DtlsTransportStateEvent::DtlsTransportState ConvertToProtoFormat( 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 @@ ConvertToProtoFormat(IceCandidatePairConfigType type) { 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 @@ rtclog2::IceCandidatePairConfig::IceCandidateType ConvertToProtoFormat( 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 @@ rtclog2::IceCandidatePairConfig::Protocol ConvertToProtoFormat( 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 @@ rtclog2::IceCandidatePairConfig::AddressFamily ConvertToProtoFormat( 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 @@ rtclog2::IceCandidatePairConfig::NetworkType ConvertToProtoFormat( 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 @@ rtclog2::IceCandidatePairEvent::IceCandidatePairEventType ConvertToProtoFormat( 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 23aa3082d6..68188ce856 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 @@ std::string EncodeSingleValue(uint64_t value, FieldType field_type) { 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 3740da9f2c..a9b0c08307 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 @@ uint64_t EventParser::ReadSingleValue(FieldType field_type) { 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 3ff0114c31..b1554694ad 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 @@ size_t ExpectedBaseValueSize(const FieldParameters& params, T value) { 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 38cf5f7941..4237b2a713 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 @@ std::unique_ptr CreateEncoder( default: RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type) << ")"; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return std::unique_ptr(nullptr); } } diff --git a/logging/rtc_event_log/rtc_event_log_parser.cc b/logging/rtc_event_log/rtc_event_log_parser.cc index f778498616..3b3eb18f72 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 @@ RtcpMode GetRuntimeRtcpMode(rtclog::VideoReceiveConfig::RtcpMode rtcp_mode) { case rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE: return RtcpMode::kReducedSize; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return RtcpMode::kOff; } @@ -188,7 +188,7 @@ BandwidthUsage GetRuntimeDetectorState( case rtclog::DelayBasedBweUpdate::BWE_OVERUSING: return BandwidthUsage::kBwOverusing; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return BandwidthUsage::kBwNormal; } @@ -204,7 +204,7 @@ IceCandidatePairConfigType GetRuntimeIceCandidatePairConfigType( case rtclog::IceCandidatePairConfig::SELECTED: return IceCandidatePairConfigType::kSelected; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairConfigType::kAdded; } @@ -222,7 +222,7 @@ IceCandidateType GetRuntimeIceCandidateType( case rtclog::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE: return IceCandidateType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateType::kUnknown; } @@ -240,7 +240,7 @@ IceCandidatePairProtocol GetRuntimeIceCandidatePairProtocol( case rtclog::IceCandidatePairConfig::UNKNOWN_PROTOCOL: return IceCandidatePairProtocol::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairProtocol::kUnknown; } @@ -254,7 +254,7 @@ IceCandidatePairAddressFamily GetRuntimeIceCandidatePairAddressFamily( case rtclog::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY: return IceCandidatePairAddressFamily::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairAddressFamily::kUnknown; } @@ -274,7 +274,7 @@ IceCandidateNetworkType GetRuntimeIceCandidateNetworkType( case rtclog::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE: return IceCandidateNetworkType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateNetworkType::kUnknown; } @@ -290,7 +290,7 @@ IceCandidatePairEventType GetRuntimeIceCandidatePairEventType( case rtclog::IceCandidatePairEvent::CHECK_RESPONSE_RECEIVED: return IceCandidatePairEventType::kCheckResponseReceived; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairEventType::kCheckSent; } @@ -311,7 +311,7 @@ VideoCodecType GetRuntimeCodecType(rtclog2::FrameDecodedEvents::Codec codec) { "VideoCodecType::kVideoCodecMultiplex"; return VideoCodecType::kVideoCodecMultiplex; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return VideoCodecType::kVideoCodecMultiplex; } @@ -768,7 +768,7 @@ BandwidthUsage GetRuntimeDetectorState( case rtclog2::DelayBasedBweUpdates::BWE_UNKNOWN_STATE: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return BandwidthUsage::kBwNormal; } @@ -784,7 +784,7 @@ ProbeFailureReason GetRuntimeProbeFailureReason( case rtclog2::BweProbeResultFailure::UNKNOWN: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ProbeFailureReason::kTimeout; } @@ -802,10 +802,10 @@ DtlsTransportState GetRuntimeDtlsTransportState( 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 @@ IceCandidatePairConfigType GetRuntimeIceCandidatePairConfigType( case rtclog2::IceCandidatePairConfig::UNKNOWN_CONFIG_TYPE: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairConfigType::kAdded; } @@ -841,7 +841,7 @@ IceCandidateType GetRuntimeIceCandidateType( case rtclog2::IceCandidatePairConfig::UNKNOWN_CANDIDATE_TYPE: return IceCandidateType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateType::kUnknown; } @@ -859,7 +859,7 @@ IceCandidatePairProtocol GetRuntimeIceCandidatePairProtocol( case rtclog2::IceCandidatePairConfig::UNKNOWN_PROTOCOL: return IceCandidatePairProtocol::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairProtocol::kUnknown; } @@ -873,7 +873,7 @@ IceCandidatePairAddressFamily GetRuntimeIceCandidatePairAddressFamily( case rtclog2::IceCandidatePairConfig::UNKNOWN_ADDRESS_FAMILY: return IceCandidatePairAddressFamily::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairAddressFamily::kUnknown; } @@ -893,7 +893,7 @@ IceCandidateNetworkType GetRuntimeIceCandidateNetworkType( case rtclog2::IceCandidatePairConfig::UNKNOWN_NETWORK_TYPE: return IceCandidateNetworkType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidateNetworkType::kUnknown; } @@ -911,7 +911,7 @@ IceCandidatePairEventType GetRuntimeIceCandidatePairEventType( case rtclog2::IceCandidatePairEvent::UNKNOWN_CHECK_TYPE: break; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return IceCandidatePairEventType::kCheckSent; } @@ -1892,7 +1892,7 @@ ParsedRtcEventLog::GetBweProbeFailure(const rtclog::Event& event) const { } 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 @@ ParsedRtcEventLog::ParseStatus ParsedRtcEventLog::StoreParsedNewFormatEvent( } 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 72e15fccaf..e0fe46a171 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 @@ void RtcEventLogSession::WriteLog(EventCounts count, } 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 0960c98502..e77a67182b 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 @@ EventGenerator::NewRtcpPacketIncoming() { return std::make_unique(buffer); } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); rtc::Buffer buffer; return std::make_unique(buffer); } @@ -531,7 +531,7 @@ EventGenerator::NewRtcpPacketOutgoing() { return std::make_unique(buffer); } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); rtc::Buffer buffer; return std::make_unique(buffer); } diff --git a/media/base/fake_frame_source.cc b/media/base/fake_frame_source.cc index 8a05536c83..61bc5857d9 100644 --- a/media/base/fake_frame_source.cc +++ b/media/base/fake_frame_source.cc @@ -52,7 +52,8 @@ webrtc::VideoFrame FakeFrameSource::GetFrameRotationApplied() { case webrtc::kVideoRotation_270: return GetFrame(height_, width_, webrtc::kVideoRotation_0, interval_us_); } - RTC_NOTREACHED() << "Invalid rotation value: " << static_cast(rotation_); + RTC_DCHECK_NOTREACHED() << "Invalid rotation value: " + << static_cast(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 97a3c4c7f1..c630cbc7e4 100644 --- a/media/base/rtp_utils.cc +++ b/media/base/rtp_utils.cc @@ -58,7 +58,7 @@ void UpdateAbsSendTimeExtensionValue(uint8_t* extension_data, // | ID | len=2 | absolute send time | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ if (length != kAbsSendTimeExtensionLen) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } @@ -84,7 +84,7 @@ void UpdateRtpAuthTag(uint8_t* rtp, // 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 @@ void UpdateRtpAuthTag(uint8_t* rtp, auth_required_length, output, sizeof(output)); if (result < tag_length) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return; } @@ -372,7 +372,7 @@ bool ApplyPacketOptions(uint8_t* data, 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 @@ bool ApplyPacketOptions(uint8_t* data, 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 62bcab9bfe..7b9174d961 100644 --- a/media/engine/fake_webrtc_call.cc +++ b/media/engine/fake_webrtc_call.cc @@ -413,7 +413,7 @@ webrtc::FlexfecReceiveStream::Stats FakeFlexfecReceiveStream::GetStats() const { } 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 c3093189c2..a9f30c2cd6 100644 --- a/media/engine/internal_decoder_factory.cc +++ b/media/engine/internal_decoder_factory.cc @@ -73,7 +73,7 @@ std::unique_ptr InternalDecoderFactory::CreateVideoDecoder( 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 6d65dd2ce8..3909685995 100644 --- a/media/engine/simulcast.cc +++ b/media/engine/simulcast.cc @@ -175,7 +175,7 @@ int FindSimulcastFormatIndex(int width, 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 beca9d4fd3..f28a1af9f9 100644 --- a/media/engine/simulcast_encoder_adapter_unittest.cc +++ b/media/engine/simulcast_encoder_adapter_unittest.cc @@ -992,7 +992,7 @@ class FakeNativeBufferI420 : public VideoFrameBuffer { 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 2338a53235..e73acc2338 100644 --- a/modules/audio_coding/acm2/acm_receiver_unittest.cc +++ b/modules/audio_coding/acm2/acm_receiver_unittest.cc @@ -119,7 +119,7 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback, rtp_header_, rtc::ArrayView(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 7c7393d72f..e307c6ca57 100644 --- a/modules/audio_coding/acm2/acm_resampler.cc +++ b/modules/audio_coding/acm2/acm_resampler.cc @@ -30,7 +30,7 @@ int ACMResampler::Resample10Msec(const int16_t* in_audio, 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 b742a824a9..e2081e20dc 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::Add10MsData(const AudioFrame& audio_frame) { 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 0aad594f97..9f3bdadc88 100644 --- a/modules/audio_coding/acm2/call_statistics.cc +++ b/modules/audio_coding/acm2/call_statistics.cc @@ -45,7 +45,7 @@ void CallStatistics::DecodedByNetEq(AudioFrame::SpeechType speech_type, } 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 6708bc0c18..87759c37ea 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 @@ std::unique_ptr ControllerManagerImpl::Create( 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 @@ std::unique_ptr ControllerManagerImpl::Create( 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 @@ std::unique_ptr ControllerManagerImpl::Create( } #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 669cf5ee53..2616706ee5 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 @@ DebugDumpWriterImpl::DebugDumpWriterImpl(FILE* file_handle) { 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 936e22429a..c5e5fa76e3 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 @@ class NullSmoothingFilter final : public SmoothingFilter { absl::optional 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 be8d0c6466..cafca75e46 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 @@ std::unique_ptr GetPcmTestFileReader(int sample_rate_hz) { 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(); 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 1d0c7fe1b2..f81aeeea80 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 @@ class SplitBySamplesTest : public ::testing::TestWithParam { 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 9b1dce8e74..003d966fbd 100644 --- a/modules/audio_coding/include/audio_coding_module.h +++ b/modules/audio_coding/include/audio_coding_module.h @@ -54,7 +54,7 @@ class AudioPacketizationCallback { 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 54ec556831..a979f94214 100644 --- a/modules/audio_coding/neteq/dsp_helper.cc +++ b/modules/audio_coding/neteq/dsp_helper.cc @@ -354,7 +354,7 @@ int DspHelper::DownsampleTo4kHz(const int16_t* input, 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 49cbf8fcbc..9061e27c67 100644 --- a/modules/audio_coding/neteq/dtmf_tone_generator.cc +++ b/modules/audio_coding/neteq/dtmf_tone_generator.cc @@ -119,7 +119,7 @@ int DtmfToneGenerator::Init(int fs, int event, int attenuation) { } 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 ca5ec220a3..22cf6a7754 100644 --- a/modules/audio_coding/neteq/merge.cc +++ b/modules/audio_coding/neteq/merge.cc @@ -372,7 +372,7 @@ size_t Merge::CorrelateAndPeakSearch(size_t start_position, 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 6107b17d33..7e3c4efab9 100644 --- a/modules/audio_coding/neteq/neteq_impl.cc +++ b/modules/audio_coding/neteq/neteq_impl.cc @@ -221,7 +221,7 @@ void SetAudioFrameActivityAndType(bool vad_enabled, break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (!vad_enabled) { // Always set kVadUnknown when receive VAD is inactive. @@ -894,7 +894,7 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame, } 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 @@ int NetEqImpl::GetDecision(Operation* operation, // 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 @@ int NetEqImpl::DoDtmf(const DtmfEvent& dtmf_event, bool* play_dtmf) { // // 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 @@ int NetEqImpl::ExtractPackets(size_t required_samples, 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 @@ int NetEqImpl::ExtractPackets(size_t required_samples, } else if (!has_cng_packet) { RTC_LOG(LS_WARNING) << "Unknown payload type " << static_cast(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 80e1691bfa..7d7cac7157 100644 --- a/modules/audio_coding/neteq/sync_buffer.cc +++ b/modules/audio_coding/neteq/sync_buffer.cc @@ -28,7 +28,7 @@ void SyncBuffer::PushBack(const AudioMultiVector& append_this) { 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 204f169a6d..ee392f26a3 100644 --- a/modules/audio_coding/neteq/tools/rtp_encode.cc +++ b/modules/audio_coding/neteq/tools/rtp_encode.cc @@ -191,7 +191,7 @@ AudioEncoderL16::Config Pcm16bConfig(CodecType codec_type) { config.sample_rate_hz = 48000; return config; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return config; } } @@ -242,7 +242,7 @@ std::unique_ptr CreateEncoder(CodecType codec_type, GetCodecConfig(), payload_type); } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -259,7 +259,7 @@ AudioEncoderCngConfig GetCngConfig(int sample_rate_hz) { 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 be78fd16d7..f655c5a78b 100644 --- a/modules/audio_device/audio_device_data_observer.cc +++ b/modules/audio_device/audio_device_data_observer.cc @@ -110,7 +110,7 @@ class ADMWrapper : public AudioDeviceModule, public AudioTransport { 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 a0ec149e69..51a8575b66 100644 --- a/modules/audio_device/audio_device_unittest.cc +++ b/modules/audio_device/audio_device_unittest.cc @@ -176,7 +176,7 @@ class FifoAudioStream : public AudioStream { (static_cast(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 f1b6b9329c..6365d9f567 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 @@ DWORD AudioDeviceWindowsCore::DoCaptureThreadPollDMO() { if (FAILED(hr)) { _TraceCOMError(hr); keepRecording = false; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } @@ -3021,7 +3021,7 @@ DWORD AudioDeviceWindowsCore::DoCaptureThreadPollDMO() { if (FAILED(hr)) { _TraceCOMError(hr); keepRecording = false; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } @@ -3046,7 +3046,7 @@ DWORD AudioDeviceWindowsCore::DoCaptureThreadPollDMO() { 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 afadee5635..fa7b198bb1 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 @@ class ScopedHandle { 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 8dfa183367..9cc8016f0b 100644 --- a/modules/audio_processing/aec3/aec3_fft.cc +++ b/modules/audio_processing/aec3/aec3_fft.cc @@ -101,10 +101,10 @@ void Aec3Fft::ZeroPaddedFft(rtc::ArrayView x, [](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 @@ void Aec3Fft::PaddedFft(rtc::ArrayView x, 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 @@ void Aec3Fft::PaddedFft(rtc::ArrayView x, fft.begin() + x_old.size(), std::multiplies()); 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 dfa932f49c..6316a2bf48 100644 --- a/modules/audio_processing/aec3/echo_canceller3.cc +++ b/modules/audio_processing/aec3/echo_canceller3.cc @@ -797,7 +797,7 @@ void EchoCanceller3::ProcessCapture(AudioBuffer* capture, 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 1ceb329d38..c3fc80773a 100644 --- a/modules/audio_processing/aec3/echo_remover_metrics.cc +++ b/modules/audio_processing/aec3/echo_remover_metrics.cc @@ -113,7 +113,7 @@ void EchoRemoverMetrics::Update( 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 1721e9c983..c6747cb0cd 100644 --- a/modules/audio_processing/aec3/matched_filter.cc +++ b/modules/audio_processing/aec3/matched_filter.cc @@ -442,7 +442,7 @@ void MatchedFilter::Update(const DownsampledRenderBuffer& render_buffer, 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 24f579bcf9..2daf376911 100644 --- a/modules/audio_processing/aec3/reverb_decay_estimator.cc +++ b/modules/audio_processing/aec3/reverb_decay_estimator.cc @@ -296,7 +296,7 @@ void ReverbDecayEstimator::LateReverbLinearRegressor::Accumulate(float z) { 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 4497d575a4..160583e7c3 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 @@ void AecDumpImpl::WriteRuntimeSetting( 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 4839a0927c..cd083d295b 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 @@ bool WriteToFileTask::Run() { // 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 a89ae111ea..e36d32c878 100644 --- a/modules/audio_processing/agc/agc.cc +++ b/modules/audio_processing/agc/agc.cc @@ -48,7 +48,7 @@ void Agc::Process(const int16_t* audio, size_t length, int sample_rate_hz) { 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 982bbca2ee..58b3a2769c 100644 --- a/modules/audio_processing/agc/clipping_predictor.cc +++ b/modules/audio_processing/agc/clipping_predictor.cc @@ -377,7 +377,7 @@ std::unique_ptr CreateClippingPredictor( 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 ac7fbecb8e..b522ec372c 100644 --- a/modules/audio_processing/agc2/interpolated_gain_curve.cc +++ b/modules/audio_processing/agc2/interpolated_gain_curve.cc @@ -115,7 +115,7 @@ void InterpolatedGainCurve::RegionLogger::LogRegionStats( 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 169ffe411d..8a3ddf5ba6 100644 --- a/modules/audio_processing/audio_processing_impl.cc +++ b/modules/audio_processing/audio_processing_impl.cc @@ -61,7 +61,7 @@ static bool LayoutHasKeyboard(AudioProcessing::ChannelLayout layout) { return true; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return false; } @@ -97,7 +97,7 @@ int SuitableProcessRate(int minimum_rate, return rate; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return uppermost_native_rate; } @@ -702,12 +702,12 @@ bool AudioProcessingImpl::PostRuntimeSetting(RuntimeSetting setting) { 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 @@ void AudioProcessingImpl::HandleCaptureRuntimeSettings() { 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 @@ void AudioProcessingImpl::HandleRenderRuntimeSettings() { 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 @@ bool AudioProcessingImpl::GetLinearAecOutput( 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 9a5e374203..67ddcd700c 100644 --- a/modules/audio_processing/audio_processing_performance_unittest.cc +++ b/modules/audio_processing/audio_processing_performance_unittest.cc @@ -367,7 +367,7 @@ class TimedThreadApiProcessor { // 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 cfb19f95aa..2a91b6a067 100644 --- a/modules/audio_processing/audio_processing_unittest.cc +++ b/modules/audio_processing/audio_processing_unittest.cc @@ -105,7 +105,7 @@ size_t TotalChannelsFromLayout(AudioProcessing::ChannelLayout layout) { case AudioProcessing::kStereoAndKeyboard: return 3; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -272,7 +272,7 @@ std::string OutputFilePath(const std::string& name, } 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 @@ std::string OutputFilePath(const std::string& name, } 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 2c88c4e46c..e14279ec10 100644 --- a/modules/audio_processing/common.h +++ b/modules/audio_processing/common.h @@ -29,7 +29,7 @@ static inline size_t ChannelsFromLayout(AudioProcessing::ChannelLayout layout) { 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 8116608390..667d6bfecb 100644 --- a/modules/audio_processing/echo_control_mobile_impl.cc +++ b/modules/audio_processing/echo_control_mobile_impl.cc @@ -36,7 +36,7 @@ int16_t MapSetting(EchoControlMobileImpl::RoutingMode mode) { 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 b5454c05ed..3fac1f7f56 100644 --- a/modules/audio_processing/gain_control_impl.cc +++ b/modules/audio_processing/gain_control_impl.cc @@ -35,7 +35,7 @@ int16_t MapSetting(GainControl::Mode mode) { 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 bff7209e96..3b4740f6a5 100644 --- a/modules/audio_processing/high_pass_filter.cc +++ b/modules/audio_processing/high_pass_filter.cc @@ -44,9 +44,9 @@ const CascadedBiQuadFilter::BiQuadCoefficients& ChooseCoefficients( 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 9a6bd5a587..7bf18346f9 100644 --- a/modules/audio_processing/ns/suppression_params.cc +++ b/modules/audio_processing/ns/suppression_params.cc @@ -42,7 +42,7 @@ SuppressionParams::SuppressionParams( 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 f245c2cf19..0464345364 100644 --- a/modules/audio_processing/test/bitexactness_tools.cc +++ b/modules/audio_processing/test/bitexactness_tools.cc @@ -33,7 +33,7 @@ std::string GetApmRenderTestVectorFileName(int sample_rate_hz) { case 48000: return ResourcePath("far48_stereo", "pcm"); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return ""; } @@ -49,7 +49,7 @@ std::string GetApmCaptureTestVectorFileName(int sample_rate_hz) { 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 5202014b52..3a35ee9d74 100644 --- a/modules/audio_processing/test/fake_recording_device.cc +++ b/modules/audio_processing/test/fake_recording_device.cc @@ -148,7 +148,7 @@ FakeRecordingDevice::FakeRecordingDevice(int initial_mic_level, worker_ = std::make_unique(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 8e43d78ea7..f8161f6428 100644 --- a/modules/audio_processing/transient/transient_suppressor_impl.cc +++ b/modules/audio_processing/transient/transient_suppressor_impl.cc @@ -102,7 +102,7 @@ int TransientSuppressorImpl::Initialize(int sample_rate_hz, 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 e6c92ae934..1a633e2286 100644 --- a/modules/audio_processing/voice_detection.cc +++ b/modules/audio_processing/voice_detection.cc @@ -54,7 +54,7 @@ VoiceDetection::VoiceDetection(int sample_rate_hz, Likelihood likelihood) 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 c7f53c62f2..33974dc900 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 @@ double GetIncreaseFactor(const LossBasedControlConfig& config, TimeDelta rtt) { } 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 BitrateFromLoss(double loss, 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 @@ double ExponentialUpdate(TimeDelta window, TimeDelta interval) { // 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 @@ void LossBasedBandwidthEstimation::UpdateLossStatistics( const std::vector& 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 bbd35530a1..64d9219e24 100644 --- a/modules/desktop_capture/cropping_window_capturer_win.cc +++ b/modules/desktop_capture/cropping_window_capturer_win.cc @@ -118,7 +118,7 @@ struct TopWindowVerifierContext : public SelectedWindowContext { // 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 daef385f27..f2745cf70b 100644 --- a/modules/desktop_capture/desktop_frame_rotation.cc +++ b/modules/desktop_capture/desktop_frame_rotation.cc @@ -28,7 +28,7 @@ libyuv::RotationMode ToLibyuvRotationMode(Rotation rotation) { case Rotation::CLOCK_WISE_270: return libyuv::kRotate270; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return libyuv::kRotate0; } @@ -54,7 +54,7 @@ Rotation ReverseRotation(Rotation rotation) { case Rotation::CLOCK_WISE_270: return Rotation::CLOCK_WISE_90; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return Rotation::CLOCK_WISE_0; } @@ -67,7 +67,7 @@ DesktopSize RotateSize(DesktopSize size, Rotation rotation) { case Rotation::CLOCK_WISE_270: return DesktopSize(size.height(), size.width()); } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return DesktopSize(); } @@ -86,7 +86,7 @@ DesktopRect RotateRect(DesktopRect rect, DesktopSize size, Rotation rotation) { 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 54ff575a67..3be24f22c4 100644 --- a/modules/desktop_capture/linux/base_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/base_capturer_pipewire.cc @@ -170,7 +170,7 @@ class Scoped { 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 afd29ced01..823126548c 100644 --- a/modules/desktop_capture/screen_drawer_linux.cc +++ b/modules/desktop_capture/screen_drawer_linux.cc @@ -63,7 +63,7 @@ ScreenDrawerLinux::ScreenDrawerLinux() { 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 @@ ScreenDrawerLinux::ScreenDrawerLinux() { 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 095189b05f..bfee619fdb 100644 --- a/modules/desktop_capture/screen_drawer_lock_posix.cc +++ b/modules/desktop_capture/screen_drawer_lock_posix.cc @@ -32,7 +32,7 @@ ScreenDrawerLockPosix::ScreenDrawerLockPosix(const char* name) { 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 177e12632c..caad6f43d1 100644 --- a/modules/desktop_capture/win/dxgi_output_duplicator.cc +++ b/modules/desktop_capture/win/dxgi_output_duplicator.cc @@ -55,7 +55,7 @@ Rotation DxgiRotationToRotation(DXGI_MODE_ROTATION rotation) { 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 0a754e1f41..408f208316 100644 --- a/modules/remote_bitrate_estimator/aimd_rate_control.cc +++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc @@ -361,7 +361,7 @@ void AimdRateControl::ChangeBitrate(const RateControlInput& input, break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } current_bitrate_ = ClampBitrate(new_bitrate.value_or(current_bitrate_)); @@ -416,7 +416,7 @@ void AimdRateControl::ChangeState(const RateControlInput& input, 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 bc0b4ee95c..497946d6a7 100644 --- a/modules/rtp_rtcp/include/rtp_cvo.h +++ b/modules/rtp_rtcp/include/rtp_cvo.h @@ -30,7 +30,7 @@ inline uint8_t ConvertVideoRotationToCVOByte(VideoRotation rotation) { case kVideoRotation_270: return 3; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -47,7 +47,7 @@ inline VideoRotation ConvertCVOByteToVideoRotation(uint8_t cvo_byte) { 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 59541c45d0..2fbb3caae8 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 @@ size_t FlexfecHeaderWriter::MinPacketMaskSize(const uint8_t* packet_mask, // 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 @@ void FlexfecHeaderWriter::FinalizeFecHeader( 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 400b640d99..ac68162d26 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 @@ void RemainingPacketProtection(int num_media_packets, } } } 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 a0c27dee67..037542ddbd 100644 --- a/modules/rtp_rtcp/source/packet_sequencer.cc +++ b/modules/rtp_rtcp/source/packet_sequencer.cc @@ -66,7 +66,7 @@ void PacketSequencer::Sequence(RtpPacketToSend& packet) { } 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 71d0ab5510..50102c21a3 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 @@ bool TransportFeedback::Parse(const CommonHeader& packet) { 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 597bb3c795..a07e5aa641 100644 --- a/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/modules/rtp_rtcp/source/rtcp_sender.cc @@ -742,8 +742,8 @@ absl::optional RTCPSender::ComputeCompoundRTCPPacket( } 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 3c9659343e..4b8c7b5385 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 @@ bool RtpHeaderExtensionMap::RegisterByType(int id, RTPExtensionType type) { 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 029a5fbc49..feda738d06 100644 --- a/modules/rtp_rtcp/source/rtp_sender.cc +++ b/modules/rtp_rtcp/source/rtp_sender.cc @@ -125,7 +125,7 @@ bool IsNonVolatile(RTPExtensionType type) { 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 c9fc782308..da5dad5839 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -107,7 +107,7 @@ const char* FrameTypeToString(VideoFrameType frame_type) { 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 8941f1ca94..25ceee585a 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 @@ class FecPacketMaskMetricsTest : public ::testing::Test { } 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 e07cd6893b..9a0cf47c3a 100644 --- a/modules/video_capture/windows/sink_filter_ds.cc +++ b/modules/video_capture/windows/sink_filter_ds.cc @@ -58,7 +58,7 @@ class EnumPins : public IEnumPins { } STDMETHOD(Clone)(IEnumPins** pins) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -83,7 +83,7 @@ class EnumPins : public IEnumPins { } STDMETHOD(Skip)(ULONG count) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -274,7 +274,7 @@ class MediaTypesEnum : public IEnumMediaTypes { // IEnumMediaTypes STDMETHOD(Clone)(IEnumMediaTypes** pins) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return E_NOTIMPL; } @@ -359,12 +359,12 @@ class MediaTypesEnum : public IEnumMediaTypes { 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 @@ STDMETHODIMP CaptureInputPin::Connect(IPin* receive_pin, return VFW_E_NOT_STOPPED; if (receive_pin_) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return VFW_E_ALREADY_CONNECTED; } @@ -564,7 +564,7 @@ STDMETHODIMP CaptureInputPin::ReceiveConnection( 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 ca6ce3c4b3..8324b7c74e 100644 --- a/modules/video_coding/codecs/h264/h264.cc +++ b/modules/video_coding/codecs/h264/h264.cc @@ -102,7 +102,7 @@ std::unique_ptr H264Encoder::Create( RTC_LOG(LS_INFO) << "Creating H264EncoderImpl."; return std::make_unique(codec); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif } @@ -127,7 +127,7 @@ std::unique_ptr H264Decoder::Create() { RTC_LOG(LS_INFO) << "Creating H264DecoderImpl."; return std::make_unique(); #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 425692621d..b8c6916311 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 @@ VideoFrameType ConvertToVideoFrameType(EVideoFrameType type) { 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 @@ SEncParamExt H264EncoderImpl::CreateEncoderParams(size_t i) const { } 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 073d8f9a81..b61dc8c507 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 @@ inline std::string ToString(H264PacketizationMode mode) { } 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 b24922f921..4f33bef2ba 100644 --- a/modules/video_coding/codecs/interface/libvpx_interface.cc +++ b/modules/video_coding/codecs/interface/libvpx_interface.cc @@ -133,7 +133,7 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { // Might be intended for uint32_t but int literal used, try fallback. return codec_control(ctx, ctrl_id, static_cast(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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 @@ class LibvpxFacade : public LibvpxInterface { 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 e1bf598622..0ad3d3883a 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 @@ class MultiplexDecoderAdapter::AdapterDecodedImageCallback 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 13bcbf05da..7d05882b63 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 @@ class VideoCodecUnitTest : public ::testing::Test { : 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 e7a7f7dde4..41f2304748 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 @@ class VideoEncoderDecoderInstantiationTest 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 0020c80a91..03da293d60 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 @@ void VideoCodecTestFixtureImpl::H264KeyframeChecker::CheckEncodedFrame( 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 0eb0d5a284..062375bd60 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 @@ class QpFrameChecker : public VideoCodecTestFixture::EncodedFrameChecker { } 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 4de8d91526..94860da1b6 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 @@ std::vector GetTemporalIds(size_t num_layers) { // 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 @@ DefaultTemporalLayers::GetDependencyInfo(size_t num_layers) { {"----", {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 @@ FrameDependencyStructure DefaultTemporalLayers::GetTemplateStructure( return template_structure; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); // To make the compiler happy! return template_structure; } @@ -725,7 +725,7 @@ std::vector> GetTemporalDependencies( {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 0d6fdfae10..44a379f0e1 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 @@ void SetRawImagePlanes(vpx_image_t* raw_image, VideoFrameBuffer* buffer) { break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -1357,7 +1357,7 @@ LibvpxVp8Encoder::PrepareBuffers(rtc::scoped_refptr buffer) { 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 @@ LibvpxVp8Encoder::PrepareBuffers(rtc::scoped_refptr buffer) { << " 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 27d070fc45..71db0b22c2 100644 --- a/modules/video_coding/codecs/vp8/screenshare_layers.cc +++ b/modules/video_coding/codecs/vp8/screenshare_layers.cc @@ -212,7 +212,7 @@ Vp8FrameConfig ScreenshareLayers::NextFrameConfig(size_t stream_index, ++stats_.num_dropped_frames_; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } DependencyInfo dependency_info; @@ -446,7 +446,7 @@ FrameDependencyStructure ScreenshareLayers::GetTemplateStructure( 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 dd2dad6f86..e5b3bd4fdf 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 @@ TEST_F(ScreenshareLayerTest, UpdatesHistograms) { } 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 840d63ec0f..bbd83f30a9 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 @@ struct GofInfoVP9 { 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 40b4d8233c..5d0f380af9 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 @@ ColorSpace ExtractVP9ColorSpace(vpx_color_space_t space_t, 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 c32673d3b4..443efc2b71 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 @@ int LibvpxVp9Encoder::InitEncode(const VideoCodec* inst, 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 @@ int LibvpxVp9Encoder::InitAndSetControlSettings(const VideoCodec* inst) { 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 @@ int LibvpxVp9Encoder::Encode(const VideoFrame& input_image, break; } case VP9Profile::kProfile1: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } case VP9Profile::kProfile2: { @@ -2001,7 +2001,7 @@ rtc::scoped_refptr LibvpxVp9Encoder::PrepareBufferForProfile0( 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 9570e53f33..7b787f3e4f 100644 --- a/modules/video_coding/codecs/vp9/vp9.cc +++ b/modules/video_coding/codecs/vp9/vp9.cc @@ -77,7 +77,7 @@ std::unique_ptr VP9Encoder::Create() { LibvpxInterface::Create(), FieldTrialBasedConfig()); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif } @@ -88,7 +88,7 @@ std::unique_ptr VP9Encoder::Create( return std::make_unique(codec, LibvpxInterface::Create(), FieldTrialBasedConfig()); #else - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; #endif } @@ -106,7 +106,7 @@ std::unique_ptr VP9Decoder::Create() { #ifdef RTC_ENABLE_VP9 return std::make_unique(); #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 f399c5945f..181550ce91 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 @@ Vp9FrameBufferPool::GetFrameBuffer(size_t min_size) { // 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 937534aab0..787da1e5a9 100644 --- a/modules/video_coding/frame_buffer.cc +++ b/modules/video_coding/frame_buffer.cc @@ -241,7 +241,7 @@ void VCMFrameBuffer::SetState(VCMFrameBufferStateEnum state) { 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 7b821a13b7..6096665bda 100644 --- a/modules/video_coding/h264_packet_buffer.cc +++ b/modules/video_coding/h264_packet_buffer.cc @@ -118,7 +118,7 @@ rtc::CopyOnWriteBuffer FixVideoPayload(rtc::ArrayView payload, } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return result; } diff --git a/modules/video_coding/jitter_buffer.cc b/modules/video_coding/jitter_buffer.cc index c3b096188c..4c6015e027 100644 --- a/modules/video_coding/jitter_buffer.cc +++ b/modules/video_coding/jitter_buffer.cc @@ -497,7 +497,7 @@ VCMFrameBufferEnum VCMJitterBuffer::InsertPacket(const VCMPacket& packet, 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 89cf51fe46..87848aec06 100644 --- a/modules/video_coding/jitter_estimator.cc +++ b/modules/video_coding/jitter_estimator.cc @@ -246,7 +246,7 @@ void VCMJitterEstimator::KalmanEstimateChannel(int64_t frameDelayMS, 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 @@ void VCMJitterEstimator::EstimateRandomJitter(double d_dT, _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 c9659e37ea..0e5d4159d3 100644 --- a/modules/video_coding/nack_requester_unittest.cc +++ b/modules/video_coding/nack_requester_unittest.cc @@ -56,7 +56,7 @@ class TestNackRequester : public ::testing::TestWithParam, 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 7177427c16..892059297c 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 @@ ScalabilityStructureFullSvc::NextPattern() const { } return kDeltaT0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kNone; } @@ -227,7 +227,7 @@ ScalabilityStructureFullSvc::NextFrameConfig(bool restart) { } 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 6cd96a6b7f..0ef7e8f156 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 @@ ScalabilityStructureKeySvc::NextPattern(FramePattern last_pattern) const { } return kDeltaT0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kNone; } @@ -227,7 +227,7 @@ ScalabilityStructureKeySvc::NextFrameConfig(bool restart) { 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 0db91cc969..e5fa4c4368 100644 --- a/modules/video_coding/svc/scalability_structure_simulcast.cc +++ b/modules/video_coding/svc/scalability_structure_simulcast.cc @@ -106,7 +106,7 @@ ScalabilityStructureSimulcast::NextPattern() const { } return kDeltaT0; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return kDeltaT0; } @@ -184,7 +184,7 @@ ScalabilityStructureSimulcast::NextFrameConfig(bool restart) { } 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 435f472475..0789f6ab00 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 @@ class SimulcastTestFixtureImpl::TestDecodedImageCallback 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 3e419c5978..cc66235122 100644 --- a/net/dcsctp/packet/sctp_packet.cc +++ b/net/dcsctp/packet/sctp_packet.cc @@ -82,8 +82,8 @@ size_t SctpPacket::Builder::bytes_remaining() const { // 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 ac22e1d941..81fb324d1f 100644 --- a/p2p/base/basic_ice_controller.cc +++ b/p2p/base/basic_ice_controller.cc @@ -846,7 +846,7 @@ bool BasicIceController::GetUseCandidateAttr(const Connection* conn, 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 f7bd47d245..e0e5c150b2 100644 --- a/p2p/base/connection.cc +++ b/p2p/base/connection.cc @@ -216,7 +216,7 @@ void ConnectionRequest::Prepare(StunMessage* request) { request->AddAttribute(std::make_unique( STUN_ATTR_ICE_CONTROLLED, connection_->port()->IceTiebreaker())); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } // Adding PRIORITY Attribute. @@ -528,7 +528,7 @@ void Connection::OnReadPacket(const char* data, } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } diff --git a/p2p/base/dtls_transport.cc b/p2p/base/dtls_transport.cc index 172d06188f..bf8583f670 100644 --- a/p2p/base/dtls_transport.cc +++ b/p2p/base/dtls_transport.cc @@ -433,7 +433,7 @@ int DtlsTransport::SendPacket(const char* data, "webrtc::DtlsTransportState::kClosed."; return -1; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return -1; } } @@ -532,7 +532,7 @@ void DtlsTransport::OnWritableState(rtc::PacketTransportInternal* transport) { "webrtc::DtlsTransportState::kClosed."; break; case webrtc::DtlsTransportState::kNumValues: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } @@ -720,7 +720,7 @@ void DtlsTransport::MaybeStartDtls() { // 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 5c6b32c17e..655490beab 100644 --- a/p2p/base/p2p_transport_channel.cc +++ b/p2p/base/p2p_transport_channel.cc @@ -1128,7 +1128,7 @@ void P2PTransportChannel::OnUnknownAddress(PortInterface* port, << 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 @@ void P2PTransportChannel::OnCandidateResolved( }); 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 @@ void P2PTransportChannel::UpdateState() { 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 dfc3cece1e..6d04468790 100644 --- a/p2p/base/p2p_transport_channel_unittest.cc +++ b/p2p/base/p2p_transport_channel_unittest.cc @@ -1178,7 +1178,7 @@ class P2PTransportChannelTest : public P2PTransportChannelTestBase { } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } diff --git a/p2p/base/port.cc b/p2p/base/port.cc index 4b2685de57..51297c46c6 100644 --- a/p2p/base/port.cc +++ b/p2p/base/port.cc @@ -697,7 +697,7 @@ bool Port::MaybeIceRoleConflict(const rtc::SocketAddress& addr, } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return ret; } @@ -715,7 +715,7 @@ bool Port::HandleIncomingPacket(rtc::AsyncPacketSocket* socket, 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 13e7a2214f..f16822725c 100644 --- a/p2p/base/pseudo_tcp.cc +++ b/p2p/base/pseudo_tcp.cc @@ -288,7 +288,7 @@ void PseudoTcp::NotifyClock(uint32_t now) { // 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 @@ void PseudoTcp::GetOption(Option opt, int* value) { } 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 @@ void PseudoTcp::SetOption(Option opt, int value) { 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 f2b12f734f..1ebd15eaef 100644 --- a/p2p/base/stun_port.cc +++ b/p2p/base/stun_port.cc @@ -248,7 +248,7 @@ Connection* UDPPort::CreateConnection(const Candidate& address, // 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 6cad13525f..bbdc5663b0 100644 --- a/p2p/base/test_turn_server.h +++ b/p2p/base/test_turn_server.h @@ -125,7 +125,7 @@ class TestTurnServer : public TurnAuthInterface { 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 6beae34333..e46114ed83 100644 --- a/p2p/base/transport_description_factory.cc +++ b/p2p/base/transport_description_factory.cc @@ -109,7 +109,7 @@ std::unique_ptr TransportDescriptionFactory::CreateAnswer( } 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 15f59bd522..9967d9a449 100644 --- a/p2p/client/basic_port_allocator.cc +++ b/p2p/client/basic_port_allocator.cc @@ -56,7 +56,7 @@ int GetProtocolPriority(cricket::ProtocolType protocol) { case cricket::PROTO_TLS: return 0; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } } @@ -68,7 +68,7 @@ int GetAddressFamilyPriority(int ip_family) { case AF_INET: return 1; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } } @@ -1173,7 +1173,7 @@ void BasicPortAllocatorSession::OnPortDestroyed(PortInterface* port) { return; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } BasicPortAllocatorSession::PortData* BasicPortAllocatorSession::FindPort( @@ -1397,7 +1397,7 @@ void AllocationSequence::Process(int epoch) { break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (state() == kRunning) { @@ -1653,7 +1653,7 @@ void AllocationSequence::OnPortDestroyed(PortInterface* port) { 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 9e717208f8..9e113c819f 100644 --- a/pc/channel.cc +++ b/pc/channel.cc @@ -422,7 +422,7 @@ bool BaseChannel::SendPacket(bool rtcp, // (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 1b9d1a05dd..9a4135bb2f 100644 --- a/pc/dtls_srtp_transport.cc +++ b/pc/dtls_srtp_transport.cc @@ -235,7 +235,7 @@ bool DtlsSrtpTransport::ExtractParams( 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 69ef2fb8df..46811c881b 100644 --- a/pc/dtmf_sender.cc +++ b/pc/dtmf_sender.cc @@ -194,7 +194,7 @@ void DtmfSender::DoInsertDtmf() { 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 b7395c847e..b70322eeb9 100644 --- a/pc/ice_server_parsing.cc +++ b/pc/ice_server_parsing.cc @@ -275,7 +275,7 @@ static RTCErrorType ParseIceServerUrl( 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 a94af42178..5c7f01ae62 100644 --- a/pc/jsep_transport.cc +++ b/pc/jsep_transport.cc @@ -460,7 +460,7 @@ bool JsepTransport::SetRtcpMux(bool enable, } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (!ret) { @@ -670,7 +670,7 @@ webrtc::RTCError JsepTransport::NegotiateDtlsRole( } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } else { diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc index b1fccbe6be..b7e9f361bc 100644 --- a/pc/jsep_transport_controller.cc +++ b/pc/jsep_transport_controller.cc @@ -1167,7 +1167,7 @@ void JsepTransportController::OnTransportCandidateGathered_n( 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 @@ void JsepTransportController::UpdateAggregateStates_n() { // "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 @@ void JsepTransportController::UpdateAggregateStates_n() { 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 4c2ee2a2ae..52d8182179 100644 --- a/pc/jsep_transport_controller_unittest.cc +++ b/pc/jsep_transport_controller_unittest.cc @@ -82,7 +82,9 @@ class JsepTransportControllerTest : public JsepTransportController::Observer, 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 41c9baba6f..d06fa9596a 100644 --- a/pc/jsep_transport_unittest.cc +++ b/pc/jsep_transport_unittest.cc @@ -124,7 +124,7 @@ class JsepTransport2Test : public ::testing::Test, public sigslot::has_slots<> { rtp_dtls_transport.get(), rtcp_dtls_transport.get()); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } auto jsep_transport = std::make_unique( diff --git a/pc/media_session.cc b/pc/media_session.cc index 426eadc60f..054d570817 100644 --- a/pc/media_session.cc +++ b/pc/media_session.cc @@ -1691,7 +1691,7 @@ std::unique_ptr MediaSessionDescriptionFactory::CreateOffer( } break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ++msection_index; } @@ -1867,7 +1867,7 @@ MediaSessionDescriptionFactory::CreateAnswer( } 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 MediaSessionDescriptionFactory::AddDataContentForAnswer( 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 a02b4c1415..cfe9ac8a31 100644 --- a/pc/media_session_unittest.cc +++ b/pc/media_session_unittest.cc @@ -363,7 +363,7 @@ static void AttachSenderToMediaDescriptionOptions( num_sim_layer); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -4623,7 +4623,7 @@ void TestAudioCodecsAnswer(RtpTransceiverDirection offer_direction, break; case RtpTransceiverDirection::kStopped: // This does not happen in any current test. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } auto format_codecs = [](const std::vector& codecs) { diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index c02518ce84..95a251ecf5 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -102,7 +102,7 @@ uint32_t ConvertIceTransportTypeToCandidateFilter( case PeerConnectionInterface::kAll: return cricket::CF_ALL; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return cricket::CF_NONE; } @@ -220,7 +220,7 @@ cricket::IceConfig ParseIceConfig( gathering_policy = cricket::GATHER_CONTINUALLY; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); gathering_policy = cricket::GATHER_ONCE; } @@ -2298,7 +2298,7 @@ void PeerConnection::OnTransportControllerConnectionState( NoteUsageEvent(UsageEvent::ICE_STATE_CONNECTED); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -2650,7 +2650,7 @@ void PeerConnection::OnTransportControllerGatheringState( OnIceGatheringChange(PeerConnectionInterface::kIceGatheringNew); } else { RTC_LOG(LS_ERROR) << "Unknown state received: " << state; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -2774,7 +2774,7 @@ void PeerConnection::ReportNegotiatedCiphers( rtc::kSrtpCryptoSuiteMaxValue); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); continue; } } @@ -2799,7 +2799,7 @@ void PeerConnection::ReportNegotiatedCiphers( 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 be05af920c..e5eb6c4e18 100644 --- a/pc/peer_connection_bundle_unittest.cc +++ b/pc/peer_connection_bundle_unittest.cc @@ -80,7 +80,7 @@ class PeerConnectionWrapperForBundleTest : public PeerConnectionWrapper { 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 a27d174c98..112d8dfe6a 100644 --- a/pc/peer_connection_ice_unittest.cc +++ b/pc/peer_connection_ice_unittest.cc @@ -228,7 +228,7 @@ class PeerConnectionIceBaseTest : public ::testing::Test { 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 4b7913d678..54f75f00a9 100644 --- a/pc/peer_connection_message_handler.cc +++ b/pc/peer_connection_message_handler.cc @@ -129,7 +129,7 @@ void PeerConnectionMessageHandler::OnMessage(rtc::Message* msg) { 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 dbb0cab71f..8df90b7bfa 100644 --- a/pc/peer_connection_signaling_unittest.cc +++ b/pc/peer_connection_signaling_unittest.cc @@ -82,7 +82,7 @@ class ExecuteFunctionOnCreateSessionDescriptionObserver 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 @@ class PeerConnectionSignalingStateTest 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 7f815f2d93..025feb9298 100644 --- a/pc/rtc_stats_collector.cc +++ b/pc/rtc_stats_collector.cc @@ -170,7 +170,7 @@ const char* CandidateTypeToRTCIceCandidateType(const std::string& type) { return RTCIceCandidateType::kPrflx; if (type == cricket::RELAY_PORT_TYPE) return RTCIceCandidateType::kRelay; - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -186,7 +186,7 @@ const char* DataStateToRTCDataChannelState( case DataChannelInterface::kClosed: return RTCDataChannelState::kClosed; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -203,7 +203,7 @@ const char* IceCandidatePairStateToRTCStatsIceCandidatePairState( case cricket::IceCandidatePairState::FAILED: return RTCStatsIceCandidatePairState::kFailed; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -246,7 +246,7 @@ const char* NetworkAdapterTypeToStatsType(rtc::AdapterType type) { case rtc::ADAPTER_TYPE_ANY: return RTCNetworkType::kUnknown; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -1008,7 +1008,7 @@ void ProduceSenderMediaTrackStats( 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 @@ void ProduceReceiverMediaTrackStats( receiver->AttachmentId()); report->AddStats(std::move(video_track_stats)); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } } @@ -1799,7 +1799,7 @@ void RTCStatsCollector::ProduceRTPStreamStats_n( } 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 @@ void RTCStatsCollector::PrepareTransceiverStatsInfosAndCallStats_s_w_n() { video_stats[video_channel->media_channel()] = std::make_unique(); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } }); diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc index 53387e8d95..4ee5dc8931 100644 --- a/pc/rtc_stats_collector_unittest.cc +++ b/pc/rtc_stats_collector_unittest.cc @@ -2837,7 +2837,7 @@ class RTCStatsCollectorTestWithParamKind return "Video"; case cricket::MEDIA_TYPE_DATA: case cricket::MEDIA_TYPE_UNSUPPORTED: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } } @@ -2896,7 +2896,7 @@ class RTCStatsCollectorTestWithParamKind } 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 49e79fec52..6d886f5099 100644 --- a/pc/rtc_stats_traversal.cc +++ b/pc/rtc_stats_traversal.cc @@ -140,7 +140,7 @@ std::vector GetStatsReferencedIds(const RTCStats& stats) { 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 c5d642b685..52c5bb0eac 100644 --- a/pc/rtp_media_utils.cc +++ b/pc/rtp_media_utils.cc @@ -49,7 +49,7 @@ RtpTransceiverDirection RtpTransceiverDirectionReversed( case RtpTransceiverDirection::kRecvOnly: return RtpTransceiverDirection::kSendOnly; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return direction; } } @@ -81,7 +81,7 @@ const char* RtpTransceiverDirectionToString(RtpTransceiverDirection direction) { 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 9040a69699..e91715496c 100644 --- a/pc/rtp_transmission_manager.cc +++ b/pc/rtp_transmission_manager.cc @@ -345,7 +345,7 @@ RtpTransmissionManager::GetAudioTransceiver() const { return transceiver; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -360,7 +360,7 @@ RtpTransmissionManager::GetVideoTransceiver() const { return transceiver; } } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -527,7 +527,7 @@ void RtpTransmissionManager::OnRemoteSenderAdded( } 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 @@ void RtpTransmissionManager::OnRemoteSenderRemoved( 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 35d8461677..8f5cec2f03 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -578,7 +578,7 @@ absl::string_view GetDefaultMidForPlanB(cricket::MediaType media_type) { case cricket::MEDIA_TYPE_UNSUPPORTED: return "not supported"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } @@ -695,7 +695,7 @@ std::string GenerateRtcpCname() { 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 @@ const char* SdpOfferAnswerHandler::SessionErrorToString( case SessionError::kTransport: return "ERROR_TRANSPORT"; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } @@ -4409,7 +4409,7 @@ void SdpOfferAnswerHandler::ReportNegotiatedSdpSemantics( semantics_negotiated = kSdpSemanticNegotiatedMixed; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } RTC_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.SdpSemanticNegotiated", semantics_negotiated, kSdpSemanticNegotiatedMax); @@ -4721,11 +4721,12 @@ void SdpOfferAnswerHandler::DestroyChannelInterface( static_cast(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 46e7397e36..9ae3d5eb1a 100644 --- a/pc/srtp_transport_unittest.cc +++ b/pc/srtp_transport_unittest.cc @@ -101,7 +101,7 @@ class SrtpTransportTest : public ::testing::Test, public sigslot::has_slots<> { 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 113716c99e..01c519f307 100644 --- a/pc/stats_collector.cc +++ b/pc/stats_collector.cc @@ -505,7 +505,7 @@ const char* IceCandidateTypeToStatsType(const std::string& candidate_type) { if (candidate_type == cricket::RELAY_PORT_TYPE) { return STATSREPORT_RELAY_PORT_TYPE; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return "unknown"; } @@ -530,7 +530,7 @@ const char* AdapterTypeToStatsType(rtc::AdapterType type) { case rtc::ADAPTER_TYPE_ANY: return STATSREPORT_ADAPTER_TYPE_WILDCARD; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return ""; } } @@ -572,7 +572,7 @@ void StatsCollector::AddTrack(MediaStreamTrackInterface* track) { CreateTrackReport(static_cast(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 214ed6b523..41611d12a3 100644 --- a/pc/test/fake_audio_capture_module.cc +++ b/pc/test/fake_audio_capture_module.cc @@ -72,7 +72,7 @@ int FakeAudioCaptureModule::frames_received() const { int32_t FakeAudioCaptureModule::ActiveAudioLayer( AudioLayer* /*audio_layer*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -94,17 +94,17 @@ int32_t FakeAudioCaptureModule::Terminate() { } 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 @@ int32_t FakeAudioCaptureModule::PlayoutDeviceName( uint16_t /*index*/, char /*name*/[webrtc::kAdmMaxDeviceNameSize], char /*guid*/[webrtc::kAdmMaxGuidSize]) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -120,7 +120,7 @@ int32_t FakeAudioCaptureModule::RecordingDeviceName( 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::SetRecordingDevice( } int32_t FakeAudioCaptureModule::PlayoutIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -164,7 +164,7 @@ bool FakeAudioCaptureModule::PlayoutIsInitialized() const { } int32_t FakeAudioCaptureModule::RecordingIsAvailable(bool* /*available*/) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -241,7 +241,7 @@ int32_t FakeAudioCaptureModule::InitSpeaker() { } bool FakeAudioCaptureModule::SpeakerIsInitialized() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -251,40 +251,40 @@ int32_t FakeAudioCaptureModule::InitMicrophone() { } 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::MaxMicrophoneVolume( 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::SetStereoPlayout(bool /*enable*/) { } int32_t FakeAudioCaptureModule::StereoPlayout(bool* /*enabled*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -376,7 +376,7 @@ int32_t FakeAudioCaptureModule::SetStereoRecording(bool enable) { } int32_t FakeAudioCaptureModule::StereoRecording(bool* /*enabled*/) const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -397,7 +397,7 @@ void FakeAudioCaptureModule::OnMessage(rtc::Message* msg) { default: // All existing messages should be caught. Getting here should never // happen. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -506,7 +506,7 @@ void FakeAudioCaptureModule::ReceiveFrameP() { 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 @@ void FakeAudioCaptureModule::SendFrameP() { 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 fc931ad661..dadd5bb1fa 100644 --- a/pc/test/fake_rtc_certificate_generator.h +++ b/pc/test/fake_rtc_certificate_generator.h @@ -171,7 +171,7 @@ class FakeRTCCertificateGenerator case rtc::KT_ECDSA: return rtc::RTCCertificate::FromPEM(kEcdsaPems[0]); default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -190,7 +190,7 @@ class FakeRTCCertificateGenerator 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 84396169de..f95983b4e6 100644 --- a/pc/webrtc_sdp.cc +++ b/pc/webrtc_sdp.cc @@ -782,7 +782,7 @@ static int GetCandidatePreferenceFromType(const std::string& type) { } else if (type == cricket::RELAY_PORT_TYPE) { preference = kPreferenceRelayed; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return preference; } @@ -1417,14 +1417,14 @@ void BuildMediaDescription(const ContentInfo* content_info, 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 @@ void BuildRtpContentAttributes(const MediaContentDescription* media_desc, InitAttrLine(kAttributeSendRecv, &os); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); InitAttrLine(kAttributeSendRecv, &os); break; } @@ -1995,7 +1995,7 @@ void BuildCandidate(const std::vector& candidates, 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 a2a884a460..883249c20c 100644 --- a/pc/webrtc_sdp_unittest.cc +++ b/pc/webrtc_sdp_unittest.cc @@ -966,7 +966,7 @@ static void ReplaceDirection(RtpTransceiverDirection direction, break; case RtpTransceiverDirection::kStopped: default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); new_direction = "a=sendrecv"; break; } @@ -1602,7 +1602,7 @@ class WebRtcSdpTest : public ::testing::Test { } 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 995ef5e780..ac20308df9 100644 --- a/pc/webrtc_session_description_factory.cc +++ b/pc/webrtc_session_description_factory.cc @@ -324,7 +324,7 @@ void WebRtcSessionDescriptionFactory::OnMessage(rtc::Message* msg) { break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } diff --git a/rtc_base/async_resolver.cc b/rtc_base/async_resolver.cc index 0fd10977e2..ad1598f214 100644 --- a/rtc_base/async_resolver.cc +++ b/rtc_base/async_resolver.cc @@ -70,7 +70,7 @@ int ResolveHostname(const std::string& hostname, int family, std::vector* 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 bc8b7ddbc7..c2480755b4 100644 --- a/rtc_base/async_tcp_socket.cc +++ b/rtc_base/async_tcp_socket.cc @@ -99,7 +99,7 @@ AsyncTCPSocket::State AsyncTCPSocketBase::GetState() const { case Socket::CS_CONNECTED: return STATE_CONNECTED; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return STATE_CLOSED; } } @@ -143,7 +143,7 @@ int AsyncTCPSocketBase::FlushOutBuffer() { break; } if (static_cast(res) > view.size()) { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); res = -1; break; } @@ -217,7 +217,7 @@ void AsyncTCPSocketBase::OnReadEvent(Socket* socket) { 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 @@ AsyncTcpListenSocket::State AsyncTcpListenSocket::GetState() const { 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 e1bcd61070..99b2ab3e24 100644 --- a/rtc_base/boringssl_certificate.cc +++ b/rtc_base/boringssl_certificate.cc @@ -106,7 +106,7 @@ bool AddSHA256SignatureAlgorithm(CBB* cbb, KeyType key_type) { } 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 4015338ae0..028de459bf 100644 --- a/rtc_base/checks.h +++ b/rtc_base/checks.h @@ -444,6 +444,8 @@ RTC_NORETURN RTC_EXPORT void UnreachableCodeReached(); #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 de897bfbef..ac3fd88f49 100644 --- a/rtc_base/experiments/field_trial_list.cc +++ b/rtc_base/experiments/field_trial_list.cc @@ -34,7 +34,7 @@ bool FieldTrialListWrapper::Used() { } bool FieldTrialStructListBase::Parse(absl::optional 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 11450d0849..f37c4e9c76 100644 --- a/rtc_base/experiments/min_video_bitrate_experiment.cc +++ b/rtc_base/experiments/min_video_bitrate_experiment.cc @@ -105,7 +105,7 @@ absl::optional GetExperimentalMinVideoBitrate(VideoCodecType type) { 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 0648363b2e..87ede73985 100644 --- a/rtc_base/fake_ssl_identity.cc +++ b/rtc_base/fake_ssl_identity.cc @@ -103,17 +103,17 @@ const SSLCertChain& FakeSSLIdentity::cert_chain() const { } 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 321d848384..5061eaea61 100644 --- a/rtc_base/logging.cc +++ b/rtc_base/logging.cc @@ -481,7 +481,7 @@ void Log(const LogArgType* fmt, ...) { } #endif default: { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); va_end(args); return; } @@ -535,7 +535,7 @@ void Log(const LogArgType* fmt, ...) { reinterpret_cast(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 50d7de0dda..9ca03608e8 100644 --- a/rtc_base/nat_types.cc +++ b/rtc_base/nat_types.cc @@ -53,7 +53,7 @@ NAT* NAT::Create(NATType type) { 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 98e4769279..dbcdcc4c88 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc @@ -138,7 +138,7 @@ uint16_t ComputeNetworkCostByType(int type, 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 @@ void BasicNetworkManager::OnNetworksChanged() { 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 @@ void BasicNetworkManager::OnMessage(Message* msg) { break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } diff --git a/rtc_base/network_constants.cc b/rtc_base/network_constants.cc index 905aa3646c..9e6ab520e5 100644 --- a/rtc_base/network_constants.cc +++ b/rtc_base/network_constants.cc @@ -39,7 +39,7 @@ std::string AdapterTypeToString(AdapterType type) { 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 ce1e963be4..4705163c4a 100644 --- a/rtc_base/null_socket_server.cc +++ b/rtc_base/null_socket_server.cc @@ -30,7 +30,7 @@ void NullSocketServer::WakeUp() { } 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 4bc8cb0dec..29d2341c85 100644 --- a/rtc_base/numerics/histogram_percentile_counter.cc +++ b/rtc_base/numerics/histogram_percentile_counter.cc @@ -72,7 +72,7 @@ absl::optional HistogramPercentileCounter::GetPercentile( 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 911a751cbe..6ac546e9bb 100644 --- a/rtc_base/openssl_key_pair.cc +++ b/rtc_base/openssl_key_pair.cc @@ -143,14 +143,14 @@ std::string OpenSSLKeyPair::PrivateKeyToPEMString() const { 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 @@ std::string OpenSSLKeyPair::PublicKeyToPEMString() const { 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 95408f5945..dd82e4f061 100644 --- a/rtc_base/openssl_stream_adapter.cc +++ b/rtc_base/openssl_stream_adapter.cc @@ -842,7 +842,7 @@ void OpenSSLStreamAdapter::SetTimeout(int delay_ms) { } 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 47d41ee064..040904abd0 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc @@ -601,7 +601,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) { 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 @@ bool SocketDispatcher::IsDescriptorClosed() { // 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 @@ bool PhysicalSocketServer::Wait(int cmsWait, bool process_io) { // 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 abe5e30d8f..0bd6efad3e 100644 --- a/rtc_base/socket_adapters.cc +++ b/rtc_base/socket_adapters.cc @@ -97,7 +97,7 @@ void BufferedReadAdapter::OnReadEvent(Socket* socket) { 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 c24f46eff1..81cf1d78a3 100644 --- a/rtc_base/ssl_identity.cc +++ b/rtc_base/ssl_identity.cc @@ -121,7 +121,7 @@ KeyParams::KeyParams(KeyType key_type) { 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 caa931b594..7536cd77dd 100644 --- a/rtc_base/strings/string_builder.cc +++ b/rtc_base/strings/string_builder.cc @@ -98,7 +98,7 @@ SimpleStringBuilder& SimpleStringBuilder::AppendFormat(const char* fmt, ...) { } 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 9efe76e3a6..d53d923148 100644 --- a/rtc_base/system_time.cc +++ b/rtc_base/system_time.cc @@ -48,7 +48,7 @@ int64_t SystemTimeNanos() { // 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 a8b0dbffef..4f56400741 100644 --- a/rtc_base/task_queue_libevent.cc +++ b/rtc_base/task_queue_libevent.cc @@ -288,7 +288,7 @@ void TaskQueueLibevent::OnWakeup(int socket, 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 da0535d5c5..6382d6b15d 100644 --- a/rtc_base/task_queue_win.cc +++ b/rtc_base/task_queue_win.cc @@ -335,7 +335,7 @@ bool TaskQueueWin::ProcessQueuedMessages() { break; } default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } } else { diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc index 692d80276d..46e082f8ff 100644 --- a/rtc_base/thread.cc +++ b/rtc_base/thread.cc @@ -116,7 +116,7 @@ ThreadManager* ThreadManager::Instance() { 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 bcda9cd1ee..88c6eb9fc5 100644 --- a/rtc_base/virtual_socket_server.cc +++ b/rtc_base/virtual_socket_server.cc @@ -372,7 +372,7 @@ void VirtualSocket::OnMessage(Message* pmsg) { } 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 68866da85b..80e49f2a16 100644 --- a/rtc_base/win/windows_version.cc +++ b/rtc_base/win/windows_version.cc @@ -215,7 +215,7 @@ Version MajorMinorBuildToVersion(int major, int minor, int build) { 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 835d1a7081..3f3a826762 100644 --- a/rtc_base/win32_socket_server.cc +++ b/rtc_base/win32_socket_server.cc @@ -566,7 +566,7 @@ int Win32Socket::TranslateOption(Option opt, int* slevel, int* sopt) { 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 9c0d324533..d0e2f4cdbe 100644 --- a/rtc_tools/network_tester/test_controller.cc +++ b/rtc_tools/network_tester/test_controller.cc @@ -126,7 +126,7 @@ void TestController::OnReadPacket(rtc::AsyncPacketSocket* socket, 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 02184a64ea..69a753bf22 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 @@ class ReplacementAudioDecoderFactory : public AudioDecoderFactory { file_sample_rate_hz_(file_sample_rate_hz) {} std::vector 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 bdde2c9343..b43801623c 100644 --- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc +++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc @@ -959,7 +959,7 @@ void EventLogAnalyzer::CreateTotalOutgoingBitrateGraph(Plot* plot, 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 02202ddba8..c9fe40ffc3 100644 --- a/rtc_tools/video_replay.cc +++ b/rtc_tools/video_replay.cc @@ -292,7 +292,7 @@ class DecoderIvfFileWriter : public test::FakeDecoder { 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 08b77fe099..9dbc27fdc2 100644 --- a/sdk/android/src/jni/android_network_monitor.cc +++ b/sdk/android/src/jni/android_network_monitor.cc @@ -104,7 +104,7 @@ static NetworkType GetNetworkTypeFromJava( if (enum_name == "CONNECTION_NONE") { return NetworkType::NETWORK_NONE; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return NetworkType::NETWORK_UNKNOWN; } @@ -138,7 +138,7 @@ static rtc::AdapterType AdapterTypeFromNetworkType( // 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 412a7815ad..cebc8669be 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, } 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 abd7ac7f45..7875fe9bfa 100644 --- a/sdk/android/src/jni/pc/peer_connection.cc +++ b/sdk/android/src/jni/pc/peer_connection.cc @@ -117,7 +117,7 @@ SdpSemantics JavaToNativeSdpSemantics(JNIEnv* jni, 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 baa3f276e7..b8eae739f9 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 @@ ScopedJavaLocalRef MemberToJava( 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 443fee1a65..12cedd6c50 100644 --- a/sdk/objc/api/logging/RTCCallbackLogger.mm +++ b/sdk/objc/api/logging/RTCCallbackLogger.mm @@ -36,7 +36,7 @@ class CallbackWithSeverityLogSink : public rtc::LogSink { 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 b56c6e9648..1541045099 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)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 b48d51f9ca..753667b635 100644 --- a/sdk/objc/api/peerconnection/RTCRtpCodecParameters.mm +++ b/sdk/objc/api/peerconnection/RTCRtpCodecParameters.mm @@ -61,10 +61,10 @@ const NSString * const kRTCH264CodecName = @(cricket::kH264CodecName); _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 @@ const NSString * const kRTCH264CodecName = @(cricket::kH264CodecName); } else if (_kind == kRTCMediaStreamTrackKindVideo) { parameters.kind = cricket::MEDIA_TYPE_VIDEO; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } if (_clockRate != nil) { parameters.clock_rate = absl::optional(_clockRate.intValue); diff --git a/sdk/objc/api/peerconnection/RTCSessionDescription.mm b/sdk/objc/api/peerconnection/RTCSessionDescription.mm index 4ff02e8411..539c90b14c 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 967683fc91..28ef326b99 100644 --- a/sdk/objc/api/peerconnection/RTCStatisticsReport.mm +++ b/sdk/objc/api/peerconnection/RTCStatisticsReport.mm @@ -112,7 +112,7 @@ NSObject *ValueFromStatsMember(const RTCStatsMemberInterface *member) { 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 0b1d4a60ae..3211f181d9 100644 --- a/sdk/objc/api/peerconnection/RTCVideoSource.mm +++ b/sdk/objc/api/peerconnection/RTCVideoSource.mm @@ -44,7 +44,7 @@ static webrtc::ObjCVideoTrackSource *getObjCVideoSource( - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory nativeMediaSource:(rtc::scoped_refptr)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 48d09cf396..261874d20b 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)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 6b04d83e2b..4160572814 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)info frameTypes:(NSArray *)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 c6adcd0fb5..e5dc4ef80a 100644 --- a/sdk/objc/components/renderer/metal/RTCMTLRGBRenderer.mm +++ b/sdk/objc/components/renderer/metal/RTCMTLRGBRenderer.mm @@ -126,7 +126,7 @@ static NSString *const shaderSource = MTL_STRINGIFY( 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 e8d161330f..410590a7b1 100644 --- a/sdk/objc/components/renderer/metal/RTCMTLRenderer.mm +++ b/sdk/objc/components/renderer/metal/RTCMTLRenderer.mm @@ -153,12 +153,12 @@ static const NSInteger kMaxInflightBuffers = 1; } - (NSString *)shaderSource { - RTC_NOTREACHED() << "Virtual method not implemented in subclass."; + RTC_DCHECK_NOTREACHED() << "Virtual method not implemented in subclass."; return nil; } - (void)uploadTexturesToRenderEncoder:(id)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 @@ static const NSInteger kMaxInflightBuffers = 1; 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 df8077b35f..8e39eddc91 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 3ec7d0b75a..248f3fcfd2 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 @@ void AudioDeviceIOS::UpdateAudioUnit(bool can_play_or_record) { 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::SpeakerVolumeIsAvailable(bool& available) { } 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::SpeakerMuteIsAvailable(bool& available) { } 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(uint16_t index) { } int32_t AudioDeviceIOS::SetPlayoutDevice(AudioDeviceModule::WindowsDeviceType) { - RTC_NOTREACHED() << "Not implemented"; + RTC_DCHECK_NOTREACHED() << "Not implemented"; return -1; } @@ -1064,12 +1064,12 @@ int32_t AudioDeviceIOS::MicrophoneMuteIsAvailable(bool& available) { } 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::MicrophoneVolumeIsAvailable(bool& available) { } 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(uint16_t index) { } 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 e540b7064b..c992458415 100644 --- a/system_wrappers/include/metrics.h +++ b/system_wrappers/include/metrics.h @@ -270,7 +270,7 @@ void NoOp(const Ts&...) {} 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 d10b5cff3f..d16ea7e03f 100644 --- a/system_wrappers/source/field_trial.cc +++ b/system_wrappers/source/field_trial.cc @@ -85,7 +85,7 @@ void InsertOrReplaceFieldTrialStringsInMap( (*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 04f397f684..95606d6ff7 100644 --- a/test/audio_decoder_proxy_factory.h +++ b/test/audio_decoder_proxy_factory.h @@ -31,7 +31,7 @@ class AudioDecoderProxyFactory : public AudioDecoderFactory { // Unused by tests. std::vector GetSupportedDecoders() override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; } diff --git a/test/frame_generator.cc b/test/frame_generator.cc index 913a4fb589..92e95f68a0 100644 --- a/test/frame_generator.cc +++ b/test/frame_generator.cc @@ -82,7 +82,7 @@ FrameGeneratorInterface::VideoFrameData SquareGenerator::NextFrame() { 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 94e15cb0de..a5521bf1fa 100644 --- a/test/frame_generator.h +++ b/test/frame_generator.h @@ -75,7 +75,7 @@ class YuvFileGenerator : public FrameGeneratorInterface { VideoFrameData NextFrame() override; void ChangeResolution(size_t width, size_t height) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } private: @@ -104,7 +104,7 @@ class SlideGenerator : public FrameGeneratorInterface { VideoFrameData NextFrame() override; void ChangeResolution(size_t width, size_t height) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } private: @@ -134,7 +134,7 @@ class ScrollingImageFrameGenerator : public FrameGeneratorInterface { 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 a5ee593a7a..8464f3d9aa 100644 --- a/test/function_audio_decoder_factory.h +++ b/test/function_audio_decoder_factory.h @@ -41,7 +41,7 @@ class FunctionAudioDecoderFactory : public AudioDecoderFactory { // Unused by tests. std::vector GetSupportedDecoders() override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; } diff --git a/test/layer_filtering_transport.cc b/test/layer_filtering_transport.cc index d906e07046..08c90f77a9 100644 --- a/test/layer_filtering_transport.cc +++ b/test/layer_filtering_transport.cc @@ -163,7 +163,7 @@ bool LayerFilteringTransport::SendRtp(const uint8_t* packet, } } } 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 bd0b304545..5625731836 100644 --- a/test/mappable_native_buffer.cc +++ b/test/mappable_native_buffer.cc @@ -173,7 +173,7 @@ MappableNativeBuffer::GetOrCreateMappedBuffer(int width, int height) { 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 392ebc2563..64df2b869f 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 @@ int32_t QualityAnalyzingVideoEncoder::InitEncode( 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 @@ bool QualityAnalyzingVideoEncoder::ShouldDiscard( 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 7ff6d41986..cd5beee433 100644 --- a/test/peer_scenario/peer_scenario_client.cc +++ b/test/peer_scenario/peer_scenario_client.cc @@ -130,7 +130,7 @@ class LambdaCreateSessionDescriptionObserver 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 5267e89d5b..cac0f10dc9 100644 --- a/test/scenario/hardware_codecs.cc +++ b/test/scenario/hardware_codecs.cc @@ -28,7 +28,8 @@ std::unique_ptr CreateHardwareEncoderFactory() { #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 @@ std::unique_ptr CreateHardwareDecoderFactory() { #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 2cce904e7d..9e10613d00 100644 --- a/test/scenario/video_stream.cc +++ b/test/scenario/video_stream.cc @@ -49,7 +49,7 @@ uint8_t CodecTypeToPayloadType(VideoCodecType codec_type) { case VideoCodecType::kVideoCodecH264: return CallTest::kPayloadTypeH264; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return {}; } @@ -64,7 +64,7 @@ std::string CodecTypeToCodecName(VideoCodecType codec_type) { case VideoCodecType::kVideoCodecH264: return cricket::kH264CodecName; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } return {}; } @@ -222,7 +222,7 @@ CreateEncoderSpecificSettings(VideoStreamConfig config) { case Codec::kVideoCodecAV1: return nullptr; case Codec::kVideoCodecMultiplex: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } } @@ -382,7 +382,7 @@ SendVideoStream::SendVideoStream(CallClient* sender, } else if (config_.encoder.codec == Codec::kVideoCodecGeneric) { encoder = std::make_unique(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 c66f67cfa2..777d789d95 100644 --- a/test/testsupport/file_utils.cc +++ b/test/testsupport/file_utils.cc @@ -106,7 +106,7 @@ std::string TempFilename(const std::string& dir, const std::string& prefix) { 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 @@ std::string TempFilename(const std::string& dir, const std::string& prefix) { 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 43391556b5..1e4d56d080 100644 --- a/test/testsupport/file_utils_override.cc +++ b/test/testsupport/file_utils_override.cc @@ -91,7 +91,7 @@ absl::optional ProjectRootPath() { 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 158f1cd768..436d1baa0a 100644 --- a/test/testsupport/perf_result_reporter.cc +++ b/test/testsupport/perf_result_reporter.cc @@ -71,7 +71,7 @@ std::string UnitToString(Unit unit) { 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 096ca44571..93924ba16c 100644 --- a/test/testsupport/perf_test_histogram_writer.cc +++ b/test/testsupport/perf_test_histogram_writer.cc @@ -181,7 +181,7 @@ class PerfTestHistogramWriter : public PerfTestResultWriter { 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 14deb37c66..6bc810b94d 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 webrtc { 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 ca8b5ac687..e374d45fd9 100644 --- a/test/time_controller/external_time_controller.cc +++ b/test/time_controller/external_time_controller.cc @@ -109,7 +109,7 @@ class ExternalTimeController::ProcessThreadWrapper : public ProcessThread { void Delete() override { // ProcessThread shouldn't be deleted as a TaskQueue. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ModuleWrapper* GetWrapper(Module* module) { @@ -200,12 +200,12 @@ void ExternalTimeController::AdvanceTime(TimeDelta duration) { std::unique_ptr ExternalTimeController::CreateThread( const std::string& name, std::unique_ptr 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 54d5db7df8..9a0efacca3 100644 --- a/test/time_controller/simulated_process_thread.h +++ b/test/time_controller/simulated_process_thread.h @@ -49,7 +49,7 @@ class SimulatedProcessThread : public ProcessThread, 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 73a52b21c5..4de36c54fb 100644 --- a/test/time_controller/simulated_thread.cc +++ b/test/time_controller/simulated_thread.cc @@ -23,7 +23,7 @@ namespace { 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 595c18d160..b79de3ba8c 100644 --- a/test/time_controller/simulated_time_controller.h +++ b/test/time_controller/simulated_time_controller.h @@ -109,13 +109,13 @@ class TokenTaskQueue : public TaskQueueBase { // Promoted to public using CurrentTaskQueueSetter = TaskQueueBase::CurrentTaskQueueSetter; - void Delete() override { RTC_NOTREACHED(); } + void Delete() override { RTC_DCHECK_NOTREACHED(); } void PostTask(std::unique_ptr /*task*/) override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } void PostDelayedTask(std::unique_ptr /*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 3d582cad8e..6a35165833 100644 --- a/test/time_controller/time_controller_conformance_test.cc +++ b/test/time_controller/time_controller_conformance_test.cc @@ -54,7 +54,7 @@ std::string ParamsToString(const TestParamInfo& param) { 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 f294f62713..6fd3805cd6 100644 --- a/test/video_decoder_proxy_factory.h +++ b/test/video_decoder_proxy_factory.h @@ -30,7 +30,7 @@ class VideoDecoderProxyFactory final : public VideoDecoderFactory { // Unused by tests. std::vector 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 7c412bacfa..f40e69daa8 100644 --- a/test/video_encoder_proxy_factory.h +++ b/test/video_encoder_proxy_factory.h @@ -43,7 +43,7 @@ class VideoEncoderProxyFactory final : public VideoEncoderFactory { // Unused by tests. std::vector GetSupportedFormats() const override { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return {}; } diff --git a/video/call_stats2.h b/video/call_stats2.h index 878a43f9ff..74bd3482da 100644 --- a/video/call_stats2.h +++ b/video/call_stats2.h @@ -93,7 +93,7 @@ class CallStats { // 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 108c118d08..5f3dbd74f4 100644 --- a/video/cpu_scaling_tests.cc +++ b/video/cpu_scaling_tests.cc @@ -96,7 +96,7 @@ void CpuOveruseTest::RunTestAndCheckForAdaptation( 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 6a2c99ffe3..9f4d8551c4 100644 --- a/video/encoder_bitrate_adjuster.cc +++ b/video/encoder_bitrate_adjuster.cc @@ -163,7 +163,7 @@ VideoBitrateAllocation EncoderBitrateAdjuster::AdjustRateAllocation( 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 e529ae4201..4ab16cc0f2 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 @@ uint8_t PayloadNameToPayloadType(const std::string& payload_name) { } else if (payload_name == "H264") { return test::CallTest::kPayloadTypeH264; } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } } @@ -223,7 +223,7 @@ void MultiCodecReceiveTest::RunTestWithCodecs( 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 @@ void MultiCodecReceiveTest::RunTestWithCodecs( 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 a698328dad..90830d12c4 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 @@ void RtpRtcpEndToEndTest::RespectsRtcpMode(RtcpMode rtcp_mode) { 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 df7b082e87..6dda450a82 100644 --- a/video/picture_id_tests.cc +++ b/video/picture_id_tests.cc @@ -111,7 +111,7 @@ class PictureIdObserver : public test::RtpRtcpObserver { 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 9837517b78..c7c393e861 100644 --- a/video/quality_scaling_tests.cc +++ b/video/quality_scaling_tests.cc @@ -82,7 +82,7 @@ class ScalingObserver : public test::SendTest { 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 a50008c9be..eeb379fb44 100644 --- a/video/send_statistics_proxy.cc +++ b/video/send_statistics_proxy.cc @@ -60,7 +60,7 @@ const char* GetUmaPrefix(VideoEncoderConfig::ContentType content_type) { case VideoEncoderConfig::ContentType::kScreen: return kScreenPrefix; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return nullptr; } @@ -795,7 +795,7 @@ VideoSendStream::StreamStats* SendStatisticsProxy::GetStatsEntry( } 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 fed9f66829..dc548ea3c3 100644 --- a/video/stats_counter.cc +++ b/video/stats_counter.cc @@ -354,7 +354,7 @@ bool MaxCounter::GetMetric(int* metric) const { } int MaxCounter::GetValueForEmptyInterval() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -378,7 +378,7 @@ bool PercentCounter::GetMetric(int* metric) const { } int PercentCounter::GetValueForEmptyInterval() const { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; } @@ -402,7 +402,7 @@ bool PermilleCounter::GetMetric(int* metric) const { } 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 ac565cc2de..9fa7a98808 100644 --- a/video/video_quality_test.cc +++ b/video/video_quality_test.cc @@ -888,9 +888,9 @@ void VideoQualityTest::SetupVideo(Transport* send_transport, // 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 34a8b15d74..fcd4d7d313 100644 --- a/video/video_receive_stream.cc +++ b/video/video_receive_stream.cc @@ -459,7 +459,7 @@ void VideoReceiveStream::RemoveSecondarySink( void VideoReceiveStream::SetRtpExtensions( std::vector extensions) { // VideoReceiveStream is deprecated and this function not supported. - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } bool VideoReceiveStream::SetBaseMinimumPlayoutDelayMs(int delay_ms) { @@ -584,14 +584,14 @@ absl::optional VideoReceiveStream::GetInfo() const { 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 0776a40b35..87117eac82 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -695,14 +695,14 @@ absl::optional VideoReceiveStream2::GetInfo() const { 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 91d5ccc85b..485072e76d 100644 --- a/video/video_send_stream_tests.cc +++ b/video/video_send_stream_tests.cc @@ -3227,7 +3227,7 @@ class Vp9HeaderObserver : public test::SendTest { VerifyTemporalLayerStructure3(vp9); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } } @@ -3945,7 +3945,7 @@ class ContentSwitchTest : public test::SendTest { state_ = StreamState::kAfterSwitchBack; break; case StreamState::kAfterSwitchBack: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); break; } content_switch_event_.Set(); @@ -4095,7 +4095,7 @@ void VideoSendStreamTest::TestTemporalLayers( &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 49e561937a..1331b8cd31 100644 --- a/video/video_stream_encoder_unittest.cc +++ b/video/video_stream_encoder_unittest.cc @@ -8382,7 +8382,7 @@ class VideoStreamEncoderWithRealEncoderTest false); break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } ConfigureEncoderAndBitrate(codec_type_, std::move(encoder)); } @@ -8609,7 +8609,7 @@ std::string TestParametersVideoCodecAndAllowI420ConversionToString( str = "Multiplex"; break; default: - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); } str += allow_i420_conversion ? "_AllowToI420" : "_DisallowToI420"; return str;