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

Unified Diff: media/filters/source_buffer_stream_unittest.cc

Issue 324223003: Prevent incorrect start time from being used during new range creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorg code to avoid a BufferQueue copy. Created 6 years, 6 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/filters/source_buffer_stream_unittest.cc
diff --git a/media/filters/source_buffer_stream_unittest.cc b/media/filters/source_buffer_stream_unittest.cc
index 1cd9cfa3f67c2050b9c092e4f78d0ef5399f5e87..b706fb18cbbe70482a1a2d2b169672a0f76d7105 100644
--- a/media/filters/source_buffer_stream_unittest.cc
+++ b/media/filters/source_buffer_stream_unittest.cc
@@ -3511,6 +3511,33 @@ TEST_F(SourceBufferStreamTest, Remove_GOPBeingAppended) {
CheckExpectedBuffers("240K 270 300");
}
+TEST_F(SourceBufferStreamTest, Remove_WholeGOPBeingAppended) {
wolenetz 2014/06/11 01:53:54 I tried this test without the SBS.cc change applie
acolwell GONE FROM CHROMIUM 2014/06/11 16:47:51 I'm just fixing the range creating problem here. T
+ Seek(0);
+ NewSegmentAppend("0K 30 60 90");
+ CheckExpectedRangesByTimestamp("{ [0,120) }");
+
+ // Remove the keyframe of the current GOP being appended.
+ RemoveInMs(0, 30, 120);
+ CheckExpectedRangesByTimestamp("{ }");
+
+ // Continue appending the current GOP.
+ AppendBuffers("210 240");
+
+ CheckExpectedRangesByTimestamp("{ }");
+
+ // Append the beginning of the next GOP.
+ AppendBuffers("270K 300");
+
+ // Verify that the new range is started at the
+ // beginning of the next GOP.
+ CheckExpectedRangesByTimestamp("{ [270,330) }");
+
+ // Verify the buffers in the ranges.
+ CheckNoNextBuffer();
+ SeekToTimestamp(base::TimeDelta::FromMilliseconds(270));
+ CheckExpectedBuffers("270K 300");
+}
+
TEST_F(SourceBufferStreamTest,
Remove_PreviousAppendDestroyedAndOverwriteExistingRange) {
SeekToTimestamp(base::TimeDelta::FromMilliseconds(90));
« media/filters/source_buffer_stream.cc ('K') | « media/filters/source_buffer_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698