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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 1782053002: Relanding https://codereview.webrtc.org/1715883002/ in pieces. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 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 | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index 11af45edc837fb8f94eb9da43edf9ba2be86dde9..25ecca1d74ad4bbf98e5539b99df9b6866a90d74 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -47,6 +47,8 @@
namespace webrtc {
namespace voe {
+const int kTelephoneEventAttenuationdB = 10;
+
class TransportFeedbackProxy : public TransportFeedbackObserver {
public:
TransportFeedbackProxy() : feedback_observer_(nullptr) {
@@ -2212,21 +2214,21 @@ int Channel::GetChannelOutputVolumeScaling(float& scaling) const {
return 0;
}
-int Channel::SendTelephoneEventOutband(unsigned char eventCode,
- int lengthMs,
- int attenuationDb,
- bool playDtmfEvent) {
+int Channel::SendTelephoneEventOutband(int event, int duration_ms) {
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
- "Channel::SendTelephoneEventOutband(..., playDtmfEvent=%d)",
- playDtmfEvent);
+ "Channel::SendTelephoneEventOutband(...)");
+ RTC_DCHECK_LE(0, event);
+ RTC_DCHECK_GE(255, event);
+ RTC_DCHECK_LE(0, duration_ms);
+ RTC_DCHECK_GE(65535, duration_ms);
if (!Sending()) {
return -1;
}
- _playOutbandDtmfEvent = playDtmfEvent;
+ _playOutbandDtmfEvent = false;
- if (_rtpRtcpModule->SendTelephoneEventOutband(eventCode, lengthMs,
- attenuationDb) != 0) {
+ if (_rtpRtcpModule->SendTelephoneEventOutband(
+ event, duration_ms, kTelephoneEventAttenuationdB) != 0) {
_engineStatisticsPtr->SetLastError(
VE_SEND_DTMF_FAILED, kTraceWarning,
"SendTelephoneEventOutband() failed to send event");
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698