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

Unified Diff: content/renderer/media/media_stream_center.cc

Issue 10834137: Use empty string as the mid before it's ready from WebKit. Label is not the correct mid, so we shou… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_center.cc
===================================================================
--- content/renderer/media/media_stream_center.cc (revision 149634)
+++ content/renderer/media/media_stream_center.cc (working copy)
@@ -147,8 +147,10 @@
LOG(ERROR) << "Invalid candidate label: " << UTF16ToUTF8(candidate.label());
return WebKit::WebString();
}
+ // TODO(ronghuawu): Get sdp_mid from WebKit when is available.
+ const std::string sdp_mid = "";
wjia(left Chromium) 2012/08/02 22:09:20 std::string's default ctor make it an empty string
Ronghua Wu (Left Chromium) 2012/08/02 22:14:48 Was thinking maybe it's easier to read - people wo
scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
- webrtc::CreateIceCandidate(UTF16ToUTF8(candidate.label()),
+ webrtc::CreateIceCandidate(sdp_mid,
m_line_index,
UTF16ToUTF8(candidate.candidateLine())));
std::string sdp;
@@ -172,11 +174,16 @@
<< UTF16ToUTF8(candidate.label());
continue;
}
+ // TODO(ronghuawu): Get sdp_mid from WebKit when is available.
+ const std::string sdp_mid = "";
wjia(left Chromium) 2012/08/02 22:09:20 ditto.
Ronghua Wu (Left Chromium) 2012/08/02 22:14:48 Done.
scoped_ptr<webrtc::IceCandidateInterface> native_candidate(
- webrtc::CreateIceCandidate(UTF16ToUTF8(candidate.label()),
+ webrtc::CreateIceCandidate(sdp_mid,
m_line_index,
UTF16ToUTF8(candidate.candidateLine())));
- native_desc->AddCandidate(native_candidate.get());
+ if (!native_desc->AddCandidate(native_candidate.get())) {
+ LOG(ERROR) << "Failed to add candidate to SessionDescription.";
+ continue;
+ }
}
std::string sdp;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698