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

Unified Diff: media/base/audio_timestamp_helper.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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
Index: media/base/audio_timestamp_helper.cc
diff --git a/media/base/audio_timestamp_helper.cc b/media/base/audio_timestamp_helper.cc
index ef387ff4267f9e341578d8812869c2d7bffe31fb..dd0892bb9f19507e98dceded0d75532095671b46 100644
--- a/media/base/audio_timestamp_helper.cc
+++ b/media/base/audio_timestamp_helper.cc
@@ -42,11 +42,11 @@ base::TimeDelta AudioTimestampHelper::GetFrameDuration(int frame_count) const {
return end_timestamp - GetTimestamp();
}
-int64 AudioTimestampHelper::GetFramesToTarget(base::TimeDelta target) const {
+int64_t AudioTimestampHelper::GetFramesToTarget(base::TimeDelta target) const {
DCHECK(base_timestamp_ != kNoTimestamp());
DCHECK(target >= base_timestamp_);
- int64 delta_in_us = (target - GetTimestamp()).InMicroseconds();
+ int64_t delta_in_us = (target - GetTimestamp()).InMicroseconds();
if (delta_in_us == 0)
return 0;
@@ -59,13 +59,13 @@ int64 AudioTimestampHelper::GetFramesToTarget(base::TimeDelta target) const {
// Compute frame count for the time delta. This computation rounds to
// the nearest whole number of frames.
double threshold = microseconds_per_frame_ / 2;
- int64 target_frame_count =
+ int64_t target_frame_count =
(delta_from_base.InMicroseconds() + threshold) / microseconds_per_frame_;
return target_frame_count - frame_count_;
}
base::TimeDelta AudioTimestampHelper::ComputeTimestamp(
- int64 frame_count) const {
+ int64_t frame_count) const {
DCHECK_GE(frame_count, 0);
DCHECK(base_timestamp_ != kNoTimestamp());
double frames_us = microseconds_per_frame_ * frame_count;

Powered by Google App Engine
This is Rietveld 408576698