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

Unified Diff: media/filters/pipeline_integration_test.cc

Issue 213253006: MSE: Populate WebM missing duration with DefaultDuration, derived, or default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the longer default video frame duration of 24fps vs 25fps Created 6 years, 9 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/chunk_demuxer_unittest.cc ('k') | media/formats/webm/webm_cluster_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test.cc
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index 3058c9a5d60209020a595975aafd4ec5db8617e0..efbd144d8139601f3bafbe3bae39ba944ba51975 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -59,8 +59,8 @@ const int kAppendWholeFile = -1;
// Constants for the Media Source config change tests.
const int kAppendTimeSec = 1;
const int kAppendTimeMs = kAppendTimeSec * 1000;
-const int k320WebMFileDurationMs = 2737;
-const int k640WebMFileDurationMs = 2763;
+const int k320WebMFileDurationMs = 2736;
+const int k640WebMFileDurationMs = 2762;
const int kOpusEndTrimmingWebMFileDurationMs = 2771;
const int kVP9WebMFileDurationMs = 2703;
const int kVP8AWebMFileDurationMs = 2700;
@@ -655,7 +655,10 @@ TEST_F(PipelineIntegrationTest, MediaSource_ConfigChange_Encrypted_WebM) {
EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
- EXPECT_EQ(kAppendTimeMs + k640WebMFileDurationMs,
+ // The "+ 1" is due to estimated audio and video frame durations on the last
+ // frames appended. The unencrypted file has a TrackEntry DefaultDuration
+ // field for the video track, but the encrypted file does not.
+ EXPECT_EQ(kAppendTimeMs + k640WebMFileDurationMs + 1,
pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
Play();
@@ -715,7 +718,10 @@ TEST_F(PipelineIntegrationTest,
EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
// The second video was not added, so its time has not been added.
- EXPECT_EQ(k320WebMFileDurationMs,
+ // The "+ 1" is due to estimated audio and video frame durations on the last
+ // frames appended. The unencrypted file has a TrackEntry DefaultDuration
+ // field for the video track, but the encrypted file does not.
+ EXPECT_EQ(k320WebMFileDurationMs + 1,
pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
Play();
@@ -1126,7 +1132,7 @@ TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_AudioOnly) {
TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) {
ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM,
32768,
- base::TimeDelta::FromMilliseconds(200),
+ base::TimeDelta::FromMilliseconds(167),
base::TimeDelta::FromMilliseconds(1668),
0x1C896, 65536));
}
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/formats/webm/webm_cluster_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698