summaryrefslogtreecommitdiffstats
path: root/content/renderer/media/rtc_peer_connection_handler.cc
diff options
context:
space:
mode:
authormallinath@chromium.org <mallinath@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-15 19:36:59 +0000
committermallinath@chromium.org <mallinath@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-15 19:36:59 +0000
commit3c61b0632c0eb82923e22494f5c5ac8dd1b9177a (patch)
treed0f63cc617257b39077f39dd03f5f768f558d56c /content/renderer/media/rtc_peer_connection_handler.cc
parent3bed530a103bf950a9a22be913622565afe10d36 (diff)
downloadchromium_src-3c61b0632c0eb82923e22494f5c5ac8dd1b9177a.zip
chromium_src-3c61b0632c0eb82923e22494f5c5ac8dd1b9177a.tar.gz
chromium_src-3c61b0632c0eb82923e22494f5c5ac8dd1b9177a.tar.bz2
Generate a NULL ICE candidate after ice gathering is completed.
BUG=http://code.google.com/p/webrtc/issues/detail?id=1393 Review URL: https://chromiumcodereview.appspot.com/12254035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media/rtc_peer_connection_handler.cc')
-rw-r--r--content/renderer/media/rtc_peer_connection_handler.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 75f6d5f..0841139 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -662,9 +662,19 @@ void RTCPeerConnectionHandler::OnIceConnectionChange(
// Called any time the IceGatheringState changes
void RTCPeerConnectionHandler::OnIceGatheringChange(
webrtc::PeerConnectionInterface::IceGatheringState new_state) {
+ if (new_state == webrtc::PeerConnectionInterface::kIceGatheringComplete) {
+ // If ICE gathering is completed, generate a NULL ICE candidate,
+ // to signal end of candidates.
+ WebKit::WebRTCICECandidate null_candidate;
+ client_->didGenerateICECandidate(null_candidate);
+ // Adding ice complete state to the tracker.
+ if (peer_connection_tracker_) {
+ peer_connection_tracker_->TrackOnIceComplete(this);
+ }
+ }
+
WebKit::WebRTCPeerConnectionHandlerClient::ICEGatheringState state =
GetWebKitIceGatheringState(new_state);
- // TODO(perkj): Add new ice gathering state to the tracker.
client_->didChangeICEGatheringState(state);
}