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

Side by Side Diff: content/renderer/media/webmediaplayer_ms_compositor.cc

Issue 2425703002: Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webmediaplayer_ms_compositor.h" 5 #include "content/renderer/media/webmediaplayer_ms_compositor.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 total_frame_count_(0), 135 total_frame_count_(0),
136 dropped_frame_count_(0), 136 dropped_frame_count_(0),
137 stopped_(true), 137 stopped_(true),
138 weak_ptr_factory_(this) { 138 weak_ptr_factory_(this) {
139 main_message_loop_ = base::MessageLoop::current(); 139 main_message_loop_ = base::MessageLoop::current();
140 140
141 blink::WebVector<blink::WebMediaStreamTrack> video_tracks; 141 blink::WebVector<blink::WebMediaStreamTrack> video_tracks;
142 if (!web_stream.isNull()) 142 if (!web_stream.isNull())
143 web_stream.videoTracks(video_tracks); 143 web_stream.videoTracks(video_tracks);
144 144
145 const bool remote_video = 145 const bool remote_video = video_tracks.size();
146 video_tracks.size() && video_tracks[0].source().remote();
147 146
148 if (remote_video && 147 if (remote_video &&
mcasas 2016/10/17 18:08:25 l.145-146 in the LHS tested video_tracks.size() as
149 !base::CommandLine::ForCurrentProcess()->HasSwitch( 148 !base::CommandLine::ForCurrentProcess()->HasSwitch(
150 switches::kDisableRTCSmoothnessAlgorithm)) { 149 switches::kDisableRTCSmoothnessAlgorithm)) {
151 base::AutoLock auto_lock(current_frame_lock_); 150 base::AutoLock auto_lock(current_frame_lock_);
152 rendering_frame_buffer_.reset(new media::VideoRendererAlgorithm( 151 rendering_frame_buffer_.reset(new media::VideoRendererAlgorithm(
153 base::Bind(&WebMediaPlayerMSCompositor::MapTimestampsToRenderTimeTicks, 152 base::Bind(&WebMediaPlayerMSCompositor::MapTimestampsToRenderTimeTicks,
154 base::Unretained(this)))); 153 base::Unretained(this))));
155 } 154 }
156 155
157 // Just for logging purpose. 156 // Just for logging purpose.
158 std::string stream_id = 157 std::string stream_id =
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 437 }
439 438
440 if (!rendering_frame_buffer_) { 439 if (!rendering_frame_buffer_) {
441 rendering_frame_buffer_.reset(new media::VideoRendererAlgorithm( 440 rendering_frame_buffer_.reset(new media::VideoRendererAlgorithm(
442 base::Bind(&WebMediaPlayerMSCompositor::MapTimestampsToRenderTimeTicks, 441 base::Bind(&WebMediaPlayerMSCompositor::MapTimestampsToRenderTimeTicks,
443 base::Unretained(this)))); 442 base::Unretained(this))));
444 } 443 }
445 } 444 }
446 445
447 } // namespace content 446 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698