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

Unified Diff: media/base/android/media_source_player_unittest.cc

Issue 311313006: Fix some MSE tests on devices that don't support VP9 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removing the codec input param since it is always vp8 Created 6 years, 6 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/base/android/media_source_player_unittest.cc
diff --git a/media/base/android/media_source_player_unittest.cc b/media/base/android/media_source_player_unittest.cc
index 2422d64f2a1d512d7764652974874346a81b136f..b56a906d00ea38a1f6f214f746fa8c23f38ccdc7 100644
--- a/media/base/android/media_source_player_unittest.cc
+++ b/media/base/android/media_source_player_unittest.cc
@@ -285,10 +285,10 @@ class MediaSourcePlayerTest : public testing::Test {
return configs;
}
- DemuxerConfigs CreateVideoDemuxerConfigs(VideoCodec video_codec) {
+ DemuxerConfigs CreateVideoDemuxerConfigs(const gfx::Size& size) {
wolenetz 2014/06/05 20:06:47 nit: parallel the "bool use_low_sample_rate" audio
qinmin 2014/06/05 20:42:12 Done.
DemuxerConfigs configs;
- configs.video_codec = video_codec;
- configs.video_size = gfx::Size(320, 240);
+ configs.video_codec = kCodecVP8;
+ configs.video_size = size;
configs.is_video_encrypted = false;
configs.duration = kDefaultDuration;
return configs;
@@ -309,7 +309,7 @@ class MediaSourcePlayerTest : public testing::Test {
return CreateAudioDemuxerConfigs(kCodecVorbis, false);
if (have_video && !have_audio)
- return CreateVideoDemuxerConfigs(kCodecVP8);
+ return CreateVideoDemuxerConfigs(gfx::Size(320, 240));
return CreateAudioVideoDemuxerConfigs();
}
@@ -321,7 +321,7 @@ class MediaSourcePlayerTest : public testing::Test {
// Starts a video decoder job.
void StartVideoDecoderJob() {
- Start(CreateVideoDemuxerConfigs(kCodecVP8));
+ Start(CreateVideoDemuxerConfigs(gfx::Size(320, 240)));
}
// Starts decoding the data.
@@ -644,7 +644,7 @@ class MediaSourcePlayerTest : public testing::Test {
DemuxerConfigs configs = is_audio ?
CreateAudioDemuxerConfigs(kCodecAAC, false) :
- CreateVideoDemuxerConfigs(kCodecVP9);
+ CreateVideoDemuxerConfigs(gfx::Size(640, 480));
// Feed and decode access units with data for any units prior to
// |config_unit_index|, and a |kConfigChanged| unit at that index.
// Player should prepare to reconfigure the decoder job, and should request
@@ -916,7 +916,8 @@ TEST_F(MediaSourcePlayerTest, SetSurfaceWhileSeeking) {
// Test SetVideoSurface() will not cause an extra seek while the player is
// waiting for demuxer to indicate seek is done.
- player_.OnDemuxerConfigsAvailable(CreateVideoDemuxerConfigs(kCodecVP8));
+ player_.OnDemuxerConfigsAvailable(
+ CreateVideoDemuxerConfigs(gfx::Size(320, 240)));
// Initiate a seek. Skip requesting element seek of renderer.
// Instead behave as if the renderer has asked us to seek.
@@ -1073,7 +1074,7 @@ TEST_F(MediaSourcePlayerTest, VideoOnlyStartAfterSeekFinish) {
// Test video decoder job will not start until pending seek event is handled.
CreateNextTextureAndSetVideoSurface();
- DemuxerConfigs configs = CreateVideoDemuxerConfigs(kCodecVP8);
+ DemuxerConfigs configs = CreateVideoDemuxerConfigs(gfx::Size(320, 240));
player_.OnDemuxerConfigsAvailable(configs);
// Initiate a seek. Skip requesting element seek of renderer.
@@ -1242,7 +1243,7 @@ TEST_F(MediaSourcePlayerTest, AV_PlaybackCompletionAcrossConfigChange) {
Start(CreateAudioVideoDemuxerConfigs());
player_.OnDemuxerDataAvailable(CreateEOSAck(true)); // Audio EOS
- DemuxerConfigs configs = CreateVideoDemuxerConfigs(kCodecVP9);
+ DemuxerConfigs configs = CreateVideoDemuxerConfigs(gfx::Size(640, 480));
player_.OnDemuxerDataAvailable(CreateReadFromDemuxerAckWithConfigChanged(
false, 0, configs)); // Video |kConfigChanged| as first unit.
@@ -1667,7 +1668,7 @@ TEST_F(MediaSourcePlayerTest, SimultaneousAudioVideoConfigChange) {
// Simulate video |kConfigChanged| prefetched as standalone access unit.
player_.OnDemuxerDataAvailable(
CreateReadFromDemuxerAckWithConfigChanged(
- false, 0, CreateVideoDemuxerConfigs(kCodecVP9)));
+ false, 0, CreateVideoDemuxerConfigs(gfx::Size(640, 480))));
EXPECT_EQ(6, demuxer_->num_data_requests());
EXPECT_TRUE(IsDrainingDecoder(true));
EXPECT_TRUE(IsDrainingDecoder(false));
@@ -2091,7 +2092,7 @@ TEST_F(MediaSourcePlayerTest, SurfaceChangeClearedEvenIfMediaCryptoAbsent) {
// Test that |SURFACE_CHANGE_EVENT_PENDING| is not pending after
// SetVideoSurface() for a player configured for encrypted video, when the
// player has not yet received media crypto.
- DemuxerConfigs configs = CreateVideoDemuxerConfigs(kCodecVP8);
+ DemuxerConfigs configs = CreateVideoDemuxerConfigs(gfx::Size(320, 240));
configs.is_video_encrypted = true;
player_.OnDemuxerConfigsAvailable(configs);
« 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