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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 642 } |
643 | 643 |
644 void PeerConnection::PostSetSessionDescriptionFailure( | 644 void PeerConnection::PostSetSessionDescriptionFailure( |
645 SetSessionDescriptionObserver* observer, | 645 SetSessionDescriptionObserver* observer, |
646 const std::string& error) { | 646 const std::string& error) { |
647 SetSessionDescriptionMsg* msg = new SetSessionDescriptionMsg(observer); | 647 SetSessionDescriptionMsg* msg = new SetSessionDescriptionMsg(observer); |
648 msg->error = error; | 648 msg->error = error; |
649 signaling_thread()->Post(this, MSG_SET_SESSIONDESCRIPTION_FAILED, msg); | 649 signaling_thread()->Post(this, MSG_SET_SESSIONDESCRIPTION_FAILED, msg); |
650 } | 650 } |
651 | 651 |
652 void PeerConnection::SetIceConnectionReceivingTimeout(int timeout_ms) { | |
653 session_->SetIceConnectionReceivingTimeout(timeout_ms); | |
654 } | |
655 | |
656 bool PeerConnection::UpdateIce(const IceServers& configuration, | 652 bool PeerConnection::UpdateIce(const IceServers& configuration, |
657 const MediaConstraintsInterface* constraints) { | 653 const MediaConstraintsInterface* constraints) { |
658 return false; | 654 return false; |
659 } | 655 } |
660 | 656 |
661 bool PeerConnection::UpdateIce(const RTCConfiguration& config) { | 657 bool PeerConnection::UpdateIce(const RTCConfiguration& config) { |
662 if (port_allocator_) { | 658 if (port_allocator_) { |
663 std::vector<PortAllocatorFactoryInterface::StunConfiguration> stuns; | 659 std::vector<PortAllocatorFactoryInterface::StunConfiguration> stuns; |
664 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turns; | 660 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turns; |
665 if (!ParseIceServers(config.servers, &stuns, &turns)) { | 661 if (!ParseIceServers(config.servers, &stuns, &turns)) { |
(...skipping 23 matching lines...) Expand all Loading... |
689 relay_server.credentials = credentials; | 685 relay_server.credentials = credentials; |
690 LOG(LS_INFO) << "UpdateIce: TurnServer Address: " | 686 LOG(LS_INFO) << "UpdateIce: TurnServer Address: " |
691 << turns[i].server.ToString(); | 687 << turns[i].server.ToString(); |
692 } else { | 688 } else { |
693 LOG(LS_WARNING) << "Ignoring TURN server " << turns[i].server << ". " | 689 LOG(LS_WARNING) << "Ignoring TURN server " << turns[i].server << ". " |
694 << "Reason= Incorrect " << turns[i].transport_type | 690 << "Reason= Incorrect " << turns[i].transport_type |
695 << " transport parameter."; | 691 << " transport parameter."; |
696 } | 692 } |
697 } | 693 } |
698 } | 694 } |
| 695 session_->SetIceConnectionReceivingTimeout( |
| 696 config.ice_connection_receiving_timeout); |
699 return session_->SetIceTransports(config.type); | 697 return session_->SetIceTransports(config.type); |
700 } | 698 } |
701 | 699 |
702 bool PeerConnection::AddIceCandidate( | 700 bool PeerConnection::AddIceCandidate( |
703 const IceCandidateInterface* ice_candidate) { | 701 const IceCandidateInterface* ice_candidate) { |
704 return session_->ProcessIceMessage(ice_candidate); | 702 return session_->ProcessIceMessage(ice_candidate); |
705 } | 703 } |
706 | 704 |
707 void PeerConnection::RegisterUMAObserver(UMAObserver* observer) { | 705 void PeerConnection::RegisterUMAObserver(UMAObserver* observer) { |
708 uma_observer_ = observer; | 706 uma_observer_ = observer; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 if (ice_gathering_state_ != kIceGatheringComplete) { | 902 if (ice_gathering_state_ != kIceGatheringComplete) { |
905 ice_gathering_state_ = kIceGatheringComplete; | 903 ice_gathering_state_ = kIceGatheringComplete; |
906 observer_->OnIceGatheringChange(ice_gathering_state_); | 904 observer_->OnIceGatheringChange(ice_gathering_state_); |
907 } | 905 } |
908 } | 906 } |
909 observer_->OnSignalingChange(signaling_state_); | 907 observer_->OnSignalingChange(signaling_state_); |
910 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); | 908 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); |
911 } | 909 } |
912 | 910 |
913 } // namespace webrtc | 911 } // namespace webrtc |
OLD | NEW |