AcmReceiver: Eliminate AcmReceiver::decoders_

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2351183002
Cr-Commit-Position: refs/heads/master@{#14335}
This commit is contained in:
kwiberg
2016-09-21 10:55:15 -07:00
committed by Commit bot
parent c5aea65b76
commit c4ccd4d61c
9 changed files with 53 additions and 40 deletions

View File

@ -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);

View File

@ -35,6 +35,11 @@ struct SdpAudioFormat {
SdpAudioFormat& operator=(const SdpAudioFormat&);
SdpAudioFormat& operator=(SdpAudioFormat&&);
friend bool operator==(const SdpAudioFormat& a, const SdpAudioFormat& b);
friend bool operator!=(const SdpAudioFormat& a, const SdpAudioFormat& b) {
return !(a == b);
}
std::string name;
int clockrate_hz;
int num_channels;