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

Unified Diff: media/base/android/media_source_player.cc

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/media_source_player.cc
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
index 47992075f09f57a25dd149868100b38041716bf0..47860ba485e81e11442555b5b182d03f9ce98bdd 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -359,7 +359,7 @@ void MediaSourcePlayer::OnDemuxerSeekDone(
// I-frame later than the requested one due to data removal or GC. Update
// player clock to the actual seek target.
if (doing_browser_seek_) {
- DCHECK(actual_browser_seek_time != kNoTimestamp());
+ DCHECK(actual_browser_seek_time != kNoTimestamp);
base::TimeDelta seek_time = actual_browser_seek_time;
// A browser seek must not jump into the past. Ideally, it seeks to the
// requested time, but it might jump into the future.
@@ -369,7 +369,7 @@ void MediaSourcePlayer::OnDemuxerSeekDone(
interpolator_.SetBounds(seek_time, seek_time);
audio_decoder_job_->SetBaseTimestamp(seek_time);
} else {
- DCHECK(actual_browser_seek_time == kNoTimestamp());
+ DCHECK(actual_browser_seek_time == kNoTimestamp);
}
base::TimeDelta current_time = GetCurrentTime();
@@ -508,7 +508,7 @@ void MediaSourcePlayer::MediaDecoderCallback(
}
// Increment frame counts for UMA.
- if (current_presentation_timestamp != kNoTimestamp()) {
+ if (current_presentation_timestamp != kNoTimestamp) {
FrameStatistics& frame_stats = is_audio ? media_stat_->audio_frame_stats()
: media_stat_->video_frame_stats();
frame_stats.IncrementFrameCount();
@@ -530,7 +530,7 @@ void MediaSourcePlayer::MediaDecoderCallback(
}
if ((status == MEDIA_CODEC_OK || status == MEDIA_CODEC_INPUT_END_OF_STREAM) &&
- is_clock_manager && current_presentation_timestamp != kNoTimestamp()) {
+ is_clock_manager && current_presentation_timestamp != kNoTimestamp) {
UpdateTimestamps(current_presentation_timestamp,
max_presentation_timestamp);
}
@@ -603,7 +603,7 @@ void MediaSourcePlayer::MediaDecoderCallback(
// If we have a valid timestamp, start the starvation callback. Otherwise,
// reset the |start_time_ticks_| so that the next frame will not suffer
// from the decoding delay caused by the current frame.
- if (current_presentation_timestamp != kNoTimestamp())
+ if (current_presentation_timestamp != kNoTimestamp)
StartStarvationCallback(current_presentation_timestamp,
max_presentation_timestamp);
else

Powered by Google App Engine
This is Rietveld 408576698