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

Unified Diff: media/filters/android/media_codec_audio_decoder.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/filters/android/media_codec_audio_decoder.cc
diff --git a/media/filters/android/media_codec_audio_decoder.cc b/media/filters/android/media_codec_audio_decoder.cc
index d67088d712384b4c74fc29bdd1152664ab801e83..225d9c3af924b7d8e65cdddce1c98795abe0c318 100644
--- a/media/filters/android/media_codec_audio_decoder.cc
+++ b/media/filters/android/media_codec_audio_decoder.cc
@@ -167,7 +167,7 @@ void MediaCodecAudioDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
const DecodeCB& decode_cb) {
DecodeCB bound_decode_cb = BindToCurrentLoop(decode_cb);
- if (!buffer->end_of_stream() && buffer->timestamp() == kNoTimestamp()) {
+ if (!buffer->end_of_stream() && buffer->timestamp() == kNoTimestamp) {
DVLOG(2) << __FUNCTION__ << " " << buffer->AsHumanReadableString()
<< ": no timestamp, skipping this buffer";
bound_decode_cb.Run(DecodeStatus::DECODE_ERROR);
@@ -212,7 +212,7 @@ void MediaCodecAudioDecoder::Reset(const base::Closure& closure) {
success = CreateMediaCodecLoop();
// Reset AudioTimestampHelper.
- timestamp_helper_->SetBaseTimestamp(kNoTimestamp());
+ timestamp_helper_->SetBaseTimestamp(kNoTimestamp);
SetState(success ? STATE_READY : STATE_ERROR);
@@ -434,8 +434,7 @@ bool MediaCodecAudioDecoder::OnDecodedFrame(
// Calculate and set buffer timestamp.
- const bool first_buffer =
- timestamp_helper_->base_timestamp() == kNoTimestamp();
+ const bool first_buffer = timestamp_helper_->base_timestamp() == kNoTimestamp;
if (first_buffer) {
// Clamp the base timestamp to zero.
timestamp_helper_->SetBaseTimestamp(std::max(base::TimeDelta(), out.pts));

Powered by Google App Engine
This is Rietveld 408576698