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

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

Issue 10829470: Support for parsing encrypted WebM streams by src. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase code. Add support for audio. Created 7 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 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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 ASSERT_TRUE(WaitUntilOnEnded()); 418 ASSERT_TRUE(WaitUntilOnEnded());
419 419
420 EXPECT_EQ(GetVideoHash(), "f0be120a90a811506777c99a2cdf7cc1"); 420 EXPECT_EQ(GetVideoHash(), "f0be120a90a811506777c99a2cdf7cc1");
421 421
422 // TODO(dalecurtis): Audio decoded in float does not have a consistent hash 422 // TODO(dalecurtis): Audio decoded in float does not have a consistent hash
423 // across platforms. Fix this: http://crbug.com/168204 423 // across platforms. Fix this: http://crbug.com/168204
424 // EXPECT_EQ(GetAudioHash(), ""); 424 // EXPECT_EQ(GetAudioHash(), "");
425 } 425 }
426 426
427 // TODO(fgalligan): Enable test when code to parse encrypted WebM files lands
428 // in Chromium's FFmpeg.
429 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlaybackEncrypted) {
430 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
431 set_need_key_cb(base::Bind(&FakeEncryptedMedia::NeedKey,
432 base::Unretained(&encrypted_media)));
433
434 ASSERT_TRUE(Start(GetTestDataFilePath("bear-640x360-av_enc-av.webm"),
435 encrypted_media.decryptor()));
436
437 Play();
438
439 ASSERT_TRUE(WaitUntilOnEnded());
440 Stop();
441 }
442
427 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) { 443 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource) {
428 MockMediaSource source("bear-320x240.webm", kWebM, 219229); 444 MockMediaSource source("bear-320x240.webm", kWebM, 219229);
429 StartPipelineWithMediaSource(&source); 445 StartPipelineWithMediaSource(&source);
430 source.EndOfStream(); 446 source.EndOfStream();
431 447
432 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 448 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
433 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 449 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
434 EXPECT_EQ(k320WebMFileDurationMs, 450 EXPECT_EQ(k320WebMFileDurationMs,
435 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 451 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
436 452
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // back. 894 // back.
879 // Disabled since it might crash or corrupt heap, see http://crbug.com/173333 895 // Disabled since it might crash or corrupt heap, see http://crbug.com/173333
880 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_VP9_Opus_WebM) { 896 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_VP9_Opus_WebM) {
881 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp9-opus.webm"), 897 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp9-opus.webm"),
882 PIPELINE_OK)); 898 PIPELINE_OK));
883 Play(); 899 Play();
884 ASSERT_TRUE(WaitUntilOnEnded()); 900 ASSERT_TRUE(WaitUntilOnEnded());
885 } 901 }
886 902
887 } // namespace media 903 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698