| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "media/base/android/media_codec_bridge.h" | 10 #include "media/base/android/media_codec_bridge.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 // Send back the seek done notification. This should trigger the player to | 424 // Send back the seek done notification. This should trigger the player to |
| 425 // call OnReadFromDemuxer() again. | 425 // call OnReadFromDemuxer() again. |
| 426 EXPECT_EQ(original_num_data_requests, demuxer_->num_data_requests()); | 426 EXPECT_EQ(original_num_data_requests, demuxer_->num_data_requests()); |
| 427 player_.OnDemuxerSeekDone(kNoTimestamp()); | 427 player_.OnDemuxerSeekDone(kNoTimestamp()); |
| 428 EXPECT_EQ(original_num_data_requests + 1, demuxer_->num_data_requests()); | 428 EXPECT_EQ(original_num_data_requests + 1, demuxer_->num_data_requests()); |
| 429 | 429 |
| 430 // No other seek should have been requested. | 430 // No other seek should have been requested. |
| 431 EXPECT_EQ(original_num_seeks + 1, demuxer_->num_seek_requests()); | 431 EXPECT_EQ(original_num_seeks + 1, demuxer_->num_seek_requests()); |
| 432 } | 432 } |
| 433 | 433 |
| 434 // Preroll the decoder job to |target_timestamp|. The first access unit |
| 435 // to decode will have a timestamp equal to |start_timestamp|. |
| 436 // TODO(qinmin): Add additional test cases for out-of-order decodes. |
| 437 // See http://crbug.com/331421. |
| 438 void PrerollDecoderToTime(bool is_audio, |
| 439 const base::TimeDelta& start_timestamp, |
| 440 const base::TimeDelta& target_timestamp) { |
| 441 EXPECT_EQ(target_timestamp, player_.GetCurrentTime()); |
| 442 // |start_timestamp| must be smaller than |target_timestamp|. |
| 443 EXPECT_LE(start_timestamp, target_timestamp); |
| 444 DemuxerData data = is_audio ? CreateReadFromDemuxerAckForAudio(1) : |
| 445 CreateReadFromDemuxerAckForVideo(); |
| 446 int current_timestamp = start_timestamp.InMilliseconds(); |
| 447 |
| 448 // Send some data with access unit timestamps before the |target_timestamp|, |
| 449 // and continue sending the data until preroll finishes. |
| 450 // This simulates the common condition that AUs received after browser |
| 451 // seek begin with timestamps before the seek target, and don't |
| 452 // immediately complete preroll. |
| 453 while (IsPrerolling(is_audio)) { |
| 454 data.access_units[0].timestamp = |
| 455 base::TimeDelta::FromMilliseconds(current_timestamp); |
| 456 player_.OnDemuxerDataAvailable(data); |
| 457 EXPECT_TRUE(GetMediaDecoderJob(is_audio)->is_decoding()); |
| 458 EXPECT_EQ(target_timestamp, player_.GetCurrentTime()); |
| 459 current_timestamp += 30; |
| 460 message_loop_.Run(); |
| 461 } |
| 462 EXPECT_LE(target_timestamp, player_.GetCurrentTime()); |
| 463 } |
| 464 |
| 434 DemuxerData CreateReadFromDemuxerAckWithConfigChanged(bool is_audio, | 465 DemuxerData CreateReadFromDemuxerAckWithConfigChanged(bool is_audio, |
| 435 int config_unit_index) { | 466 int config_unit_index) { |
| 436 DemuxerData data; | 467 DemuxerData data; |
| 437 data.type = is_audio ? DemuxerStream::AUDIO : DemuxerStream::VIDEO; | 468 data.type = is_audio ? DemuxerStream::AUDIO : DemuxerStream::VIDEO; |
| 438 data.access_units.resize(config_unit_index + 1); | 469 data.access_units.resize(config_unit_index + 1); |
| 439 | 470 |
| 440 for (int i = 0; i < config_unit_index; ++i) | 471 for (int i = 0; i < config_unit_index; ++i) |
| 441 data.access_units[i] = CreateAccessUnitWithData(is_audio, i); | 472 data.access_units[i] = CreateAccessUnitWithData(is_audio, i); |
| 442 | 473 |
| 443 data.access_units[config_unit_index].status = DemuxerStream::kConfigChanged; | 474 data.access_units[config_unit_index].status = DemuxerStream::kConfigChanged; |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 } | 1371 } |
| 1341 | 1372 |
| 1342 TEST_F(MediaSourcePlayerTest, PrerollAudioAfterSeek) { | 1373 TEST_F(MediaSourcePlayerTest, PrerollAudioAfterSeek) { |
| 1343 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1374 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1344 | 1375 |
| 1345 // Test decoder job will preroll the media to the seek position. | 1376 // Test decoder job will preroll the media to the seek position. |
| 1346 StartAudioDecoderJob(true); | 1377 StartAudioDecoderJob(true); |
| 1347 | 1378 |
| 1348 SeekPlayerWithAbort(true, base::TimeDelta::FromMilliseconds(100)); | 1379 SeekPlayerWithAbort(true, base::TimeDelta::FromMilliseconds(100)); |
| 1349 EXPECT_TRUE(IsPrerolling(true)); | 1380 EXPECT_TRUE(IsPrerolling(true)); |
| 1350 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); | 1381 PrerollDecoderToTime( |
| 1351 | 1382 true, base::TimeDelta(), base::TimeDelta::FromMilliseconds(100)); |
| 1352 // Send some data before the seek position. | |
| 1353 for (int i = 1; i < 4; ++i) { | |
| 1354 player_.OnDemuxerDataAvailable(CreateReadFromDemuxerAckForAudio(i)); | |
| 1355 EXPECT_TRUE(GetMediaDecoderJob(true)->is_decoding()); | |
| 1356 message_loop_.Run(); | |
| 1357 } | |
| 1358 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1359 EXPECT_TRUE(IsPrerolling(true)); | |
| 1360 | |
| 1361 // Send data after the seek position. | |
| 1362 DemuxerData data = CreateReadFromDemuxerAckForAudio(3); | |
| 1363 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(100); | |
| 1364 player_.OnDemuxerDataAvailable(data); | |
| 1365 message_loop_.Run(); | |
| 1366 EXPECT_LT(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1367 EXPECT_FALSE(IsPrerolling(true)); | |
| 1368 } | 1383 } |
| 1369 | 1384 |
| 1370 TEST_F(MediaSourcePlayerTest, PrerollVideoAfterSeek) { | 1385 TEST_F(MediaSourcePlayerTest, PrerollVideoAfterSeek) { |
| 1371 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1386 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1372 | 1387 |
| 1373 // Test decoder job will preroll the media to the seek position. | 1388 // Test decoder job will preroll the media to the seek position. |
| 1374 CreateNextTextureAndSetVideoSurface(); | 1389 CreateNextTextureAndSetVideoSurface(); |
| 1375 StartVideoDecoderJob(true); | 1390 StartVideoDecoderJob(true); |
| 1376 | 1391 |
| 1377 SeekPlayerWithAbort(false, base::TimeDelta::FromMilliseconds(100)); | 1392 SeekPlayerWithAbort(false, base::TimeDelta::FromMilliseconds(100)); |
| 1378 EXPECT_TRUE(IsPrerolling(false)); | 1393 EXPECT_TRUE(IsPrerolling(false)); |
| 1379 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); | 1394 PrerollDecoderToTime( |
| 1380 | 1395 false, base::TimeDelta(), base::TimeDelta::FromMilliseconds(100)); |
| 1381 // Send some data before the seek position. | |
| 1382 DemuxerData data; | |
| 1383 for (int i = 1; i < 4; ++i) { | |
| 1384 data = CreateReadFromDemuxerAckForVideo(); | |
| 1385 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(i * 30); | |
| 1386 player_.OnDemuxerDataAvailable(data); | |
| 1387 EXPECT_TRUE(GetMediaDecoderJob(false)->is_decoding()); | |
| 1388 message_loop_.Run(); | |
| 1389 } | |
| 1390 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1391 EXPECT_TRUE(IsPrerolling(false)); | |
| 1392 | |
| 1393 // Send data at the seek position. | |
| 1394 data = CreateReadFromDemuxerAckForVideo(); | |
| 1395 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(100); | |
| 1396 player_.OnDemuxerDataAvailable(data); | |
| 1397 message_loop_.Run(); | |
| 1398 | |
| 1399 // TODO(wolenetz/qinmin): Player's maintenance of current time for video-only | |
| 1400 // streams depends on decoder output, which may be initially inaccurate, and | |
| 1401 // encoded video test data may also need updating. Verify at least that AU | |
| 1402 // timestamp-based preroll logic has determined video preroll has completed. | |
| 1403 // See http://crbug.com/310823 and http://b/11356652. | |
| 1404 EXPECT_FALSE(IsPrerolling(false)); | |
| 1405 } | 1396 } |
| 1406 | 1397 |
| 1407 TEST_F(MediaSourcePlayerTest, SeekingAfterCompletingPrerollRestartsPreroll) { | 1398 TEST_F(MediaSourcePlayerTest, SeekingAfterCompletingPrerollRestartsPreroll) { |
| 1408 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1399 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1409 | 1400 |
| 1410 // Test decoder job will begin prerolling upon seek, when it was not | 1401 // Test decoder job will begin prerolling upon seek, when it was not |
| 1411 // prerolling prior to the seek. | 1402 // prerolling prior to the seek. |
| 1412 StartAudioDecoderJob(true); | 1403 StartAudioDecoderJob(true); |
| 1413 MediaDecoderJob* decoder_job = GetMediaDecoderJob(true); | 1404 MediaDecoderJob* decoder_job = GetMediaDecoderJob(true); |
| 1414 EXPECT_TRUE(IsPrerolling(true)); | 1405 EXPECT_TRUE(IsPrerolling(true)); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 EXPECT_EQ(decoder_job, GetMediaDecoderJob(true)); | 1437 EXPECT_EQ(decoder_job, GetMediaDecoderJob(true)); |
| 1447 } | 1438 } |
| 1448 | 1439 |
| 1449 TEST_F(MediaSourcePlayerTest, PrerollContinuesAcrossReleaseAndStart) { | 1440 TEST_F(MediaSourcePlayerTest, PrerollContinuesAcrossReleaseAndStart) { |
| 1450 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1441 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1451 | 1442 |
| 1452 // Test decoder job will resume media prerolling if interrupted by Release() | 1443 // Test decoder job will resume media prerolling if interrupted by Release() |
| 1453 // and Start(). | 1444 // and Start(). |
| 1454 StartAudioDecoderJob(true); | 1445 StartAudioDecoderJob(true); |
| 1455 | 1446 |
| 1456 SeekPlayerWithAbort(true, base::TimeDelta::FromMilliseconds(100)); | 1447 base::TimeDelta target_timestamp = base::TimeDelta::FromMilliseconds(100); |
| 1448 SeekPlayerWithAbort(true, target_timestamp); |
| 1457 EXPECT_TRUE(IsPrerolling(true)); | 1449 EXPECT_TRUE(IsPrerolling(true)); |
| 1458 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); | 1450 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); |
| 1459 | 1451 |
| 1460 // Send some data before the seek position. | 1452 // Send some data before the seek position. |
| 1461 // Test uses 'large' number of iterations because decoder job may not get | 1453 // Test uses 'large' number of iterations because decoder job may not get |
| 1462 // MEDIA_CODEC_OK output status until after a few dequeue output attempts. | 1454 // MEDIA_CODEC_OK output status until after a few dequeue output attempts. |
| 1463 // This allows decoder status to stabilize prior to AU timestamp reaching | 1455 // This allows decoder status to stabilize prior to AU timestamp reaching |
| 1464 // the preroll target. | 1456 // the preroll target. |
| 1465 DemuxerData data; | 1457 DemuxerData data; |
| 1466 for (int i = 0; i < 10; ++i) { | 1458 for (int i = 0; i < 10; ++i) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1485 player_.OnDemuxerDataAvailable(data); | 1477 player_.OnDemuxerDataAvailable(data); |
| 1486 EXPECT_TRUE(GetMediaDecoderJob(true)->is_decoding()); | 1478 EXPECT_TRUE(GetMediaDecoderJob(true)->is_decoding()); |
| 1487 message_loop_.Run(); | 1479 message_loop_.Run(); |
| 1488 } | 1480 } |
| 1489 EXPECT_TRUE(IsPrerolling(true)); | 1481 EXPECT_TRUE(IsPrerolling(true)); |
| 1490 } | 1482 } |
| 1491 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); | 1483 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); |
| 1492 EXPECT_TRUE(IsPrerolling(true)); | 1484 EXPECT_TRUE(IsPrerolling(true)); |
| 1493 | 1485 |
| 1494 // Send data after the seek position. | 1486 // Send data after the seek position. |
| 1495 data = CreateReadFromDemuxerAckForAudio(3); | 1487 PrerollDecoderToTime(true, target_timestamp, target_timestamp); |
| 1496 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(100); | |
| 1497 player_.OnDemuxerDataAvailable(data); | |
| 1498 message_loop_.Run(); | |
| 1499 EXPECT_LT(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1500 EXPECT_FALSE(IsPrerolling(true)); | |
| 1501 } | 1488 } |
| 1502 | 1489 |
| 1503 TEST_F(MediaSourcePlayerTest, PrerollContinuesAcrossConfigChange) { | 1490 TEST_F(MediaSourcePlayerTest, PrerollContinuesAcrossConfigChange) { |
| 1504 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1491 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1505 | 1492 |
| 1506 // Test decoder job will resume media prerolling if interrupted by | 1493 // Test decoder job will resume media prerolling if interrupted by |
| 1507 // |kConfigChanged| and OnDemuxerConfigsAvailable(). | 1494 // |kConfigChanged| and OnDemuxerConfigsAvailable(). |
| 1508 StartAudioDecoderJob(true); | 1495 StartAudioDecoderJob(true); |
| 1509 | 1496 |
| 1510 SeekPlayerWithAbort(true, base::TimeDelta::FromMilliseconds(100)); | 1497 SeekPlayerWithAbort(true, base::TimeDelta::FromMilliseconds(100)); |
| 1511 EXPECT_TRUE(IsPrerolling(true)); | 1498 EXPECT_TRUE(IsPrerolling(true)); |
| 1512 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); | 1499 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); |
| 1513 | 1500 |
| 1514 // In response to data request, simulate that demuxer signals config change by | 1501 // In response to data request, simulate that demuxer signals config change by |
| 1515 // sending an AU with |kConfigChanged|. Player should prepare to reconfigure | 1502 // sending an AU with |kConfigChanged|. Player should prepare to reconfigure |
| 1516 // the audio decoder job, and should request new demuxer configs. | 1503 // the audio decoder job, and should request new demuxer configs. |
| 1517 DemuxerData data = CreateReadFromDemuxerAckWithConfigChanged(true, 0); | 1504 DemuxerData data = CreateReadFromDemuxerAckWithConfigChanged(true, 0); |
| 1518 EXPECT_EQ(0, demuxer_->num_config_requests()); | 1505 EXPECT_EQ(0, demuxer_->num_config_requests()); |
| 1519 player_.OnDemuxerDataAvailable(data); | 1506 player_.OnDemuxerDataAvailable(data); |
| 1520 EXPECT_EQ(1, demuxer_->num_config_requests()); | 1507 EXPECT_EQ(1, demuxer_->num_config_requests()); |
| 1521 | 1508 |
| 1522 // Simulate arrival of new configs. | 1509 // Simulate arrival of new configs. |
| 1523 player_.OnDemuxerConfigsAvailable(CreateAudioDemuxerConfigs(kCodecVorbis)); | 1510 player_.OnDemuxerConfigsAvailable(CreateAudioDemuxerConfigs(kCodecVorbis)); |
| 1524 | 1511 |
| 1525 // Send some data before the seek position. | 1512 PrerollDecoderToTime( |
| 1526 for (int i = 1; i < 4; ++i) { | 1513 true, base::TimeDelta(), base::TimeDelta::FromMilliseconds(100)); |
| 1527 player_.OnDemuxerDataAvailable(CreateReadFromDemuxerAckForAudio(i)); | |
| 1528 EXPECT_TRUE(GetMediaDecoderJob(true)->is_decoding()); | |
| 1529 message_loop_.Run(); | |
| 1530 } | |
| 1531 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1532 EXPECT_TRUE(IsPrerolling(true)); | |
| 1533 | |
| 1534 // Send data after the seek position. | |
| 1535 data = CreateReadFromDemuxerAckForAudio(3); | |
| 1536 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(100); | |
| 1537 player_.OnDemuxerDataAvailable(data); | |
| 1538 message_loop_.Run(); | |
| 1539 EXPECT_LT(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1540 EXPECT_FALSE(IsPrerolling(true)); | |
| 1541 } | 1514 } |
| 1542 | 1515 |
| 1543 TEST_F(MediaSourcePlayerTest, SimultaneousAudioVideoConfigChange) { | 1516 TEST_F(MediaSourcePlayerTest, SimultaneousAudioVideoConfigChange) { |
| 1544 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1517 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1545 | 1518 |
| 1546 // Test that the player allows simultaneous audio and video config change, | 1519 // Test that the player allows simultaneous audio and video config change, |
| 1547 // such as might occur during OnPrefetchDone() if next access unit for both | 1520 // such as might occur during OnPrefetchDone() if next access unit for both |
| 1548 // audio and video jobs is |kConfigChanged|. | 1521 // audio and video jobs is |kConfigChanged|. |
| 1549 CreateNextTextureAndSetVideoSurface(); | 1522 CreateNextTextureAndSetVideoSurface(); |
| 1550 Start(CreateAudioVideoDemuxerConfigs(), true); | 1523 Start(CreateAudioVideoDemuxerConfigs(), true); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 BrowserSeekPlayer(false); | 1599 BrowserSeekPlayer(false); |
| 1627 | 1600 |
| 1628 // Simulate browser seek is done, but to a later time than was requested. | 1601 // Simulate browser seek is done, but to a later time than was requested. |
| 1629 EXPECT_LT(player_.GetCurrentTime().InMillisecondsF(), 100); | 1602 EXPECT_LT(player_.GetCurrentTime().InMillisecondsF(), 100); |
| 1630 player_.OnDemuxerSeekDone(base::TimeDelta::FromMilliseconds(100)); | 1603 player_.OnDemuxerSeekDone(base::TimeDelta::FromMilliseconds(100)); |
| 1631 EXPECT_TRUE(GetMediaDecoderJob(false)); | 1604 EXPECT_TRUE(GetMediaDecoderJob(false)); |
| 1632 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); | 1605 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); |
| 1633 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); | 1606 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); |
| 1634 EXPECT_EQ(2, demuxer_->num_data_requests()); | 1607 EXPECT_EQ(2, demuxer_->num_data_requests()); |
| 1635 | 1608 |
| 1636 // Send some data with access unit timestamps before the actual browser seek | 1609 PrerollDecoderToTime( |
| 1637 // position. This is a bit unrealistic in this case where the browser seek | 1610 false, base::TimeDelta(), base::TimeDelta::FromMilliseconds(100)); |
| 1638 // jumped forward and next data from demuxer would normally begin at this | |
| 1639 // browser seek position, immediately completing preroll. For simplicity and | |
| 1640 // coverage, this test simulates the more common condition that AUs received | |
| 1641 // after browser seek begin with timestamps before the seek target, and don't | |
| 1642 // immediately complete preroll. | |
| 1643 DemuxerData data; | |
| 1644 for (int i = 1; i < 4; ++i) { | |
| 1645 data = CreateReadFromDemuxerAckForVideo(); | |
| 1646 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(i * 30); | |
| 1647 player_.OnDemuxerDataAvailable(data); | |
| 1648 EXPECT_TRUE(GetMediaDecoderJob(false)->is_decoding()); | |
| 1649 message_loop_.Run(); | |
| 1650 EXPECT_TRUE(IsPrerolling(false)); | |
| 1651 } | |
| 1652 | |
| 1653 EXPECT_EQ(100.0, player_.GetCurrentTime().InMillisecondsF()); | |
| 1654 | |
| 1655 // Send data after the browser seek position. | |
| 1656 data = CreateReadFromDemuxerAckForVideo(); | |
| 1657 data.access_units[0].timestamp = base::TimeDelta::FromMilliseconds(120); | |
| 1658 player_.OnDemuxerDataAvailable(data); | |
| 1659 message_loop_.Run(); | |
| 1660 EXPECT_FALSE(IsPrerolling(false)); | |
| 1661 } | 1611 } |
| 1662 | 1612 |
| 1663 TEST_F(MediaSourcePlayerTest, VideoDemuxerConfigChange) { | 1613 TEST_F(MediaSourcePlayerTest, VideoDemuxerConfigChange) { |
| 1664 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1614 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1665 | 1615 |
| 1666 // Test that video config change notification results in request for demuxer | 1616 // Test that video config change notification results in request for demuxer |
| 1667 // configuration, and that a video decoder job results without any browser | 1617 // configuration, and that a video decoder job results without any browser |
| 1668 // seek necessary once the new demuxer config arrives. | 1618 // seek necessary once the new demuxer config arrives. |
| 1669 StartConfigChange(false, true, 1); | 1619 StartConfigChange(false, true, 1); |
| 1670 MediaDecoderJob* first_job = GetMediaDecoderJob(false); | 1620 MediaDecoderJob* first_job = GetMediaDecoderJob(false); |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 | 2063 |
| 2114 std::vector<std::string> codec_avc(1, "avc1"); | 2064 std::vector<std::string> codec_avc(1, "avc1"); |
| 2115 EXPECT_FALSE(IsTypeSupported(invalid_uuid, kL3, kVideoMp4, codec_avc)); | 2065 EXPECT_FALSE(IsTypeSupported(invalid_uuid, kL3, kVideoMp4, codec_avc)); |
| 2116 EXPECT_FALSE(IsTypeSupported(invalid_uuid, kL1, kVideoMp4, codec_avc)); | 2066 EXPECT_FALSE(IsTypeSupported(invalid_uuid, kL1, kVideoMp4, codec_avc)); |
| 2117 } | 2067 } |
| 2118 | 2068 |
| 2119 // TODO(xhwang): Are these IsTypeSupported tests device specific? | 2069 // TODO(xhwang): Are these IsTypeSupported tests device specific? |
| 2120 // TODO(xhwang): Add more IsTypeSupported tests. | 2070 // TODO(xhwang): Add more IsTypeSupported tests. |
| 2121 | 2071 |
| 2122 } // namespace media | 2072 } // namespace media |
| OLD | NEW |