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

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

Issue 60193002: Revert 232766 "Refactor MediaStreamManager to never output real ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 7 years, 1 month 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
Index: content/renderer/media/media_stream_impl.cc
===================================================================
--- content/renderer/media/media_stream_impl.cc (revision 232998)
+++ content/renderer/media/media_stream_impl.cc (working copy)
@@ -419,6 +419,12 @@
WebKit::WebVector<WebKit::WebMediaStreamSource>& webkit_sources) {
CHECK_EQ(devices.size(), webkit_sources.size());
for (size_t i = 0; i < devices.size(); ++i) {
+ const char* track_type =
+ (type == WebKit::WebMediaStreamSource::TypeAudio) ? "a" : "v";
+ std::string source_id = base::StringPrintf("%s%s%u", label.c_str(),
+ track_type,
+ static_cast<unsigned int>(i));
+
const WebKit::WebMediaStreamSource* existing_source =
FindLocalSource(devices[i]);
if (existing_source) {
@@ -428,7 +434,7 @@
continue;
}
webkit_sources[i].initialize(
- UTF8ToUTF16(devices[i].device.id),
+ UTF8ToUTF16(source_id),
type,
UTF8ToUTF16(devices[i].device.name));
MediaStreamSourceExtraData* source_extra_data(
@@ -524,7 +530,7 @@
it->source.extraData());
const StreamDeviceInfo& active_device = extra_data->device_info();
if (active_device.device.id == device.device.id &&
- active_device.device.type == device.device.type) {
+ active_device.session_id == device.session_id) {
return &it->source;
}
}
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/renderer/media/mock_media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698