OLD | NEW |
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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 channel_manager_->DestroyVideoChannel(video_channel_.release()); | 583 channel_manager_->DestroyVideoChannel(video_channel_.release()); |
584 } | 584 } |
585 if (voice_channel_) { | 585 if (voice_channel_) { |
586 SignalVoiceChannelDestroyed(); | 586 SignalVoiceChannelDestroyed(); |
587 channel_manager_->DestroyVoiceChannel(voice_channel_.release()); | 587 channel_manager_->DestroyVoiceChannel(voice_channel_.release()); |
588 } | 588 } |
589 if (data_channel_) { | 589 if (data_channel_) { |
590 SignalDataChannelDestroyed(); | 590 SignalDataChannelDestroyed(); |
591 channel_manager_->DestroyDataChannel(data_channel_.release()); | 591 channel_manager_->DestroyDataChannel(data_channel_.release()); |
592 } | 592 } |
| 593 SignalDestroyed(); |
593 | 594 |
594 LOG(LS_INFO) << "Session: " << id() << " is destroyed."; | 595 LOG(LS_INFO) << "Session: " << id() << " is destroyed."; |
595 } | 596 } |
596 | 597 |
597 bool WebRtcSession::Initialize( | 598 bool WebRtcSession::Initialize( |
598 const PeerConnectionFactoryInterface::Options& options, | 599 const PeerConnectionFactoryInterface::Options& options, |
599 const MediaConstraintsInterface* constraints, | 600 const MediaConstraintsInterface* constraints, |
600 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 601 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
601 const PeerConnectionInterface::RTCConfiguration& rtc_configuration) { | 602 const PeerConnectionInterface::RTCConfiguration& rtc_configuration) { |
602 bundle_policy_ = rtc_configuration.bundle_policy; | 603 bundle_policy_ = rtc_configuration.bundle_policy; |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 return false; | 1422 return false; |
1422 } | 1423 } |
1423 if (!voice_channel_->InsertDtmf(send_ssrc, code, duration)) { | 1424 if (!voice_channel_->InsertDtmf(send_ssrc, code, duration)) { |
1424 LOG(LS_ERROR) << "Failed to insert DTMF to channel."; | 1425 LOG(LS_ERROR) << "Failed to insert DTMF to channel."; |
1425 return false; | 1426 return false; |
1426 } | 1427 } |
1427 return true; | 1428 return true; |
1428 } | 1429 } |
1429 | 1430 |
1430 sigslot::signal0<>* WebRtcSession::GetOnDestroyedSignal() { | 1431 sigslot::signal0<>* WebRtcSession::GetOnDestroyedSignal() { |
1431 return &SignalVoiceChannelDestroyed; | 1432 return &SignalDestroyed; |
1432 } | 1433 } |
1433 | 1434 |
1434 bool WebRtcSession::SendData(const cricket::SendDataParams& params, | 1435 bool WebRtcSession::SendData(const cricket::SendDataParams& params, |
1435 const rtc::Buffer& payload, | 1436 const rtc::Buffer& payload, |
1436 cricket::SendDataResult* result) { | 1437 cricket::SendDataResult* result) { |
1437 if (!data_channel_) { | 1438 if (!data_channel_) { |
1438 LOG(LS_ERROR) << "SendData called when data_channel_ is NULL."; | 1439 LOG(LS_ERROR) << "SendData called when data_channel_ is NULL."; |
1439 return false; | 1440 return false; |
1440 } | 1441 } |
1441 return data_channel_->SendData(params, payload, result); | 1442 return data_channel_->SendData(params, payload, result); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 } | 2205 } |
2205 } | 2206 } |
2206 | 2207 |
2207 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, | 2208 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, |
2208 const rtc::SentPacket& sent_packet) { | 2209 const rtc::SentPacket& sent_packet) { |
2209 RTC_DCHECK(worker_thread()->IsCurrent()); | 2210 RTC_DCHECK(worker_thread()->IsCurrent()); |
2210 media_controller_->call_w()->OnSentPacket(sent_packet); | 2211 media_controller_->call_w()->OnSentPacket(sent_packet); |
2211 } | 2212 } |
2212 | 2213 |
2213 } // namespace webrtc | 2214 } // namespace webrtc |
OLD | NEW |