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

Unified Diff: webrtc/media/engine/fakewebrtcvoiceengine.h

Issue 2785443002: Remove VoECodec from FakeWebRtcVoiceEngine. (Closed)
Patch Set: one include too many Created 3 years, 9 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
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/fakewebrtcvoiceengine.h
diff --git a/webrtc/media/engine/fakewebrtcvoiceengine.h b/webrtc/media/engine/fakewebrtcvoiceengine.h
index 180d06bcaf23b0af6a4722d12de289a79fe31667..13721ea5546c4a531c866628a24db273d6766d3f 100644
--- a/webrtc/media/engine/fakewebrtcvoiceengine.h
+++ b/webrtc/media/engine/fakewebrtcvoiceengine.h
@@ -11,20 +11,11 @@
#ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_
#define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_
-#include <stddef.h>
-
-#include <list>
#include <map>
#include <vector>
#include "webrtc/base/checks.h"
-#include "webrtc/base/stringutils.h"
-#include "webrtc/base/checks.h"
-#include "webrtc/config.h"
-#include "webrtc/media/base/codec.h"
-#include "webrtc/media/base/rtputils.h"
#include "webrtc/media/engine/webrtcvoe.h"
-#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
namespace webrtc {
@@ -35,31 +26,15 @@ class TransmitMixer;
namespace cricket {
-static const int kOpusBandwidthNb = 4000;
-static const int kOpusBandwidthMb = 6000;
-static const int kOpusBandwidthWb = 8000;
-static const int kOpusBandwidthSwb = 12000;
-static const int kOpusBandwidthFb = 20000;
-
#define WEBRTC_CHECK_CHANNEL(channel) \
if (channels_.find(channel) == channels_.end()) return -1;
#define WEBRTC_STUB(method, args) \
int method args override { return 0; }
-#define WEBRTC_STUB_CONST(method, args) \
- int method args const override { return 0; }
-
-#define WEBRTC_BOOL_STUB(method, args) \
- bool method args override { return true; }
-
-#define WEBRTC_VOID_STUB(method, args) \
- void method args override {}
-
#define WEBRTC_FUNC(method, args) int method args override
-class FakeWebRtcVoiceEngine
- : public webrtc::VoEBase, public webrtc::VoECodec {
+class FakeWebRtcVoiceEngine : public webrtc::VoEBase {
public:
struct Channel {
std::vector<webrtc::CodecInst> recv_codecs;
@@ -140,66 +115,6 @@ class FakeWebRtcVoiceEngine
WEBRTC_STUB(AssociateSendChannel, (int channel,
int accociate_send_channel));
- // webrtc::VoECodec
- WEBRTC_STUB(NumOfCodecs, ());
- WEBRTC_STUB(GetCodec, (int index, webrtc::CodecInst& codec));
- WEBRTC_STUB(SetSendCodec, (int channel, const webrtc::CodecInst& codec));
- WEBRTC_STUB(GetSendCodec, (int channel, webrtc::CodecInst& codec));
- WEBRTC_STUB(SetBitRate, (int channel, int bitrate_bps));
- WEBRTC_STUB(GetRecCodec, (int channel, webrtc::CodecInst& codec));
- WEBRTC_FUNC(SetRecPayloadType, (int channel,
- const webrtc::CodecInst& codec)) {
- WEBRTC_CHECK_CHANNEL(channel);
- Channel* ch = channels_[channel];
- // Check if something else already has this slot.
- if (codec.pltype != -1) {
- for (std::vector<webrtc::CodecInst>::iterator it =
- ch->recv_codecs.begin(); it != ch->recv_codecs.end(); ++it) {
- if (it->pltype == codec.pltype &&
- _stricmp(it->plname, codec.plname) != 0) {
- return -1;
- }
- }
- }
- // Otherwise try to find this codec and update its payload type.
- int result = -1; // not found
- for (std::vector<webrtc::CodecInst>::iterator it = ch->recv_codecs.begin();
- it != ch->recv_codecs.end(); ++it) {
- if (strcmp(it->plname, codec.plname) == 0 &&
- it->plfreq == codec.plfreq &&
- it->channels == codec.channels) {
- it->pltype = codec.pltype;
- result = 0;
- }
- }
- return result;
- }
- WEBRTC_STUB(SetSendCNPayloadType, (int channel, int type,
- webrtc::PayloadFrequencies frequency));
- WEBRTC_FUNC(GetRecPayloadType, (int channel, webrtc::CodecInst& codec)) {
- WEBRTC_CHECK_CHANNEL(channel);
- Channel* ch = channels_[channel];
- for (std::vector<webrtc::CodecInst>::iterator it = ch->recv_codecs.begin();
- it != ch->recv_codecs.end(); ++it) {
- if (strcmp(it->plname, codec.plname) == 0 &&
- it->plfreq == codec.plfreq &&
- it->channels == codec.channels &&
- it->pltype != -1) {
- codec.pltype = it->pltype;
- return 0;
- }
- }
- return -1; // not found
- }
- WEBRTC_STUB(SetVADStatus, (int channel, bool enable, webrtc::VadModes mode,
- bool disableDTX));
- WEBRTC_STUB(GetVADStatus, (int channel, bool& enabled,
- webrtc::VadModes& mode, bool& disabledDTX));
- WEBRTC_STUB(SetFECStatus, (int channel, bool enable));
- WEBRTC_STUB(GetFECStatus, (int channel, bool& enable));
- WEBRTC_STUB(SetOpusMaxPlaybackRate, (int channel, int frequency_hz));
- WEBRTC_STUB(SetOpusDtx, (int channel, bool enable_dtx));
-
size_t GetNetEqCapacity() const {
auto ch = channels_.find(last_channel_);
RTC_DCHECK(ch != channels_.end());
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698