summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-21 06:21:14 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-21 06:21:14 +0000
commit2c9a3dca8ee47ad67ee6d8c12dc12f3c3356ca7c (patch)
treef9b632181a2bef4d785f317bba459d4148d7c016 /media
parente8bcbaa93f4e67e201e9e8d9279f4d73278f62d0 (diff)
downloadchromium_src-2c9a3dca8ee47ad67ee6d8c12dc12f3c3356ca7c.zip
chromium_src-2c9a3dca8ee47ad67ee6d8c12dc12f3c3356ca7c.tar.gz
chromium_src-2c9a3dca8ee47ad67ee6d8c12dc12f3c3356ca7c.tar.bz2
Die, Pts{Stream,Heap}, Die!
BUG=107036 TEST=none Review URL: http://codereview.chromium.org/9138046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/pts_heap.cc21
-rw-r--r--media/base/pts_heap.h69
-rw-r--r--media/base/pts_heap_unittest.cc39
-rw-r--r--media/base/pts_stream.cc79
-rw-r--r--media/base/pts_stream.h70
-rw-r--r--media/base/pts_stream_unittest.cc101
-rw-r--r--media/filters/ffmpeg_video_decoder.cc15
-rw-r--r--media/filters/ffmpeg_video_decoder.h4
-rw-r--r--media/filters/ffmpeg_video_decoder_unittest.cc78
-rw-r--r--media/filters/gpu_video_decoder.h1
-rw-r--r--media/media.gyp6
11 files changed, 1 insertions, 482 deletions
diff --git a/media/base/pts_heap.cc b/media/base/pts_heap.cc
deleted file mode 100644
index 84ff5d9..0000000
--- a/media/base/pts_heap.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/base/pts_heap.h"
-
-namespace media {
-
-PtsHeap::PtsHeap() {}
-
-PtsHeap::~PtsHeap() {}
-
-void PtsHeap::Push(const base::TimeDelta& pts) {
- queue_.push(pts);
-}
-
-void PtsHeap::Pop() {
- queue_.pop();
-}
-
-} // namespace media
diff --git a/media/base/pts_heap.h b/media/base/pts_heap.h
deleted file mode 100644
index 5e7f3be..0000000
--- a/media/base/pts_heap.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_PTS_HEAP_H_
-#define MEDIA_BASE_PTS_HEAP_H_
-
-// The compressed frame are often in decode timestamp (dts) order, which
-// may not always be in presentation timestamp (pts) order. However, the
-// decoded frames will always be returned in pts order. Ideally, the pts could
-// be attached as metadata to each comprsesed frame, and the decoder would
-// pass it along in the uncompressed frame so that it can be used in render.
-// Some decoders, like FFmpeg, do not have this facility, so we use PtsHeap to
-// pass along this information and simulate the reodering.
-//
-// Here is an illustration of why the reordering might be necessary.
-//
-// Decode PTS of PTS of
-// Call # Buffer In Buffer Out
-// 1 1 1
-// 2 3 --- <--- frame 3 buffered by Decoder
-// 3 2 2
-// 4 4 3 <--- copying timestamp 4 and 6 would be
-// 5 6 4 <-' incorrect, which is why we sort and
-// 6 5 5 queue incoming timestamps
-//
-// The PtsHeap expects that for every Pop(), there was a corresponding Push().
-// It will CHECK fail otherwise.
-
-#include <queue>
-#include <vector>
-
-#include "base/time.h"
-#include "media/base/media_export.h"
-
-namespace media {
-
-class MEDIA_EXPORT PtsHeap {
- public:
- PtsHeap();
- ~PtsHeap();
-
- void Push(const base::TimeDelta& pts);
- void Pop();
-
- const base::TimeDelta& Top() const { return queue_.top(); }
- bool IsEmpty() const { return queue_.empty(); }
-
- private:
- struct PtsHeapOrdering {
- bool operator()(const base::TimeDelta& lhs,
- const base::TimeDelta& rhs) const {
- // std::priority_queue is a max-heap. We want lower timestamps to show up
- // first so reverse the natural less-than comparison.
- return rhs < lhs;
- }
- };
- typedef std::priority_queue<base::TimeDelta,
- std::vector<base::TimeDelta>,
- PtsHeapOrdering> TimeQueue;
-
- TimeQueue queue_;
-
- DISALLOW_COPY_AND_ASSIGN(PtsHeap);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_PTS_HEAP_H_
diff --git a/media/base/pts_heap_unittest.cc b/media/base/pts_heap_unittest.cc
deleted file mode 100644
index 9bc919c..0000000
--- a/media/base/pts_heap_unittest.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/time.h"
-#include "media/base/pts_heap.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace media {
-
-TEST(PtsHeapTest, IsEmpty) {
- const base::TimeDelta kTestPts1 = base::TimeDelta::FromMicroseconds(123);
-
- PtsHeap heap;
- ASSERT_TRUE(heap.IsEmpty());
- heap.Push(kTestPts1);
- ASSERT_FALSE(heap.IsEmpty());
- heap.Pop();
- ASSERT_TRUE(heap.IsEmpty());
-}
-
-TEST(PtsHeapTest, Ordering) {
- const base::TimeDelta kTestPts1 = base::TimeDelta::FromMicroseconds(123);
- const base::TimeDelta kTestPts2 = base::TimeDelta::FromMicroseconds(456);
-
- PtsHeap heap;
- heap.Push(kTestPts1);
- heap.Push(kTestPts2);
- heap.Push(kTestPts1);
-
- EXPECT_TRUE(kTestPts1 == heap.Top());
- heap.Pop();
- EXPECT_TRUE(kTestPts1 == heap.Top());
- heap.Pop();
- EXPECT_TRUE(kTestPts2 == heap.Top());
- heap.Pop();
-}
-
-} // namespace media
diff --git a/media/base/pts_stream.cc b/media/base/pts_stream.cc
deleted file mode 100644
index 48cec61..0000000
--- a/media/base/pts_stream.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/logging.h"
-#include "media/base/buffers.h"
-#include "media/base/pts_stream.h"
-
-namespace media {
-
-PtsStream::PtsStream() {}
-
-PtsStream::~PtsStream() {}
-
-void PtsStream::Initialize(const base::TimeDelta& frame_duration) {
- default_duration_ = frame_duration;
- current_pts_ = base::TimeDelta();
- current_duration_ = base::TimeDelta();
-}
-
-void PtsStream::Seek(const base::TimeDelta& timestamp) {
- current_pts_ = timestamp;
- current_duration_ = base::TimeDelta();
- Flush();
-}
-
-void PtsStream::Flush() {
- while (!pts_heap_.IsEmpty())
- pts_heap_.Pop();
-}
-
-void PtsStream::EnqueuePts(StreamSample* sample) {
- DCHECK(sample);
- if (!sample->IsEndOfStream() && sample->GetTimestamp() != kNoTimestamp()) {
- pts_heap_.Push(sample->GetTimestamp());
- }
-}
-
-void PtsStream::UpdatePtsAndDuration(StreamSample* sample) {
- // First search the |sample| for the pts. This is the most authoritative.
- // Make a special exclusion for the value pts == 0. Though this is
- // technically a valid value, it seems a number of FFmpeg codecs will
- // mistakenly always set pts to 0.
- //
- // TODO(scherkus): FFmpegVideoDecodeEngine should be able to detect this
- // situation and set the timestamp to kInvalidTimestamp.
- DCHECK(sample);
- base::TimeDelta timestamp = sample->GetTimestamp();
- if (timestamp != kNoTimestamp() &&
- timestamp.ToInternalValue() != 0) {
- current_pts_ = timestamp;
- // We need to clean up the timestamp we pushed onto the |pts_heap_|.
- if (!pts_heap_.IsEmpty())
- pts_heap_.Pop();
- } else if (!pts_heap_.IsEmpty()) {
- // If the frame did not have pts, try to get the pts from the |pts_heap|.
- current_pts_ = pts_heap_.Top();
- pts_heap_.Pop();
- } else if (current_pts_ != kNoTimestamp()) {
- // Guess assuming this frame was the same as the last frame.
- current_pts_ = current_pts_ + current_duration_;
- } else {
- // Now we really have no clue!!! Mark an invalid timestamp and let the
- // video renderer handle it (i.e., drop frame).
- current_pts_ = kNoTimestamp();
- }
-
- // Fill in the duration, using the frame itself as the authoratative source.
- base::TimeDelta duration = sample->GetDuration();
- if (duration != kNoTimestamp() &&
- duration.ToInternalValue() != 0) {
- current_duration_ = duration;
- } else {
- // Otherwise assume a normal frame duration.
- current_duration_ = default_duration_;
- }
-}
-
-} // namespace media
diff --git a/media/base/pts_stream.h b/media/base/pts_stream.h
deleted file mode 100644
index 095ae7f..0000000
--- a/media/base/pts_stream.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_PTS_STREAM_H_
-#define MEDIA_BASE_PTS_STREAM_H_
-
-// Under some conditions the decoded frames can get invalid or wrong timestamps:
-// - compressed frames are often in decode timestamp (dts) order, which
-// may not always be in presentation timestamp (pts) order;
-// - decoder may report invalid timestamps for the decoded frames;
-// - parser may report invalid timestamps for the compressed frames.
-//
-// To ensure that the decoded frames are displayed in the proper order, the
-// PtsStream class assembles the time information from different sources and
-// combines it into the "best guess" timestamp and duration for the current
-// frame. Data inside the decoded frame (if provided) is trusted the most,
-// followed by data from the packet stream. Estimation based on the last known
-// PTS and frame rate is reserved as a last-ditch effort.
-
-#include "base/time.h"
-#include "media/base/pts_heap.h"
-
-namespace media {
-
-class StreamSample;
-
-class MEDIA_EXPORT PtsStream {
- public:
- PtsStream();
- ~PtsStream();
-
- // Initializes an instance using |frame_duration| as default. In absence of
- // other PTS information PtsStream will produce timestamps separated in time
- // by this duration.
- void Initialize(const base::TimeDelta& frame_duration);
-
- // Sets the |current_pts_| to specified |timestamp| and flushes all enqueued
- // timestamps.
- void Seek(const base::TimeDelta& timestamp);
-
- // Clears the PTS queue.
- void Flush();
-
- // Puts timestamp from the stream packet |sample| into a queue, which is used
- // as PTS source if decoded frames don't have a valid timestamp. Only valid
- // timestamps are enqueued.
- void EnqueuePts(StreamSample* sample);
-
- // Combines data from the decoded |sample|, PTS queue, and PTS estimator
- // into the final PTS and duration.
- void UpdatePtsAndDuration(StreamSample* sample);
-
- base::TimeDelta current_pts() const { return current_pts_; }
- base::TimeDelta current_duration() const { return current_duration_; }
-
- private:
- base::TimeDelta default_duration_; // Frame duration based on the frame rate.
-
- PtsHeap pts_heap_; // Heap of presentation timestamps.
-
- base::TimeDelta current_pts_;
- base::TimeDelta current_duration_;
-
- DISALLOW_COPY_AND_ASSIGN(PtsStream);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_PTS_STREAM_H_
diff --git a/media/base/pts_stream_unittest.cc b/media/base/pts_stream_unittest.cc
deleted file mode 100644
index 5b200b7..0000000
--- a/media/base/pts_stream_unittest.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/base/pts_stream.h"
-#include "media/base/video_frame.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace media {
-
-class PtsStreamTest : public testing::Test {
- public:
- PtsStreamTest() {
- video_frame_ = VideoFrame::CreateBlackFrame(16, 16);
-
- // Use typical frame rate of 25 fps.
- base::TimeDelta frame_duration = base::TimeDelta::FromMicroseconds(40000);
- pts_stream_.Initialize(frame_duration);
- }
-
- virtual ~PtsStreamTest() {}
-
- protected:
- PtsStream pts_stream_;
- scoped_refptr<VideoFrame> video_frame_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PtsStreamTest);
-};
-
-TEST_F(PtsStreamTest, NoTimestamp) {
- // Simulate an uninitialized |video_frame| where we cannot determine a
- // timestamp at all.
- video_frame_->SetTimestamp(kNoTimestamp());
- video_frame_->SetDuration(kNoTimestamp());
- pts_stream_.UpdatePtsAndDuration(video_frame_);
- EXPECT_EQ(0, pts_stream_.current_pts().InMicroseconds());
- EXPECT_EQ(40000, pts_stream_.current_duration().InMicroseconds());
-}
-
-TEST_F(PtsStreamTest, LastKnownTimestamp) {
- // Setup the last known pts to be at 100 microseconds with 16 microsecond
- // duration.
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(100));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(16));
- pts_stream_.UpdatePtsAndDuration(video_frame_);
-
- // Simulate an uninitialized |video_frame| where last known pts will be used
- // to generate a timestamp and |frame_duration| will be used to generate a
- // duration.
- video_frame_->SetTimestamp(kNoTimestamp());
- video_frame_->SetDuration(kNoTimestamp());
- pts_stream_.UpdatePtsAndDuration(video_frame_);
- EXPECT_EQ(116, pts_stream_.current_pts().InMicroseconds());
- EXPECT_EQ(40000, pts_stream_.current_duration().InMicroseconds());
-}
-
-TEST_F(PtsStreamTest, TimestampIsZero) {
- // Test that having pts == 0 in the frame also behaves like the pts is not
- // provided. This is because FFmpeg set the pts to zero when there is no
- // data for the frame, which means that value is useless to us.
- //
- // TODO(scherkus): FFmpegVideoDecodeEngine should be able to detect this
- // situation and set the timestamp to kInvalidTimestamp.
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(100));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(16));
- pts_stream_.UpdatePtsAndDuration(video_frame_);
- EXPECT_EQ(100, pts_stream_.current_pts().InMicroseconds());
- EXPECT_EQ(16, pts_stream_.current_duration().InMicroseconds());
-
- // Should use estimation and default frame rate.
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(0));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(0));
- pts_stream_.UpdatePtsAndDuration(video_frame_);
- EXPECT_EQ(116, pts_stream_.current_pts().InMicroseconds());
- EXPECT_EQ(40000, pts_stream_.current_duration().InMicroseconds());
-
- // Should override estimation but still use default frame rate.
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(200));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(0));
- pts_stream_.EnqueuePts(video_frame_);
-
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(0));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(0));
- pts_stream_.UpdatePtsAndDuration(video_frame_);
- EXPECT_EQ(200, pts_stream_.current_pts().InMicroseconds());
- EXPECT_EQ(40000, pts_stream_.current_duration().InMicroseconds());
-
- // Should override estimation and frame rate.
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(456));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(0));
- pts_stream_.EnqueuePts(video_frame_);
-
- video_frame_->SetTimestamp(base::TimeDelta::FromMicroseconds(0));
- video_frame_->SetDuration(base::TimeDelta::FromMicroseconds(789));
- pts_stream_.UpdatePtsAndDuration(video_frame_);
- EXPECT_EQ(456, pts_stream_.current_pts().InMicroseconds());
- EXPECT_EQ(789, pts_stream_.current_duration().InMicroseconds());
-}
-
-} // namespace media
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index fc1236c..048cbe5 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -118,7 +118,6 @@ void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
// Success!
state_ = kNormal;
av_frame_ = avcodec_alloc_frame();
- pts_stream_.Initialize(GetFrameDuration(config));
natural_size_ = config.natural_size();
frame_rate_numerator_ = config.frame_rate_numerator();
frame_rate_denominator_ = config.frame_rate_denominator();
@@ -144,7 +143,6 @@ void FFmpegVideoDecoder::Seek(base::TimeDelta time, const FilterStatusCB& cb) {
return;
}
- pts_stream_.Seek(time);
cb.Run(PIPELINE_OK);
}
@@ -166,7 +164,6 @@ void FFmpegVideoDecoder::Flush(const base::Closure& callback) {
}
avcodec_flush_buffers(codec_context_);
- pts_stream_.Flush();
state_ = kNormal;
callback.Run();
}
@@ -254,13 +251,6 @@ void FFmpegVideoDecoder::DoDecodeBuffer(const scoped_refptr<Buffer>& buffer) {
state_ = kFlushCodec;
}
- // Push all incoming timestamps into the priority queue as long as we have
- // not yet received an end of stream buffer. It is important that this line
- // stay below the state transition into kFlushCodec done above.
- if (state_ == kNormal) {
- pts_stream_.EnqueuePts(buffer.get());
- }
-
scoped_refptr<VideoFrame> video_frame;
if (!Decode(buffer, &video_frame)) {
state_ = kDecodeFinished;
@@ -289,11 +279,6 @@ void FFmpegVideoDecoder::DoDecodeBuffer(const scoped_refptr<Buffer>& buffer) {
return;
}
- // If we got a frame make sure its timestamp is correct before sending it off.
- pts_stream_.UpdatePtsAndDuration(video_frame.get());
- video_frame->SetTimestamp(pts_stream_.current_pts());
- video_frame->SetDuration(pts_stream_.current_duration());
-
DeliverFrame(video_frame);
}
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index c5a412f..19c939c 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,7 +9,6 @@
#include "base/memory/scoped_ptr.h"
#include "media/base/filters.h"
-#include "media/base/pts_stream.h"
#include "ui/gfx/size.h"
class MessageLoop;
@@ -70,7 +69,6 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
MessageLoop* message_loop_;
- PtsStream pts_stream_;
DecoderState state_;
StatisticsCallback statistics_callback_;
diff --git a/media/filters/ffmpeg_video_decoder_unittest.cc b/media/filters/ffmpeg_video_decoder_unittest.cc
index a87bafa..2f285c3 100644
--- a/media/filters/ffmpeg_video_decoder_unittest.cc
+++ b/media/filters/ffmpeg_video_decoder_unittest.cc
@@ -187,37 +187,6 @@ class FFmpegVideoDecoderTest : public testing::Test {
message_loop_.RunAllPending();
}
- void SetupTimestampTest() {
- Initialize();
- EXPECT_CALL(*demuxer_, Read(_))
- .WillRepeatedly(Invoke(this, &FFmpegVideoDecoderTest::ReadTimestamp));
- EXPECT_CALL(statistics_callback_, OnStatistics(_))
- .Times(AnyNumber());
- }
-
- void PushTimestamp(int64 timestamp) {
- timestamps_.push_back(timestamp);
- }
-
- int64 PopTimestamp() {
- scoped_refptr<VideoFrame> video_frame;
- Read(&video_frame);
-
- return video_frame->GetTimestamp().InMicroseconds();
- }
-
- void ReadTimestamp(const DemuxerStream::ReadCallback& read_callback) {
- if (timestamps_.empty()) {
- read_callback.Run(end_of_stream_buffer_);
- return;
- }
-
- i_frame_buffer_->SetTimestamp(
- base::TimeDelta::FromMicroseconds(timestamps_.front()));
- timestamps_.pop_front();
- read_callback.Run(i_frame_buffer_);
- }
-
MOCK_METHOD1(FrameReady, void(scoped_refptr<VideoFrame>));
MessageLoop message_loop_;
@@ -469,51 +438,4 @@ TEST_F(FFmpegVideoDecoderTest, Stop_EndOfStream) {
Stop();
}
-// Test normal operation of timestamping where all input has valid timestamps.
-TEST_F(FFmpegVideoDecoderTest, Timestamps_Normal) {
- SetupTimestampTest();
-
- PushTimestamp(0);
- PushTimestamp(1000);
- PushTimestamp(2000);
- PushTimestamp(3000);
-
- EXPECT_EQ(0, PopTimestamp());
- EXPECT_EQ(1000, PopTimestamp());
- EXPECT_EQ(2000, PopTimestamp());
- EXPECT_EQ(3000, PopTimestamp());
-}
-
-// Test situation where some input timestamps are missing and estimation will
-// be used based on the frame rate.
-TEST_F(FFmpegVideoDecoderTest, Timestamps_Estimated) {
- SetupTimestampTest();
-
- PushTimestamp(0);
- PushTimestamp(1000);
- PushTimestamp(kNoTimestamp().InMicroseconds());
- PushTimestamp(kNoTimestamp().InMicroseconds());
-
- EXPECT_EQ(0, PopTimestamp());
- EXPECT_EQ(1000, PopTimestamp());
- EXPECT_EQ(11000, PopTimestamp());
- EXPECT_EQ(21000, PopTimestamp());
-}
-
-// Test resulting timestamps from end of stream.
-TEST_F(FFmpegVideoDecoderTest, Timestamps_EndOfStream) {
- SetupTimestampTest();
-
- PushTimestamp(0);
- PushTimestamp(1000);
-
- EXPECT_EQ(0, PopTimestamp());
- EXPECT_EQ(1000, PopTimestamp());
-
- // Following are all end of stream buffers.
- EXPECT_EQ(0, PopTimestamp());
- EXPECT_EQ(0, PopTimestamp());
- EXPECT_EQ(0, PopTimestamp());
-}
-
} // namespace media
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index 753a51b..f325219 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -11,7 +11,6 @@
#include "media/base/filters.h"
#include "media/base/pipeline_status.h"
-#include "media/base/pts_stream.h"
#include "media/video/video_decode_accelerator.h"
#include "ui/gfx/size.h"
diff --git a/media/media.gyp b/media/media.gyp
index d206ca4..77ece3f 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -148,10 +148,6 @@
'base/pipeline.h',
'base/pipeline_status.h',
'base/preload.h',
- 'base/pts_heap.cc',
- 'base/pts_heap.h',
- 'base/pts_stream.cc',
- 'base/pts_stream.h',
'base/seekable_buffer.cc',
'base/seekable_buffer.h',
'base/state_matrix.cc',
@@ -599,8 +595,6 @@
'base/h264_bitstream_converter_unittest.cc',
'base/mock_reader.h',
'base/pipeline_unittest.cc',
- 'base/pts_heap_unittest.cc',
- 'base/pts_stream_unittest.cc',
'base/run_all_unittests.cc',
'base/seekable_buffer_unittest.cc',
'base/state_matrix_unittest.cc',