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

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

Issue 1076443002: Removed obsolete float_util.h as VS2013 supports standards well enough. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed mistake in value converter. Created 5 years, 8 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 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/websourcebuffer_impl.h" 5 #include "media/blink/websourcebuffer_impl.h"
6 6
7 #include <cmath>
7 #include <limits> 8 #include <limits>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/callback_helpers.h" 12 #include "base/callback_helpers.h"
12 #include "base/float_util.h"
13 #include "media/filters/chunk_demuxer.h" 13 #include "media/filters/chunk_demuxer.h"
14 #include "third_party/WebKit/public/platform/WebSourceBufferClient.h" 14 #include "third_party/WebKit/public/platform/WebSourceBufferClient.h"
15 15
16 namespace media { 16 namespace media {
17 17
18 static base::TimeDelta DoubleToTimeDelta(double time) { 18 static base::TimeDelta DoubleToTimeDelta(double time) {
19 DCHECK(!base::IsNaN(time)); 19 DCHECK(!std::isnan(time));
20 DCHECK_NE(time, -std::numeric_limits<double>::infinity()); 20 DCHECK_NE(time, -std::numeric_limits<double>::infinity());
21 21
22 if (time == std::numeric_limits<double>::infinity()) 22 if (time == std::numeric_limits<double>::infinity())
23 return kInfiniteDuration(); 23 return kInfiniteDuration();
24 24
25 // Don't use base::TimeDelta::Max() here, as we want the largest finite time 25 // Don't use base::TimeDelta::Max() here, as we want the largest finite time
26 // delta. 26 // delta.
27 base::TimeDelta max_time = base::TimeDelta::FromInternalValue(kint64max - 1); 27 base::TimeDelta max_time = base::TimeDelta::FromInternalValue(kint64max - 1);
28 double max_time_in_seconds = max_time.InSecondsF(); 28 double max_time_in_seconds = max_time.InSecondsF();
29 29
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 demuxer_ = NULL; 145 demuxer_ = NULL;
146 client_ = NULL; 146 client_ = NULL;
147 } 147 }
148 148
149 void WebSourceBufferImpl::InitSegmentReceived() { 149 void WebSourceBufferImpl::InitSegmentReceived() {
150 DVLOG(1) << __FUNCTION__; 150 DVLOG(1) << __FUNCTION__;
151 client_->initializationSegmentReceived(); 151 client_->initializationSegmentReceived();
152 } 152 }
153 153
154 } // namespace media 154 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | ui/events/gesture_detection/scale_gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698