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

Unified Diff: media/base/stream_parser_buffer.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/stream_parser_buffer.cc
diff --git a/media/base/stream_parser_buffer.cc b/media/base/stream_parser_buffer.cc
index 8c1693bcebacdcb55e13474f6b7c2cd1b7d08be5..e2b6b8f62b24c0670b186968a5c872759d247bc5 100644
--- a/media/base/stream_parser_buffer.cc
+++ b/media/base/stream_parser_buffer.cc
@@ -100,7 +100,7 @@ StreamParserBuffer::StreamParserBuffer(const uint8_t* data,
// duration to force clients to set them? Today they end up being zero which
// is both a common and valid value and could lead to bugs.
if (data) {
- set_duration(kNoTimestamp());
+ set_duration(kNoTimestamp);
}
if (is_key_frame)
@@ -160,7 +160,7 @@ void StreamParserBuffer::ConvertToSpliceBuffer(
// Make a copy of this first, before making any changes.
scoped_refptr<StreamParserBuffer> overlapping_buffer = CopyBuffer(*this);
- overlapping_buffer->set_splice_timestamp(kNoTimestamp());
+ overlapping_buffer->set_splice_timestamp(kNoTimestamp);
const scoped_refptr<StreamParserBuffer>& first_splice_buffer =
pre_splice_buffers.front();
@@ -219,7 +219,7 @@ void StreamParserBuffer::SetPrerollBuffer(
DCHECK(!end_of_stream());
DCHECK(!preroll_buffer->end_of_stream());
DCHECK(!preroll_buffer->preroll_buffer_.get());
- DCHECK(preroll_buffer->splice_timestamp() == kNoTimestamp());
+ DCHECK(preroll_buffer->splice_timestamp() == kNoTimestamp);
DCHECK(preroll_buffer->splice_buffers().empty());
DCHECK(preroll_buffer->timestamp() <= timestamp());
DCHECK(preroll_buffer->discard_padding() == DecoderBuffer::DiscardPadding());
@@ -232,7 +232,7 @@ void StreamParserBuffer::SetPrerollBuffer(
// Mark the entire buffer for discard.
preroll_buffer_->set_discard_padding(
- std::make_pair(kInfiniteDuration(), base::TimeDelta()));
+ std::make_pair(kInfiniteDuration, base::TimeDelta()));
}
void StreamParserBuffer::set_timestamp(base::TimeDelta timestamp) {

Powered by Google App Engine
This is Rietveld 408576698