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

Unified Diff: media/base/stream_parser.cc

Issue 447963003: Introduce DecodeTimestamp class to make it easier to distiguish presentation and decode timestamps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 6 years, 4 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
« no previous file with comments | « no previous file | media/base/stream_parser_buffer.h » ('j') | media/filters/source_buffer_stream.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/stream_parser.cc
diff --git a/media/base/stream_parser.cc b/media/base/stream_parser.cc
index 59c3ed60796c83e13b9c763e540d4d4526d98baa..942afbf8ec93a9df3f660c987a11c2ab10da8769 100644
--- a/media/base/stream_parser.cc
+++ b/media/base/stream_parser.cc
@@ -48,7 +48,7 @@ static bool MergeBufferQueuesInternal(
// buffers must not be less than. If |merged_buffers| already has buffers,
// initialize |last_decode_timestamp| to the decode timestamp of the last
// buffer in it.
- base::TimeDelta last_decode_timestamp = kNoTimestamp();
+ DecodeTimestamp last_decode_timestamp = kNoDecodeTimestamp();
if (!merged_buffers->empty())
last_decode_timestamp = merged_buffers->back()->GetDecodeTimestamp();
@@ -70,7 +70,7 @@ static bool MergeBufferQueuesInternal(
// Tracks which queue's iterator is pointing to the candidate buffer to
// append next, or -1 if no candidate buffers found. This indexes |itrs|.
int index_of_queue_with_next_decode_timestamp = -1;
- base::TimeDelta next_decode_timestamp = kNoTimestamp();
+ DecodeTimestamp next_decode_timestamp = kNoDecodeTimestamp();
// Scan each of the iterators for |buffer_queues| to find the candidate
// buffer, if any, that has the lowest decode timestamp.
@@ -79,14 +79,14 @@ static bool MergeBufferQueuesInternal(
continue;
// Extract the candidate buffer's decode timestamp.
- base::TimeDelta ts = (*itrs[i])->GetDecodeTimestamp();
+ DecodeTimestamp ts = (*itrs[i])->GetDecodeTimestamp();
- if (last_decode_timestamp != kNoTimestamp() &&
+ if (last_decode_timestamp != kNoDecodeTimestamp() &&
ts < last_decode_timestamp)
return false;
if (ts < next_decode_timestamp ||
- next_decode_timestamp == kNoTimestamp()) {
+ next_decode_timestamp == kNoDecodeTimestamp()) {
// Remember the decode timestamp and queue iterator index for this
// potentially winning candidate buffer.
next_decode_timestamp = ts;
« no previous file with comments | « no previous file | media/base/stream_parser_buffer.h » ('j') | media/filters/source_buffer_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698