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

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

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/video_track_adapter.h" 5 #include "content/renderer/media/video_track_adapter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 frame_rate_(MediaStreamVideoSource::kDefaultFrameRate), 138 frame_rate_(MediaStreamVideoSource::kDefaultFrameRate),
139 last_time_stamp_(base::TimeDelta::Max()), 139 last_time_stamp_(base::TimeDelta::Max()),
140 max_frame_rate_(max_frame_rate), 140 max_frame_rate_(max_frame_rate),
141 keep_frame_counter_(0.0) { 141 keep_frame_counter_(0.0) {
142 DCHECK(renderer_task_runner_.get()); 142 DCHECK(renderer_task_runner_.get());
143 DCHECK(io_thread_checker_.CalledOnValidThread()); 143 DCHECK(io_thread_checker_.CalledOnValidThread());
144 DCHECK_GE(max_aspect_ratio_, min_aspect_ratio_); 144 DCHECK_GE(max_aspect_ratio_, min_aspect_ratio_);
145 CHECK_NE(0, max_aspect_ratio_); 145 CHECK_NE(0, max_aspect_ratio_);
146 146
147 const std::string max_fps_str = 147 const std::string max_fps_str =
148 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 148 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
149 switches::kWebRtcMaxCaptureFramerate); 149 switches::kWebRtcMaxCaptureFramerate);
150 if (!max_fps_str.empty()) { 150 if (!max_fps_str.empty()) {
151 double value; 151 double value;
152 if (base::StringToDouble(max_fps_str, &value) && value >= 0.0) { 152 if (base::StringToDouble(max_fps_str, &value) && value >= 0.0) {
153 DVLOG(1) << "Overriding max frame rate. Was=" << max_frame_rate 153 DVLOG(1) << "Overriding max frame rate. Was=" << max_frame_rate
154 << ", Now=" << value; 154 << ", Now=" << value;
155 max_frame_rate_ = value; 155 max_frame_rate_ = value;
156 } else { 156 } else {
157 DLOG(ERROR) << "Unable to set max fps to " << max_fps_str; 157 DLOG(ERROR) << "Unable to set max fps to " << max_fps_str;
158 } 158 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 523 }
524 524
525 io_message_loop_->PostDelayedTask(FROM_HERE, 525 io_message_loop_->PostDelayedTask(FROM_HERE,
526 base::Bind(&VideoTrackAdapter::CheckFramesReceivedOnIO, this, 526 base::Bind(&VideoTrackAdapter::CheckFramesReceivedOnIO, this,
527 set_muted_state_callback, frame_counter_), 527 set_muted_state_callback, frame_counter_),
528 base::TimeDelta::FromSecondsD(kNormalFrameTimeoutInFrameIntervals / 528 base::TimeDelta::FromSecondsD(kNormalFrameTimeoutInFrameIntervals /
529 source_frame_rate_)); 529 source_frame_rate_));
530 } 530 }
531 531
532 } // namespace content 532 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698