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

Unified Diff: media/filters/frame_processor_unittest.cc

Issue 1355673004: MSE: Maintain continuity in sequence appendMode across ResetParserState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « media/filters/frame_processor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/frame_processor_unittest.cc
diff --git a/media/filters/frame_processor_unittest.cc b/media/filters/frame_processor_unittest.cc
index 39a689e695772742cd0ac6629e7b8143f37161a3..ed4e715941e64293486820941d95564d8a425c4a 100644
--- a/media/filters/frame_processor_unittest.cc
+++ b/media/filters/frame_processor_unittest.cc
@@ -740,6 +740,23 @@ TEST_P(FrameProcessorTest, PartialAppendWindowFilterNoNewMediaSegment) {
CheckReadsThenReadStalls(video_.get(), "0 10");
}
+TEST_F(FrameProcessorTest, AudioOnly_SequenceModeContinuityAcrossReset) {
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ frame_processor_->SetSequenceMode(true);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_));
+ ProcessFrames("0K", "");
+ frame_processor_->Reset();
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 2));
+ ProcessFrames("100K", "");
+
+ EXPECT_EQ(frame_duration_ * -9, timestamp_offset_);
+ EXPECT_FALSE(new_media_segment_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }");
+ CheckReadsThenReadStalls(audio_.get(), "0 10:100");
+}
+
INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
« no previous file with comments | « media/filters/frame_processor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698