| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/base/android/media_codec_player.h" | 5 #include "media/base/android/media_codec_player.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 base::TimeDelta reconfigure_timeout = base::TimeDelta::FromMilliseconds(800); | 1401 base::TimeDelta reconfigure_timeout = base::TimeDelta::FromMilliseconds(800); |
| 1402 EXPECT_TRUE( | 1402 EXPECT_TRUE( |
| 1403 WaitForCondition(base::Bind(&MockMediaPlayerManager::IsPlaybackStarted, | 1403 WaitForCondition(base::Bind(&MockMediaPlayerManager::IsPlaybackStarted, |
| 1404 base::Unretained(&manager_)), | 1404 base::Unretained(&manager_)), |
| 1405 reconfigure_timeout)); | 1405 reconfigure_timeout)); |
| 1406 | 1406 |
| 1407 // Timestamps should start at the new seek position | 1407 // Timestamps should start at the new seek position |
| 1408 EXPECT_LE(seek_position, manager_.pts_stat_.min()); | 1408 EXPECT_LE(seek_position, manager_.pts_stat_.min()); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 TEST_F(MediaCodecPlayerTest, VideoReleaseWhileWaitingForSeek) { | 1411 // Flaky test: https://crbug.com/609444 |
| 1412 TEST_F(MediaCodecPlayerTest, DISABLED_VideoReleaseWhileWaitingForSeek) { |
| 1412 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1413 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1413 | 1414 |
| 1414 base::TimeDelta duration = base::TimeDelta::FromMilliseconds(2000); | 1415 base::TimeDelta duration = base::TimeDelta::FromMilliseconds(2000); |
| 1415 base::TimeDelta seek_position = base::TimeDelta::FromMilliseconds(1000); | 1416 base::TimeDelta seek_position = base::TimeDelta::FromMilliseconds(1000); |
| 1416 | 1417 |
| 1417 ASSERT_TRUE(StartVideoPlayback(duration, "VideoReleaseWhileWaitingForSeek")); | 1418 ASSERT_TRUE(StartVideoPlayback(duration, "VideoReleaseWhileWaitingForSeek")); |
| 1418 | 1419 |
| 1419 // Wait for some time and check statistics. | 1420 // Wait for some time and check statistics. |
| 1420 WaitForDelay(base::TimeDelta::FromMilliseconds(200)); | 1421 WaitForDelay(base::TimeDelta::FromMilliseconds(200)); |
| 1421 | 1422 |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2265 // TODO(timav): maybe we should not call the testing callback for | 2266 // TODO(timav): maybe we should not call the testing callback for |
| 2266 // kRenderAfterPreroll for video (for audio we already do not call). | 2267 // kRenderAfterPreroll for video (for audio we already do not call). |
| 2267 // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO), | 2268 // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO), |
| 2268 // manager_.FirstFrameTime(DemuxerStream::VIDEO), 50)); | 2269 // manager_.FirstFrameTime(DemuxerStream::VIDEO), 50)); |
| 2269 | 2270 |
| 2270 // The playback should start at |seek_position| | 2271 // The playback should start at |seek_position| |
| 2271 EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25)); | 2272 EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25)); |
| 2272 } | 2273 } |
| 2273 | 2274 |
| 2274 } // namespace media | 2275 } // namespace media |
| OLD | NEW |