Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: webrtc/modules/audio_coding/codecs/audio_format.cc

Issue 2351183002: AcmReceiver: Eliminate AcmReceiver::decoders_ (Closed)
Patch Set: case-insensitive string comparison Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/audio_format.cc
diff --git a/webrtc/modules/audio_coding/codecs/audio_format.cc b/webrtc/modules/audio_coding/codecs/audio_format.cc
index 86d5d800422893f95e55f2e890468e4cc4a9448e..ebd7cb030b4fdbcec19eaef2cbc09cff856ec376 100644
--- a/webrtc/modules/audio_coding/codecs/audio_format.cc
+++ b/webrtc/modules/audio_coding/codecs/audio_format.cc
@@ -10,6 +10,8 @@
#include "webrtc/modules/audio_coding/codecs/audio_format.h"
+#include "webrtc/common_types.h"
+
namespace webrtc {
SdpAudioFormat::SdpAudioFormat(const SdpAudioFormat&) = default;
@@ -33,6 +35,12 @@ SdpAudioFormat::~SdpAudioFormat() = default;
SdpAudioFormat& SdpAudioFormat::operator=(const SdpAudioFormat&) = default;
SdpAudioFormat& SdpAudioFormat::operator=(SdpAudioFormat&&) = default;
+bool operator==(const SdpAudioFormat& a, const SdpAudioFormat& b) {
+ return STR_CASE_CMP(a.name.c_str(), b.name.c_str()) == 0 &&
+ a.clockrate_hz == b.clockrate_hz && a.num_channels == b.num_channels &&
+ a.parameters == b.parameters;
+}
+
void swap(SdpAudioFormat& a, SdpAudioFormat& b) {
using std::swap;
swap(a.name, b.name);
« no previous file with comments | « webrtc/modules/audio_coding/codecs/audio_format.h ('k') | webrtc/modules/audio_coding/neteq/decoder_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698