| 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 bb69cbdb2f73be7f36f7983a0a4b7ae662cc03d1..22c8520ca8e1aa4762eeff3e75fba74b17994e56 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() = default;
|
| @@ -34,6 +36,19 @@ SdpAudioFormat::~SdpAudioFormat() = default;
|
| SdpAudioFormat& SdpAudioFormat::operator=(const SdpAudioFormat&) = default;
|
| SdpAudioFormat& SdpAudioFormat::operator=(SdpAudioFormat&&) = default;
|
|
|
| +bool SdpAudioFormat::operator<(const SdpAudioFormat& b) const {
|
| + if (clockrate_hz == b.clockrate_hz) {
|
| + if (num_channels == b.num_channels) {
|
| + int name_cmp = STR_CASE_CMP(name.c_str(), b.name.c_str());
|
| + if (name_cmp == 0)
|
| + return parameters < b.parameters;
|
| + return name_cmp < 0;
|
| + }
|
| + return num_channels < b.num_channels;
|
| + }
|
| + return clockrate_hz < b.clockrate_hz;
|
| +}
|
| +
|
| void swap(SdpAudioFormat& a, SdpAudioFormat& b) {
|
| using std::swap;
|
| swap(a.name, b.name);
|
|
|