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

Unified Diff: media/formats/mp2t/es_adapter_video.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/formats/mp2t/es_adapter_video.cc
diff --git a/media/formats/mp2t/es_adapter_video.cc b/media/formats/mp2t/es_adapter_video.cc
index bc048272e3a208ab95c024feb7226ecc50110100..e33339672a178669570898707e3237461b696f80 100644
--- a/media/formats/mp2t/es_adapter_video.cc
+++ b/media/formats/mp2t/es_adapter_video.cc
@@ -75,7 +75,7 @@ void EsAdapterVideo::OnConfigChanged(
bool EsAdapterVideo::OnNewBuffer(
const scoped_refptr<StreamParserBuffer>& stream_parser_buffer) {
- if (stream_parser_buffer->timestamp() == kNoTimestamp()) {
+ if (stream_parser_buffer->timestamp() == kNoTimestamp) {
if (has_valid_frame_) {
// There is currently no error concealment for a missing timestamp
// in the middle of the stream.
@@ -143,9 +143,9 @@ void EsAdapterVideo::ProcessPendingBuffers(bool flush) {
buffer_list_.pop_front();
buffer_index_++;
- if (buffer->duration() == kNoTimestamp()) {
+ if (buffer->duration() == kNoTimestamp) {
base::TimeDelta next_frame_pts = GetNextFramePts(buffer->timestamp());
- if (next_frame_pts == kNoTimestamp()) {
+ if (next_frame_pts == kNoTimestamp) {
// This can happen when emitting the very last buffer
// or if the stream do not meet the assumption behind |kHistorySize|.
DVLOG(LOG_LEVEL_ES) << "Using last frame duration: "
@@ -168,7 +168,7 @@ void EsAdapterVideo::ProcessPendingBuffers(bool flush) {
}
base::TimeDelta EsAdapterVideo::GetNextFramePts(base::TimeDelta current_pts) {
- base::TimeDelta next_pts = kNoTimestamp();
+ base::TimeDelta next_pts = kNoTimestamp;
// Consider the timestamps of future frames (in decode order).
// Note: the next frame is not enough when the GOP includes some B frames.
@@ -176,7 +176,7 @@ base::TimeDelta EsAdapterVideo::GetNextFramePts(base::TimeDelta current_pts) {
it != buffer_list_.end(); ++it) {
if ((*it)->timestamp() < current_pts)
continue;
- if (next_pts == kNoTimestamp() || next_pts > (*it)->timestamp())
+ if (next_pts == kNoTimestamp || next_pts > (*it)->timestamp())
next_pts = (*it)->timestamp();
}
@@ -187,7 +187,7 @@ base::TimeDelta EsAdapterVideo::GetNextFramePts(base::TimeDelta current_pts) {
it != emitted_pts_.end(); ++it) {
if (*it < current_pts)
continue;
- if (next_pts == kNoTimestamp() || next_pts > *it)
+ if (next_pts == kNoTimestamp || next_pts > *it)
next_pts = *it;
}

Powered by Google App Engine
This is Rietveld 408576698