Delete use of STR_CASE_CMP, replaced with absl::EqualsIgnoreCase.
Bug: webrtc:5876 Change-Id: Ica2d47ca45b8ef01a548d8dbe31dbed740a0ebda Reviewed-on: https://webrtc-review.googlesource.com/c/106820 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25306}
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
|
||||
#include <utility> // pair
|
||||
|
||||
#include "absl/strings/match.h"
|
||||
#include "api/audio_codecs/audio_decoder.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
@ -101,7 +102,7 @@ AudioDecoder* DecoderDatabase::DecoderInfo::GetDecoder() const {
|
||||
}
|
||||
|
||||
bool DecoderDatabase::DecoderInfo::IsType(const char* name) const {
|
||||
return STR_CASE_CMP(audio_format_.name.c_str(), name) == 0;
|
||||
return absl::EqualsIgnoreCase(audio_format_.name, name);
|
||||
}
|
||||
|
||||
bool DecoderDatabase::DecoderInfo::IsType(const std::string& name) const {
|
||||
@ -110,7 +111,7 @@ bool DecoderDatabase::DecoderInfo::IsType(const std::string& name) const {
|
||||
|
||||
absl::optional<DecoderDatabase::DecoderInfo::CngDecoder>
|
||||
DecoderDatabase::DecoderInfo::CngDecoder::Create(const SdpAudioFormat& format) {
|
||||
if (STR_CASE_CMP(format.name.c_str(), "CN") == 0) {
|
||||
if (absl::EqualsIgnoreCase(format.name, "CN")) {
|
||||
// CN has a 1:1 RTP clock rate to sample rate ratio.
|
||||
const int sample_rate_hz = format.clockrate_hz;
|
||||
RTC_DCHECK(sample_rate_hz == 8000 || sample_rate_hz == 16000 ||
|
||||
@ -123,11 +124,11 @@ DecoderDatabase::DecoderInfo::CngDecoder::Create(const SdpAudioFormat& format) {
|
||||
|
||||
DecoderDatabase::DecoderInfo::Subtype
|
||||
DecoderDatabase::DecoderInfo::SubtypeFromFormat(const SdpAudioFormat& format) {
|
||||
if (STR_CASE_CMP(format.name.c_str(), "CN") == 0) {
|
||||
if (absl::EqualsIgnoreCase(format.name, "CN")) {
|
||||
return Subtype::kComfortNoise;
|
||||
} else if (STR_CASE_CMP(format.name.c_str(), "telephone-event") == 0) {
|
||||
} else if (absl::EqualsIgnoreCase(format.name, "telephone-event")) {
|
||||
return Subtype::kDtmf;
|
||||
} else if (STR_CASE_CMP(format.name.c_str(), "red") == 0) {
|
||||
} else if (absl::EqualsIgnoreCase(format.name, "red")) {
|
||||
return Subtype::kRed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user