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

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 11280301: Roll FFMpeg for M26. Fix ffmpeg float audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix hash checks on windows. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "build/build_config.h"
9 #include "media/base/decoder_buffer.h" 10 #include "media/base/decoder_buffer.h"
10 #include "media/base/decryptor_client.h" 11 #include "media/base/decryptor_client.h"
11 #include "media/base/test_data_util.h" 12 #include "media/base/test_data_util.h"
12 #include "media/crypto/aes_decryptor.h" 13 #include "media/crypto/aes_decryptor.h"
13 14
14 using testing::AtMost; 15 using testing::AtMost;
15 16
16 namespace media { 17 namespace media {
17 18
18 static const char kSourceId[] = "SourceId"; 19 static const char kSourceId[] = "SourceId";
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 286
286 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) { 287 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) {
287 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240.webm"), 288 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240.webm"),
288 PIPELINE_OK, true)); 289 PIPELINE_OK, true));
289 290
290 Play(); 291 Play();
291 292
292 ASSERT_TRUE(WaitUntilOnEnded()); 293 ASSERT_TRUE(WaitUntilOnEnded());
293 294
294 EXPECT_EQ(GetVideoHash(), "f0be120a90a811506777c99a2cdf7cc1"); 295 EXPECT_EQ(GetVideoHash(), "f0be120a90a811506777c99a2cdf7cc1");
295 EXPECT_EQ(GetAudioHash(), "5699a4415b620e45b9d0aae531c9df76"); 296
297 // Windows produces slightly different results due to differences in floating
298 // point functions (e.g. sin(), cos(), etc).
299 #if defined(OS_WIN)
300 static const char* kExpectedAudioHash = "1c139e31a7a9e9a8978291ca35215e8f";
301 #else
302 static const char* kExpectedAudioHash = "8d66c511a726827b2572e247bf6c02da";
303 #endif
304 EXPECT_EQ(GetAudioHash(), kExpectedAudioHash);
296 } 305 }
297 306
298 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { 307 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) {
299 MockMediaSource source("bear-320x240.webm", kWebM, 219229); 308 MockMediaSource source("bear-320x240.webm", kWebM, 219229);
300 StartPipelineWithMediaSource(&source); 309 StartPipelineWithMediaSource(&source);
301 source.EndOfStream(); 310 source.EndOfStream();
302 ASSERT_EQ(pipeline_status_, PIPELINE_OK); 311 ASSERT_EQ(pipeline_status_, PIPELINE_OK);
303 312
304 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().size(), 1u); 313 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().size(), 1u);
305 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds(), 0); 314 EXPECT_EQ(pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds(), 0);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // Verify video decoder & renderer can handle aborted demuxer reads. 450 // Verify video decoder & renderer can handle aborted demuxer reads.
442 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { 451 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) {
443 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM, 452 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM,
444 32768, 453 32768,
445 base::TimeDelta::FromMilliseconds(200), 454 base::TimeDelta::FromMilliseconds(200),
446 base::TimeDelta::FromMilliseconds(1668), 455 base::TimeDelta::FromMilliseconds(1668),
447 0x1C896, 65536)); 456 0x1C896, 65536));
448 } 457 }
449 458
450 } // namespace media 459 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698