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

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

Issue 2710213005: Revert of Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Created 3 years, 10 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
Index: content/renderer/media/webmediaplayer_ms_compositor.cc
diff --git a/content/renderer/media/webmediaplayer_ms_compositor.cc b/content/renderer/media/webmediaplayer_ms_compositor.cc
index 35d39d159b4729357ae23dfcf3fdb3b8c8da63b2..5387a2b2782ab4d0f2ed702e0ac0b7840486da98 100644
--- a/content/renderer/media/webmediaplayer_ms_compositor.cc
+++ b/content/renderer/media/webmediaplayer_ms_compositor.cc
@@ -143,7 +143,10 @@
if (!web_stream.isNull())
web_stream.videoTracks(video_tracks);
- if (video_tracks.size() > 0 &&
+ const bool remote_video =
+ video_tracks.size() && video_tracks[0].source().remote();
+
+ if (remote_video &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableRTCSmoothnessAlgorithm)) {
base::AutoLock auto_lock(current_frame_lock_);
@@ -155,7 +158,8 @@
// Just for logging purpose.
std::string stream_id =
web_stream.isNull() ? std::string() : web_stream.id().utf8();
- serial_ = base::Hash(stream_id);;
+ const uint32_t hash_value = base::Hash(stream_id);
+ serial_ = (hash_value << 1) | (remote_video ? 1 : 0);
}
WebMediaPlayerMSCompositor::~WebMediaPlayerMSCompositor() {

Powered by Google App Engine
This is Rietveld 408576698