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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 2628313002: [Media] Plumb a feature parameter for the background video keyframe distance. (Closed)
Patch Set: Changed the param to milliseconds Created 3 years, 11 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
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 volume_multiplier_(1.0), 236 volume_multiplier_(1.0),
237 renderer_factory_(std::move(renderer_factory)), 237 renderer_factory_(std::move(renderer_factory)),
238 surface_manager_(params.surface_manager()), 238 surface_manager_(params.surface_manager()),
239 overlay_surface_id_(SurfaceManager::kNoSurfaceID), 239 overlay_surface_id_(SurfaceManager::kNoSurfaceID),
240 suppress_destruction_errors_(false), 240 suppress_destruction_errors_(false),
241 can_suspend_state_(CanSuspendState::UNKNOWN), 241 can_suspend_state_(CanSuspendState::UNKNOWN),
242 use_fallback_path_(false), 242 use_fallback_path_(false),
243 is_encrypted_(false), 243 is_encrypted_(false),
244 underflow_count_(0), 244 underflow_count_(0),
245 preroll_attempt_pending_(false), 245 preroll_attempt_pending_(false),
246 observer_(params.media_observer()) { 246 observer_(params.media_observer()),
247 max_keyframe_distance_to_disable_background_video_(
248 params.max_keyframe_distance_to_disable_background_video()) {
247 DCHECK(!adjust_allocated_memory_cb_.is_null()); 249 DCHECK(!adjust_allocated_memory_cb_.is_null());
248 DCHECK(renderer_factory_); 250 DCHECK(renderer_factory_);
249 DCHECK(client_); 251 DCHECK(client_);
250 252
251 tick_clock_.reset(new base::DefaultTickClock()); 253 tick_clock_.reset(new base::DefaultTickClock());
252 254
253 force_video_overlays_ = base::CommandLine::ForCurrentProcess()->HasSwitch( 255 force_video_overlays_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
254 switches::kForceVideoOverlays); 256 switches::kForceVideoOverlays);
255 257
256 enable_fullscreen_video_overlays_ = 258 enable_fullscreen_video_overlays_ =
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 UMA_HISTOGRAM_TIMES( 2237 UMA_HISTOGRAM_TIMES(
2236 "Media.Video.TimeFromForegroundToFirstFrame.DisableTrack", 2238 "Media.Video.TimeFromForegroundToFirstFrame.DisableTrack",
2237 time_to_first_frame); 2239 time_to_first_frame);
2238 } else { 2240 } else {
2239 UMA_HISTOGRAM_TIMES("Media.Video.TimeFromForegroundToFirstFrame.Paused", 2241 UMA_HISTOGRAM_TIMES("Media.Video.TimeFromForegroundToFirstFrame.Paused",
2240 time_to_first_frame); 2242 time_to_first_frame);
2241 } 2243 }
2242 } 2244 }
2243 2245
2244 } // namespace media 2246 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698