OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 } | 1267 } |
1268 | 1268 |
1269 bool WebRtcSession::InsertDtmf(const std::string& track_id, | 1269 bool WebRtcSession::InsertDtmf(const std::string& track_id, |
1270 int code, int duration) { | 1270 int code, int duration) { |
1271 RTC_DCHECK(signaling_thread()->IsCurrent()); | 1271 RTC_DCHECK(signaling_thread()->IsCurrent()); |
1272 if (!voice_channel_) { | 1272 if (!voice_channel_) { |
1273 LOG(LS_ERROR) << "InsertDtmf: No audio channel exists."; | 1273 LOG(LS_ERROR) << "InsertDtmf: No audio channel exists."; |
1274 return false; | 1274 return false; |
1275 } | 1275 } |
1276 uint32_t send_ssrc = 0; | 1276 uint32_t send_ssrc = 0; |
1277 if (!VERIFY(local_description() && | 1277 if (!(local_description() && |
1278 GetAudioSsrcByTrackId(local_description()->description(), | 1278 GetAudioSsrcByTrackId(local_description()->description(), |
1279 track_id, &send_ssrc))) { | 1279 track_id, &send_ssrc))) { |
1280 LOG(LS_ERROR) << "InsertDtmf: Track does not exist: " << track_id; | 1280 LOG(LS_ERROR) << "InsertDtmf: Track does not exist: " << track_id; |
1281 return false; | 1281 return false; |
1282 } | 1282 } |
1283 if (!voice_channel_->InsertDtmf(send_ssrc, code, duration)) { | 1283 if (!voice_channel_->InsertDtmf(send_ssrc, code, duration)) { |
1284 LOG(LS_ERROR) << "Failed to insert DTMF to channel."; | 1284 LOG(LS_ERROR) << "Failed to insert DTMF to channel."; |
1285 return false; | 1285 return false; |
1286 } | 1286 } |
1287 return true; | 1287 return true; |
1288 } | 1288 } |
1289 | 1289 |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2425 (rtp_data_channel_->rtcp_dtls_transport() != nullptr); | 2425 (rtp_data_channel_->rtcp_dtls_transport() != nullptr); |
2426 channel_manager_->DestroyRtpDataChannel(rtp_data_channel_.release()); | 2426 channel_manager_->DestroyRtpDataChannel(rtp_data_channel_.release()); |
2427 transport_controller_->DestroyDtlsTransport( | 2427 transport_controller_->DestroyDtlsTransport( |
2428 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTP); | 2428 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTP); |
2429 if (need_to_delete_rtcp) { | 2429 if (need_to_delete_rtcp) { |
2430 transport_controller_->DestroyDtlsTransport( | 2430 transport_controller_->DestroyDtlsTransport( |
2431 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTCP); | 2431 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTCP); |
2432 } | 2432 } |
2433 } | 2433 } |
2434 } // namespace webrtc | 2434 } // namespace webrtc |
OLD | NEW |