Remove unused methods in WebRtcVoiceEngine and VoiceMediaChannel.
These methods relate to typing detection but are not used anymore. Typing detection is enabled through the VoiceDetection module on the APM. BUG=webrtc:4690 Review-Url: https://codereview.webrtc.org/2684933008 Cr-Commit-Position: refs/heads/master@{#16527}
This commit is contained in:
parent
654d54c073
commit
55c5be0a03
@ -304,7 +304,7 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
|
||||
};
|
||||
explicit FakeVoiceMediaChannel(FakeVoiceEngine* engine,
|
||||
const AudioOptions& options)
|
||||
: engine_(engine), time_since_last_typing_(-1), max_bps_(-1) {
|
||||
: engine_(engine), max_bps_(-1) {
|
||||
output_scalings_[0] = 1.0; // For default channel.
|
||||
SetOptions(options);
|
||||
}
|
||||
@ -366,11 +366,6 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
|
||||
|
||||
virtual bool GetActiveStreams(AudioInfo::StreamList* streams) { return true; }
|
||||
virtual int GetOutputLevel() { return 0; }
|
||||
void set_time_since_last_typing(int ms) { time_since_last_typing_ = ms; }
|
||||
virtual int GetTimeSinceLastTyping() { return time_since_last_typing_; }
|
||||
virtual void SetTypingDetectionParameters(
|
||||
int time_window, int cost_per_typing, int reporting_threshold,
|
||||
int penalty_decay, int type_event_delay) {}
|
||||
|
||||
virtual bool CanInsertDtmf() {
|
||||
for (std::vector<AudioCodec>::const_iterator it = send_codecs_.begin();
|
||||
@ -488,7 +483,6 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
|
||||
std::vector<AudioCodec> send_codecs_;
|
||||
std::map<uint32_t, double> output_scalings_;
|
||||
std::vector<DtmfInfo> dtmf_info_queue_;
|
||||
int time_since_last_typing_;
|
||||
AudioOptions options_;
|
||||
std::map<uint32_t, VoiceChannelAudioSink*> local_sinks_;
|
||||
std::unique_ptr<webrtc::AudioSinkInterface> sink_;
|
||||
|
||||
@ -991,12 +991,6 @@ class VoiceMediaChannel : public MediaChannel {
|
||||
virtual bool GetActiveStreams(AudioInfo::StreamList* actives) = 0;
|
||||
// Get the current energy level of the stream sent to the speaker.
|
||||
virtual int GetOutputLevel() = 0;
|
||||
// Get the time in milliseconds since last recorded keystroke, or negative.
|
||||
virtual int GetTimeSinceLastTyping() = 0;
|
||||
// Temporarily exposed field for tuning typing detect options.
|
||||
virtual void SetTypingDetectionParameters(int time_window,
|
||||
int cost_per_typing, int reporting_threshold, int penalty_decay,
|
||||
int type_event_delay) = 0;
|
||||
// Set speaker output volume of the specified ssrc.
|
||||
virtual bool SetOutputVolume(uint32_t ssrc, double volume) = 0;
|
||||
// Returns if the telephone-event has been negotiated.
|
||||
|
||||
@ -2405,31 +2405,6 @@ int WebRtcVoiceMediaChannel::GetOutputLevel() {
|
||||
return highest;
|
||||
}
|
||||
|
||||
int WebRtcVoiceMediaChannel::GetTimeSinceLastTyping() {
|
||||
int ret;
|
||||
if (engine()->voe()->processing()->TimeSinceLastTyping(ret) == -1) {
|
||||
// In case of error, log the info and continue
|
||||
LOG_RTCERR0(TimeSinceLastTyping);
|
||||
ret = -1;
|
||||
} else {
|
||||
ret *= 1000; // We return ms, webrtc returns seconds.
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void WebRtcVoiceMediaChannel::SetTypingDetectionParameters(int time_window,
|
||||
int cost_per_typing, int reporting_threshold, int penalty_decay,
|
||||
int type_event_delay) {
|
||||
if (engine()->voe()->processing()->SetTypingDetectionParameters(
|
||||
time_window, cost_per_typing,
|
||||
reporting_threshold, penalty_decay, type_event_delay) == -1) {
|
||||
// In case of error, log the info and continue
|
||||
LOG_RTCERR5(SetTypingDetectionParameters, time_window,
|
||||
cost_per_typing, reporting_threshold, penalty_decay,
|
||||
type_event_delay);
|
||||
}
|
||||
}
|
||||
|
||||
bool WebRtcVoiceMediaChannel::SetOutputVolume(uint32_t ssrc, double volume) {
|
||||
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
|
||||
if (ssrc == 0) {
|
||||
|
||||
@ -183,12 +183,6 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
|
||||
bool RemoveRecvStream(uint32_t ssrc) override;
|
||||
bool GetActiveStreams(AudioInfo::StreamList* actives) override;
|
||||
int GetOutputLevel() override;
|
||||
int GetTimeSinceLastTyping() override;
|
||||
void SetTypingDetectionParameters(int time_window,
|
||||
int cost_per_typing,
|
||||
int reporting_threshold,
|
||||
int penalty_decay,
|
||||
int type_event_delay) override;
|
||||
bool SetOutputVolume(uint32_t ssrc, double volume) override;
|
||||
|
||||
bool CanInsertDtmf() override;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user