mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED. The new macros will replace the old one when old one's usage will be removed. The idea of the renaming to provide a clear signal that this is debug build only macros and will be stripped in the production build. Bug: webrtc:9065 Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35348}
This commit is contained in:
parent
f5ea3b96cd
commit
d3251968d1
263 changed files with 604 additions and 583 deletions
|
@ -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 "";
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) {
|
|||
case 2:
|
||||
return kComfortNoise;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return kSpeech;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -28,7 +28,7 @@ std::string MediaTypeToString(MediaType type) {
|
|||
return kMediaTypeData;
|
||||
case MEDIA_TYPE_UNSUPPORTED:
|
||||
// Unsupported media stores the m=<mediatype> differently.
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return "";
|
||||
}
|
||||
RTC_CHECK_NOTREACHED();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<RtpCodecCapability>) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ const char* FrameGeneratorInterface::OutputTypeToString(
|
|||
case OutputType::kNV12:
|
||||
return "NV12";
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class FunctionVideoEncoderFactory final : public VideoEncoderFactory {
|
|||
|
||||
// Unused by tests.
|
||||
std::vector<SdpVideoFormat> GetSupportedFormats() const override {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ absl::InlinedVector<DecodeTargetIndication, 10> StringToDecodeTargetIndications(
|
|||
indication = DecodeTargetIndication::kSwitch;
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
dtis.push_back(indication);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ rtc::scoped_refptr<I010Buffer> 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;
|
||||
|
|
|
@ -51,7 +51,7 @@ std::unique_ptr<VideoRtpDepacketizer> CreateDepacketizer(
|
|||
case RtpVideoFrameAssembler::kGeneric:
|
||||
return std::make_unique<VideoRtpDepacketizerGeneric>();
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace
|
||||
|
|
|
@ -93,7 +93,7 @@ class PacketBuilder {
|
|||
return kVideoCodecGeneric;
|
||||
}
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ const char* VideoFrameBufferTypeToString(VideoFrameBuffer::Type type) {
|
|||
case VideoFrameBuffer::Type::kNV12:
|
||||
return "kNV12";
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<int32_t> decode_time_ms,
|
||||
absl::optional<uint8_t> qp) override {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
} callback;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void WritePps(const PpsParser::PpsState& pps,
|
|||
break;
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ bool HasOneRef(const rtc::scoped_refptr<VideoFrameBuffer>& buffer) {
|
|||
->HasOneRef();
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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<PlanarYuvBuffer> buf2 =
|
||||
|
|
|
@ -112,7 +112,7 @@ int GetPayloadType(const std::string& codec_name) {
|
|||
return static_cast<int>(PayloadType::kIlbc);
|
||||
}
|
||||
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ void Conductor::UIThreadCallback(int msg_id, void* data) {
|
|||
}
|
||||
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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<int>(event.GetType());
|
||||
RTC_NOTREACHED() << "Unknown event type (" << event_type << ")";
|
||||
RTC_DCHECK_NOTREACHED() << "Unknown event type (" << event_type << ")";
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ size_t ExpectedBaseValueSize(const FieldParameters& params, T value) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ std::unique_ptr<RtcEventLogEncoder> CreateEncoder(
|
|||
default:
|
||||
RTC_LOG(LS_ERROR) << "Unknown RtcEventLog encoder type (" << int(type)
|
||||
<< ")";
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return std::unique_ptr<RtcEventLogEncoder>(nullptr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -546,7 +546,7 @@ void RtcEventLogSession::WriteLog(EventCounts count,
|
|||
}
|
||||
selection -= count.generic_acks_received;
|
||||
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
|
||||
event_log->StopLogging();
|
||||
|
|
|
@ -462,7 +462,7 @@ EventGenerator::NewRtcpPacketIncoming() {
|
|||
return std::make_unique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
rtc::Buffer buffer;
|
||||
return std::make_unique<RtcEventRtcpPacketIncoming>(buffer);
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ EventGenerator::NewRtcpPacketOutgoing() {
|
|||
return std::make_unique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
}
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
rtc::Buffer buffer;
|
||||
return std::make_unique<RtcEventRtcpPacketOutgoing>(buffer);
|
||||
}
|
||||
|
|
|
@ -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<int>(rotation_);
|
||||
RTC_DCHECK_NOTREACHED() << "Invalid rotation value: "
|
||||
<< static_cast<int>(rotation_);
|
||||
// Without this return, the Windows Visual Studio compiler complains
|
||||
// "not all control paths return a value".
|
||||
return GetFrame();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -73,7 +73,7 @@ std::unique_ptr<VideoDecoder> InternalDecoderFactory::CreateVideoDecoder(
|
|||
absl::EqualsIgnoreCase(format.name, cricket::kAv1CodecName))
|
||||
return CreateLibaomAv1Decoder();
|
||||
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ int FindSimulcastFormatIndex(int width,
|
|||
return i;
|
||||
}
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback,
|
|||
rtp_header_,
|
||||
rtc::ArrayView<const uint8_t>(payload_data, payload_len_bytes));
|
||||
if (ret_val < 0) {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
rtp_header_.sequenceNumber++;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ std::unique_ptr<ControllerManager> 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<ControllerManager> 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<ControllerManager> ControllerManagerImpl::Create(
|
|||
}
|
||||
|
||||
#else
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class NullSmoothingFilter final : public SmoothingFilter {
|
|||
absl::optional<float> GetAverage() override { return last_sample_; }
|
||||
|
||||
bool SetTimeConstantMs(int time_constant_ms) override {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ std::unique_ptr<PCMFile> 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<PCMFile>();
|
||||
pcm_file->ReadStereo(false);
|
||||
|
|
|
@ -88,7 +88,7 @@ class SplitBySamplesTest : public ::testing::TestWithParam<NetEqDecoder> {
|
|||
samples_per_ms_ = 8;
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -354,7 +354,7 @@ int DspHelper::DownsampleTo4kHz(const int16_t* input,
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<int>(packet->payload_type);
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
|
||||
if (packet_duration == 0) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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<AudioEncoder> CreateEncoder(CodecType codec_type,
|
|||
GetCodecConfig<AudioEncoderIsac>(), 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;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -176,7 +176,7 @@ class FifoAudioStream : public AudioStream {
|
|||
(static_cast<int32_t>(buffer[2 * i]) + buffer[2 * i + 1]) / 2;
|
||||
}
|
||||
} else {
|
||||
RTC_NOTREACHED() << "Required conversion is not support";
|
||||
RTC_DCHECK_NOTREACHED() << "Required conversion is not support";
|
||||
}
|
||||
fifo_.pop_front();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ class ScopedHandle {
|
|||
void Close() {
|
||||
if (handle_) {
|
||||
if (!::CloseHandle(handle_)) {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
handle_ = nullptr;
|
||||
}
|
||||
|
|
|
@ -101,10 +101,10 @@ void Aec3Fft::ZeroPaddedFft(rtc::ArrayView<const float> 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<const float> 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<const float> x,
|
|||
fft.begin() + x_old.size(), std::multiplies<float>());
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
|
||||
Fft(&fft, X);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -113,7 +113,7 @@ void EchoRemoverMetrics::Update(
|
|||
ResetMetrics();
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ std::unique_ptr<ClippingPredictor> CreateClippingPredictor(
|
|||
config.reference_window_delay, config.clipping_threshold,
|
||||
/*adaptive_step_estimation=*/false);
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
|
|
@ -115,7 +115,7 @@ void InterpolatedGainCurve::RegionLogger::LogRegionStats(
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -29,7 +29,7 @@ static inline size_t ChannelsFromLayout(AudioProcessing::ChannelLayout layout) {
|
|||
case AudioProcessing::kStereoAndKeyboard:
|
||||
return 2;
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ int16_t MapSetting(EchoControlMobileImpl::RoutingMode mode) {
|
|||
case EchoControlMobileImpl::kLoudSpeakerphone:
|
||||
return 4;
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ int16_t MapSetting(GainControl::Mode mode) {
|
|||
case GainControl::kFixedDigital:
|
||||
return kAgcModeFixedDigital;
|
||||
}
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ SuppressionParams::SuppressionParams(
|
|||
use_attenuation_adjustment = true;
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 "";
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ FakeRecordingDevice::FakeRecordingDevice(int initial_mic_level,
|
|||
worker_ = std::make_unique<FakeRecordingDeviceAgc1>(initial_mic_level);
|
||||
break;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<PacketResult>& packet_results,
|
||||
Timestamp at_time) {
|
||||
if (packet_results.empty()) {
|
||||
RTC_NOTREACHED();
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
int loss_count = 0;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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_; }
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue