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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 8786013: Replace media::Limits struct with media::limits namespace and update documentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« media/filters/ffmpeg_demuxer.cc ('K') | « webkit/media/audio_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 7df55e657cf7b3f7471512f87fc0c8dda99d8356..8e095b116266af6746c73dca3d2b513516a70e1f 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -498,7 +498,7 @@ float WebMediaPlayerImpl::duration() const {
DCHECK_EQ(main_loop_, MessageLoop::current());
base::TimeDelta duration = pipeline_->GetMediaDuration();
- if (duration.InMicroseconds() == media::Limits::kMaxTimeInMicroseconds)
+ if (duration.InMicroseconds() == media::limits::kMaxTimeInMicroseconds)
Ami GONE FROM CHROMIUM 2011/12/03 02:11:38 I *think* this is the only place that cares about
scherkus (not reviewing) 2011/12/06 02:05:57 we use infinity to represent an unbounded stream/d
return std::numeric_limits<float>::infinity();
return static_cast<float>(duration.InSecondsF());
}
@@ -588,10 +588,10 @@ void WebMediaPlayerImpl::paint(WebCanvas* canvas,
// Make sure we don't create a huge canvas.
// TODO(hclam): Respect the aspect ratio.
- if (scaled_width > static_cast<int>(media::Limits::kMaxCanvas))
- scaled_width = media::Limits::kMaxCanvas;
- if (scaled_height > static_cast<int>(media::Limits::kMaxCanvas))
- scaled_height = media::Limits::kMaxCanvas;
+ if (scaled_width > static_cast<int>(media::limits::kMaxCanvas))
+ scaled_width = media::limits::kMaxCanvas;
+ if (scaled_height > static_cast<int>(media::limits::kMaxCanvas))
+ scaled_height = media::limits::kMaxCanvas;
// If there is no preexisting platform canvas, or if the size has
// changed, recreate the canvas. This is to avoid recreating the bitmap
« media/filters/ffmpeg_demuxer.cc ('K') | « webkit/media/audio_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698