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

Side by Side Diff: talk/app/webrtc/webrtcsession.cc

Issue 1487393002: Refactor WVoE DTMF handling #1 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 if (!voice_channel_) { 1396 if (!voice_channel_) {
1397 LOG(LS_ERROR) << "InsertDtmf: No audio channel exists."; 1397 LOG(LS_ERROR) << "InsertDtmf: No audio channel exists.";
1398 return false; 1398 return false;
1399 } 1399 }
1400 uint32_t send_ssrc = 0; 1400 uint32_t send_ssrc = 0;
1401 if (!VERIFY(local_desc_ && GetAudioSsrcByTrackId(local_desc_->description(), 1401 if (!VERIFY(local_desc_ && GetAudioSsrcByTrackId(local_desc_->description(),
1402 track_id, &send_ssrc))) { 1402 track_id, &send_ssrc))) {
1403 LOG(LS_ERROR) << "InsertDtmf: Track does not exist: " << track_id; 1403 LOG(LS_ERROR) << "InsertDtmf: Track does not exist: " << track_id;
1404 return false; 1404 return false;
1405 } 1405 }
1406 if (!voice_channel_->InsertDtmf(send_ssrc, code, duration, 1406 if (!voice_channel_->InsertDtmf(send_ssrc, code, duration)) {
1407 cricket::DF_SEND)) {
1408 LOG(LS_ERROR) << "Failed to insert DTMF to channel."; 1407 LOG(LS_ERROR) << "Failed to insert DTMF to channel.";
1409 return false; 1408 return false;
1410 } 1409 }
1411 return true; 1410 return true;
1412 } 1411 }
1413 1412
1414 sigslot::signal0<>* WebRtcSession::GetOnDestroyedSignal() { 1413 sigslot::signal0<>* WebRtcSession::GetOnDestroyedSignal() {
1415 return &SignalVoiceChannelDestroyed; 1414 return &SignalVoiceChannelDestroyed;
1416 } 1415 }
1417 1416
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 } 2187 }
2189 } 2188 }
2190 2189
2191 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2190 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2192 const rtc::SentPacket& sent_packet) { 2191 const rtc::SentPacket& sent_packet) {
2193 RTC_DCHECK(worker_thread()->IsCurrent()); 2192 RTC_DCHECK(worker_thread()->IsCurrent());
2194 media_controller_->call_w()->OnSentPacket(sent_packet); 2193 media_controller_->call_w()->OnSentPacket(sent_packet);
2195 } 2194 }
2196 2195
2197 } // namespace webrtc 2196 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698