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

Side by Side Diff: media/filters/audio_clock.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 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/cast/test/utility/input_builder.cc ('k') | media/filters/vp8_bool_decoder.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 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 "media/filters/audio_clock.h" 5 #include "media/filters/audio_clock.h"
6 6
7 #include <stdint.h>
7 #include <stddef.h> 8 #include <stddef.h>
8 9
9 #include <algorithm> 10 #include <algorithm>
10 11
11 #include "base/logging.h" 12 #include "base/logging.h"
12 13
13 namespace media { 14 namespace media {
14 15
15 AudioClock::AudioClock(base::TimeDelta start_timestamp, int sample_rate) 16 AudioClock::AudioClock(base::TimeDelta start_timestamp, int sample_rate)
16 : start_timestamp_(start_timestamp), 17 : start_timestamp_(start_timestamp),
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 base::TimeDelta AudioClock::ComputeBufferedMediaDuration() const { 182 base::TimeDelta AudioClock::ComputeBufferedMediaDuration() const {
182 double scaled_frames = 0; 183 double scaled_frames = 0;
183 for (const auto& buffer : buffered_) 184 for (const auto& buffer : buffered_)
184 scaled_frames += buffer.frames * buffer.playback_rate; 185 scaled_frames += buffer.frames * buffer.playback_rate;
185 return base::TimeDelta::FromMicroseconds(scaled_frames * 186 return base::TimeDelta::FromMicroseconds(scaled_frames *
186 microseconds_per_frame_); 187 microseconds_per_frame_);
187 } 188 }
188 189
189 } // namespace media 190 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/utility/input_builder.cc ('k') | media/filters/vp8_bool_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698