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

Unified Diff: webrtc/pc/dtmfsender.cc

Issue 2666853002: Move DTMF sender to RtpSender (as opposed to WebRtcSession). (Closed)
Patch Set: Merge with master Created 3 years, 11 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/pc/dtmfsender.h ('k') | webrtc/pc/dtmfsender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/dtmfsender.cc
diff --git a/webrtc/pc/dtmfsender.cc b/webrtc/pc/dtmfsender.cc
index 2ef921bdc14eb9b95dcdeabecbd0a277a4229027..bbb100ea61789d3b295170131793af258c8ec3cb 100644
--- a/webrtc/pc/dtmfsender.cc
+++ b/webrtc/pc/dtmfsender.cc
@@ -63,8 +63,8 @@ rtc::scoped_refptr<DtmfSender> DtmfSender::Create(
AudioTrackInterface* track,
rtc::Thread* signaling_thread,
DtmfProviderInterface* provider) {
- if (!track || !signaling_thread) {
- return NULL;
+ if (!signaling_thread) {
+ return nullptr;
}
rtc::scoped_refptr<DtmfSender> dtmf_sender(
new rtc::RefCountedObject<DtmfSender>(track, signaling_thread,
@@ -81,7 +81,6 @@ DtmfSender::DtmfSender(AudioTrackInterface* track,
provider_(provider),
duration_(kDtmfDefaultDurationMs),
inter_tone_gap_(kDtmfDefaultGapMs) {
- RTC_DCHECK(track_ != NULL);
RTC_DCHECK(signaling_thread_ != NULL);
// TODO(deadbeef): Once we can use shared_ptr and weak_ptr,
// do that instead of relying on a "destroyed" signal.
@@ -109,7 +108,7 @@ bool DtmfSender::CanInsertDtmf() {
if (!provider_) {
return false;
}
- return provider_->CanInsertDtmf(track_->id());
+ return provider_->CanInsertDtmf();
}
bool DtmfSender::InsertDtmf(const std::string& tones, int duration,
@@ -206,7 +205,7 @@ void DtmfSender::DoInsertDtmf() {
}
// The provider starts playout of the given tone on the
// associated RTP media stream, using the appropriate codec.
- if (!provider_->InsertDtmf(track_->id(), code, duration_)) {
+ if (!provider_->InsertDtmf(code, duration_)) {
LOG(LS_ERROR) << "The DtmfProvider can no longer send DTMF.";
return;
}
« no previous file with comments | « webrtc/pc/dtmfsender.h ('k') | webrtc/pc/dtmfsender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698