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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 1347483003: Fix seeking back in the new MSE GC algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: upd Created 5 years, 3 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/filters/source_buffer_stream.cc » ('j') | media/filters/source_buffer_stream.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer_unittest.cc
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index 99299ac305dd0f346d3862b44188b8740a6cbb26..93cec328d2c92ed1107c4368cd049bfc3598ae40 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -3412,6 +3412,19 @@ TEST_F(ChunkDemuxerTest, GCDuringSeek) {
CheckExpectedRanges(kSourceId, "{ [500,615) [700,815) }");
}
+TEST_F(ChunkDemuxerTest, GCDuringSeekBack) {
+ ASSERT_TRUE(InitDemuxer(HAS_AUDIO));
+ demuxer_->SetMemoryLimits(DemuxerStream::AUDIO, 10 * kBlockSize);
+ // Append some data at position 1000ms
+ AppendSingleStreamCluster(kSourceId, kAudioTrackNum, 1000, 10);
+ CheckExpectedRanges(kSourceId, "{ [1000,1230) }");
+
+ // GC should be able to evict frames in the currently buffered range, since
+ // those frames are later than the seek target position 0.
+ base::TimeDelta seek_time = base::TimeDelta::FromMilliseconds(0);
+ EXPECT_TRUE(demuxer_->EvictCodedFrames(kSourceId, seek_time, 5 * kBlockSize));
wolenetz 2015/09/16 19:25:27 nit: We could do a further check of expectation he
+}
+
TEST_F(ChunkDemuxerTest, GCKeepPlayhead) {
ASSERT_TRUE(InitDemuxer(HAS_AUDIO));
« no previous file with comments | « no previous file | media/filters/source_buffer_stream.cc » ('j') | media/filters/source_buffer_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698