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

Unified Diff: media/filters/frame_processor_unittest.cc

Issue 567403004: MSE: Test no muxed discontinuity forced by audio frame partial front trimming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | 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 99f27704fcf24c5dbe312971109abc738c9d8ae4..ff2f16c4a586f990c368933bce7ec45615e6ade5 100644
--- a/media/filters/frame_processor_unittest.cc
+++ b/media/filters/frame_processor_unittest.cc
@@ -664,6 +664,30 @@ TEST_P(FrameProcessorTest, PartialAppendWindowFilterNoDiscontinuity) {
CheckReadsThenReadStalls(audio_.get(), "7:0 19");
}
+TEST_P(FrameProcessorTest, PartialAppendWindowFilterNoNewMediaSegment) {
+ // Tests that a new media segment is not forcibly signalled for audio frame
+ // partial front trim, to prevent incorrect introduction of a discontinuity
+ // and potentially a non-keyframe video frame to be processed next after the
+ // discontinuity.
+ InSequence s;
+ AddTestTracks(HAS_AUDIO | HAS_VIDEO);
+ new_media_segment_ = true;
+ frame_processor_->SetSequenceMode(GetParam());
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_));
+ ProcessFrames("", "0K");
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_));
+ ProcessFrames("-5K", "");
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_* 2));
+ ProcessFrames("", "10");
+
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ EXPECT_FALSE(new_media_segment_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,5) }");
+ CheckExpectedRangesByTimestamp(video_.get(), "{ [0,20) }");
+ CheckReadsThenReadStalls(audio_.get(), "0:-5");
+ CheckReadsThenReadStalls(video_.get(), "0 10");
+}
+
INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698