WebRtcVoiceEngine: virtual to override + git cl format.
BUG= R=kwiberg@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/54369004 Cr-Commit-Position: refs/heads/master@{#9154}
This commit is contained in:
@@ -375,7 +375,7 @@ class WebRtcSoundclipMedia : public SoundclipMedia {
|
|||||||
engine_->RegisterSoundclip(this);
|
engine_->RegisterSoundclip(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~WebRtcSoundclipMedia() {
|
~WebRtcSoundclipMedia() override {
|
||||||
engine_->UnregisterSoundclip(this);
|
engine_->UnregisterSoundclip(this);
|
||||||
if (webrtc_channel_ != -1) {
|
if (webrtc_channel_ != -1) {
|
||||||
// We shouldn't have to call Disable() here. DeleteChannel() should call
|
// We shouldn't have to call Disable() here. DeleteChannel() should call
|
||||||
@@ -419,7 +419,7 @@ class WebRtcSoundclipMedia : public SoundclipMedia {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlaySound(const char *buf, int len, int flags) {
|
bool PlaySound(const char* buf, int len, int flags) override {
|
||||||
// The voe file api is not available in chrome.
|
// The voe file api is not available in chrome.
|
||||||
if (!engine_->voe_sc()->file()) {
|
if (!engine_->voe_sc()->file()) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1796,9 +1796,7 @@ class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer
|
|||||||
voe_audio_transport_(voe_audio_transport),
|
voe_audio_transport_(voe_audio_transport),
|
||||||
renderer_(NULL) {
|
renderer_(NULL) {
|
||||||
}
|
}
|
||||||
virtual ~WebRtcVoiceChannelRenderer() {
|
~WebRtcVoiceChannelRenderer() override { Stop(); }
|
||||||
Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Starts the rendering by setting a sink to the renderer to get data
|
// Starts the rendering by setting a sink to the renderer to get data
|
||||||
// callback.
|
// callback.
|
||||||
|
|||||||
@@ -337,56 +337,58 @@ class WebRtcVoiceMediaChannel
|
|||||||
: public WebRtcMediaChannel<VoiceMediaChannel, WebRtcVoiceEngine> {
|
: public WebRtcMediaChannel<VoiceMediaChannel, WebRtcVoiceEngine> {
|
||||||
public:
|
public:
|
||||||
explicit WebRtcVoiceMediaChannel(WebRtcVoiceEngine *engine);
|
explicit WebRtcVoiceMediaChannel(WebRtcVoiceEngine *engine);
|
||||||
virtual ~WebRtcVoiceMediaChannel();
|
~WebRtcVoiceMediaChannel() override;
|
||||||
virtual bool SetOptions(const AudioOptions& options);
|
bool SetOptions(const AudioOptions& options) override;
|
||||||
virtual bool GetOptions(AudioOptions* options) const {
|
bool GetOptions(AudioOptions* options) const override {
|
||||||
*options = options_;
|
*options = options_;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool SetRecvCodecs(const std::vector<AudioCodec> &codecs);
|
bool SetRecvCodecs(const std::vector<AudioCodec>& codecs) override;
|
||||||
virtual bool SetSendCodecs(const std::vector<AudioCodec> &codecs);
|
bool SetSendCodecs(const std::vector<AudioCodec>& codecs) override;
|
||||||
virtual bool SetRecvRtpHeaderExtensions(
|
bool SetRecvRtpHeaderExtensions(
|
||||||
const std::vector<RtpHeaderExtension>& extensions);
|
const std::vector<RtpHeaderExtension>& extensions) override;
|
||||||
virtual bool SetSendRtpHeaderExtensions(
|
bool SetSendRtpHeaderExtensions(
|
||||||
const std::vector<RtpHeaderExtension>& extensions);
|
const std::vector<RtpHeaderExtension>& extensions) override;
|
||||||
virtual bool SetPlayout(bool playout);
|
bool SetPlayout(bool playout) override;
|
||||||
bool PausePlayout();
|
bool PausePlayout();
|
||||||
bool ResumePlayout();
|
bool ResumePlayout();
|
||||||
virtual bool SetSend(SendFlags send);
|
bool SetSend(SendFlags send) override;
|
||||||
bool PauseSend();
|
bool PauseSend();
|
||||||
bool ResumeSend();
|
bool ResumeSend();
|
||||||
virtual bool AddSendStream(const StreamParams& sp);
|
bool AddSendStream(const StreamParams& sp) override;
|
||||||
virtual bool RemoveSendStream(uint32 ssrc);
|
bool RemoveSendStream(uint32 ssrc) override;
|
||||||
virtual bool AddRecvStream(const StreamParams& sp);
|
bool AddRecvStream(const StreamParams& sp) override;
|
||||||
virtual bool RemoveRecvStream(uint32 ssrc);
|
bool RemoveRecvStream(uint32 ssrc) override;
|
||||||
virtual bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer);
|
bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) override;
|
||||||
virtual bool SetLocalRenderer(uint32 ssrc, AudioRenderer* renderer);
|
bool SetLocalRenderer(uint32 ssrc, AudioRenderer* renderer) override;
|
||||||
virtual bool GetActiveStreams(AudioInfo::StreamList* actives);
|
bool GetActiveStreams(AudioInfo::StreamList* actives) override;
|
||||||
virtual int GetOutputLevel();
|
int GetOutputLevel() override;
|
||||||
virtual int GetTimeSinceLastTyping();
|
int GetTimeSinceLastTyping() override;
|
||||||
virtual void SetTypingDetectionParameters(int time_window,
|
void SetTypingDetectionParameters(int time_window,
|
||||||
int cost_per_typing, int reporting_threshold, int penalty_decay,
|
int cost_per_typing,
|
||||||
int type_event_delay);
|
int reporting_threshold,
|
||||||
virtual bool SetOutputScaling(uint32 ssrc, double left, double right);
|
int penalty_decay,
|
||||||
virtual bool GetOutputScaling(uint32 ssrc, double* left, double* right);
|
int type_event_delay) override;
|
||||||
|
bool SetOutputScaling(uint32 ssrc, double left, double right) override;
|
||||||
|
bool GetOutputScaling(uint32 ssrc, double* left, double* right) override;
|
||||||
|
|
||||||
virtual bool SetRingbackTone(const char *buf, int len);
|
bool SetRingbackTone(const char* buf, int len) override;
|
||||||
virtual bool PlayRingbackTone(uint32 ssrc, bool play, bool loop);
|
bool PlayRingbackTone(uint32 ssrc, bool play, bool loop) override;
|
||||||
virtual bool CanInsertDtmf();
|
bool CanInsertDtmf() override;
|
||||||
virtual bool InsertDtmf(uint32 ssrc, int event, int duration, int flags);
|
bool InsertDtmf(uint32 ssrc, int event, int duration, int flags) override;
|
||||||
|
|
||||||
virtual void OnPacketReceived(rtc::Buffer* packet,
|
void OnPacketReceived(rtc::Buffer* packet,
|
||||||
const rtc::PacketTime& packet_time);
|
const rtc::PacketTime& packet_time) override;
|
||||||
virtual void OnRtcpReceived(rtc::Buffer* packet,
|
void OnRtcpReceived(rtc::Buffer* packet,
|
||||||
const rtc::PacketTime& packet_time);
|
const rtc::PacketTime& packet_time) override;
|
||||||
virtual void OnReadyToSend(bool ready) {}
|
void OnReadyToSend(bool ready) override {}
|
||||||
virtual bool MuteStream(uint32 ssrc, bool on);
|
bool MuteStream(uint32 ssrc, bool on) override;
|
||||||
virtual bool SetMaxSendBandwidth(int bps);
|
bool SetMaxSendBandwidth(int bps) override;
|
||||||
virtual bool GetStats(VoiceMediaInfo* info);
|
bool GetStats(VoiceMediaInfo* info) override;
|
||||||
// Gets last reported error from WebRtc voice engine. This should be only
|
// Gets last reported error from WebRtc voice engine. This should be only
|
||||||
// called in response a failure.
|
// called in response a failure.
|
||||||
virtual void GetLastMediaError(uint32* ssrc,
|
void GetLastMediaError(uint32* ssrc,
|
||||||
VoiceMediaChannel::Error* error);
|
VoiceMediaChannel::Error* error) override;
|
||||||
bool FindSsrc(int channel_num, uint32* ssrc);
|
bool FindSsrc(int channel_num, uint32* ssrc);
|
||||||
void OnError(uint32 ssrc, int error);
|
void OnError(uint32 ssrc, int error);
|
||||||
|
|
||||||
|
|||||||
@@ -87,16 +87,12 @@ class FakeVoEWrapper : public cricket::VoEWrapper {
|
|||||||
|
|
||||||
class FakeVoETraceWrapper : public cricket::VoETraceWrapper {
|
class FakeVoETraceWrapper : public cricket::VoETraceWrapper {
|
||||||
public:
|
public:
|
||||||
virtual int SetTraceFilter(const unsigned int filter) {
|
int SetTraceFilter(const unsigned int filter) override {
|
||||||
filter_ = filter;
|
filter_ = filter;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual int SetTraceFile(const char* fileNameUTF8) {
|
int SetTraceFile(const char* fileNameUTF8) override { return 0; }
|
||||||
return 0;
|
int SetTraceCallback(webrtc::TraceCallback* callback) override { return 0; }
|
||||||
}
|
|
||||||
virtual int SetTraceCallback(webrtc::TraceCallback* callback) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
unsigned int filter_;
|
unsigned int filter_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,7 +168,7 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
|
|||||||
rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len);
|
rtc::Buffer packet(reinterpret_cast<const uint8_t*>(data), len);
|
||||||
channel_->OnPacketReceived(&packet, rtc::PacketTime());
|
channel_->OnPacketReceived(&packet, rtc::PacketTime());
|
||||||
}
|
}
|
||||||
virtual void TearDown() {
|
void TearDown() override {
|
||||||
delete soundclip_;
|
delete soundclip_;
|
||||||
delete channel_;
|
delete channel_;
|
||||||
engine_.Terminate();
|
engine_.Terminate();
|
||||||
|
|||||||
Reference in New Issue
Block a user