Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
| 6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
| 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
| 8 // Win/EGL. | 8 // Win/EGL. |
| 9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
| 10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 // working directory. | 143 // working directory. |
| 144 base::FilePath g_test_file_path; | 144 base::FilePath g_test_file_path; |
| 145 | 145 |
| 146 // Environment to store rendering thread. | 146 // Environment to store rendering thread. |
| 147 class VideoDecodeAcceleratorTestEnvironment; | 147 class VideoDecodeAcceleratorTestEnvironment; |
| 148 VideoDecodeAcceleratorTestEnvironment* g_env; | 148 VideoDecodeAcceleratorTestEnvironment* g_env; |
| 149 | 149 |
| 150 // Magic constants for differentiating the reasons for NotifyResetDone being | 150 // Magic constants for differentiating the reasons for NotifyResetDone being |
| 151 // called. | 151 // called. |
| 152 enum ResetPoint { | 152 enum ResetPoint { |
| 153 // Reset() right after calling Flush() (before getting NotifyFlushDone()). | |
| 154 RESET_BEFORE_NOTIFY_FLUSH_DONE = -5, | |
| 153 // Reset() just after calling Decode() with a fragment containing config info. | 155 // Reset() just after calling Decode() with a fragment containing config info. |
| 154 RESET_AFTER_FIRST_CONFIG_INFO = -4, | 156 RESET_AFTER_FIRST_CONFIG_INFO = -4, |
| 155 START_OF_STREAM_RESET = -3, | 157 START_OF_STREAM_RESET = -3, |
| 156 MID_STREAM_RESET = -2, | 158 MID_STREAM_RESET = -2, |
| 157 END_OF_STREAM_RESET = -1 | 159 END_OF_STREAM_RESET = -1 |
| 158 }; | 160 }; |
| 159 | 161 |
| 160 const int kMaxResetAfterFrameNum = 100; | 162 const int kMaxResetAfterFrameNum = 100; |
| 161 const int kMaxFramesToDelayReuse = 64; | 163 const int kMaxFramesToDelayReuse = 64; |
| 162 const base::TimeDelta kReuseDelay = base::TimeDelta::FromSeconds(1); | 164 const base::TimeDelta kReuseDelay = base::TimeDelta::FromSeconds(1); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 455 void NotifyResetDone() override; | 457 void NotifyResetDone() override; |
| 456 void NotifyError(VideoDecodeAccelerator::Error error) override; | 458 void NotifyError(VideoDecodeAccelerator::Error error) override; |
| 457 | 459 |
| 458 void OutputFrameDeliveryTimes(base::File* output); | 460 void OutputFrameDeliveryTimes(base::File* output); |
| 459 | 461 |
| 460 // Simple getters for inspecting the state of the Client. | 462 // Simple getters for inspecting the state of the Client. |
| 461 int num_done_bitstream_buffers() { return num_done_bitstream_buffers_; } | 463 int num_done_bitstream_buffers() { return num_done_bitstream_buffers_; } |
| 462 int num_skipped_fragments() { return num_skipped_fragments_; } | 464 int num_skipped_fragments() { return num_skipped_fragments_; } |
| 463 int num_queued_fragments() { return num_queued_fragments_; } | 465 int num_queued_fragments() { return num_queued_fragments_; } |
| 464 int num_decoded_frames() { return num_decoded_frames_; } | 466 int num_decoded_frames() { return num_decoded_frames_; } |
| 467 int num_decoded_frames_before_reset() { | |
| 468 return num_decoded_frames_before_reset_; | |
| 469 } | |
| 465 double frames_per_second(); | 470 double frames_per_second(); |
| 466 // Return the median of the decode time of all decoded frames. | 471 // Return the median of the decode time of all decoded frames. |
| 467 base::TimeDelta decode_time_median(); | 472 base::TimeDelta decode_time_median(); |
| 468 bool decoder_deleted() { return !decoder_.get(); } | 473 bool decoder_deleted() { return !decoder_.get(); } |
| 469 | 474 |
| 470 private: | 475 private: |
| 471 typedef std::map<int32_t, scoped_refptr<TextureRef>> TextureRefMap; | 476 typedef std::map<int32_t, scoped_refptr<TextureRef>> TextureRefMap; |
| 472 | 477 |
| 473 void SetState(ClientState new_state); | 478 void SetState(ClientState new_state); |
| 474 void FinishInitialization(); | 479 void FinishInitialization(); |
| 475 void ReturnPicture(int32_t picture_buffer_id); | 480 void ReturnPicture(int32_t picture_buffer_id); |
| 476 | 481 |
| 477 // Delete the associated decoder helper. | 482 // Delete the associated decoder helper. |
| 478 void DeleteDecoder(); | 483 void DeleteDecoder(); |
| 484 // Reset the associated decoder helpr. | |
|
wuchengli
2017/03/02 09:44:04
helper
johnylin1
2017/03/07 07:44:16
Done.
| |
| 485 void ResetDecoder(); | |
| 479 | 486 |
| 480 // Compute & return the first encoded bytes (including a start frame) to send | 487 // Compute & return the first encoded bytes (including a start frame) to send |
| 481 // to the decoder, starting at |start_pos| and returning one fragment. Skips | 488 // to the decoder, starting at |start_pos| and returning one fragment. Skips |
| 482 // to the first decodable position. | 489 // to the first decodable position. |
| 483 std::string GetBytesForFirstFragment(size_t start_pos, size_t* end_pos); | 490 std::string GetBytesForFirstFragment(size_t start_pos, size_t* end_pos); |
| 484 // Compute & return the encoded bytes of next fragment to send to the decoder | 491 // Compute & return the encoded bytes of next fragment to send to the decoder |
| 485 // (based on |start_pos|). | 492 // (based on |start_pos|). |
| 486 std::string GetBytesForNextFragment(size_t start_pos, size_t* end_pos); | 493 std::string GetBytesForNextFragment(size_t start_pos, size_t* end_pos); |
| 487 // Helpers for GetBytesForNextFragment above. | 494 // Helpers for GetBytesForNextFragment above. |
| 488 void GetBytesForNextNALU(size_t start_pos, size_t* end_pos); // For h.264. | 495 void GetBytesForNextNALU(size_t start_pos, size_t* end_pos); // For h.264. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 506 std::unique_ptr<base::WeakPtrFactory<VideoDecodeAccelerator>> | 513 std::unique_ptr<base::WeakPtrFactory<VideoDecodeAccelerator>> |
| 507 weak_vda_ptr_factory_; | 514 weak_vda_ptr_factory_; |
| 508 std::unique_ptr<GpuVideoDecodeAcceleratorFactory> vda_factory_; | 515 std::unique_ptr<GpuVideoDecodeAcceleratorFactory> vda_factory_; |
| 509 int remaining_play_throughs_; | 516 int remaining_play_throughs_; |
| 510 int reset_after_frame_num_; | 517 int reset_after_frame_num_; |
| 511 int delete_decoder_state_; | 518 int delete_decoder_state_; |
| 512 ClientState state_; | 519 ClientState state_; |
| 513 int num_skipped_fragments_; | 520 int num_skipped_fragments_; |
| 514 int num_queued_fragments_; | 521 int num_queued_fragments_; |
| 515 int num_decoded_frames_; | 522 int num_decoded_frames_; |
| 523 int num_decoded_frames_before_reset_; | |
| 516 int num_done_bitstream_buffers_; | 524 int num_done_bitstream_buffers_; |
| 517 base::TimeTicks initialize_done_ticks_; | 525 base::TimeTicks initialize_done_ticks_; |
| 518 VideoCodecProfile profile_; | 526 VideoCodecProfile profile_; |
| 519 int fake_decoder_; | 527 int fake_decoder_; |
| 520 GLenum texture_target_; | 528 GLenum texture_target_; |
| 521 VideoPixelFormat pixel_format_; | 529 VideoPixelFormat pixel_format_; |
| 522 bool suppress_rendering_; | 530 bool suppress_rendering_; |
| 523 std::vector<base::TimeTicks> frame_delivery_times_; | 531 std::vector<base::TimeTicks> frame_delivery_times_; |
| 524 int delay_reuse_after_frame_num_; | 532 int delay_reuse_after_frame_num_; |
| 525 // A map from bitstream buffer id to the decode start time of the buffer. | 533 // A map from bitstream buffer id to the decode start time of the buffer. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 587 encoded_data_next_pos_to_decode_(0), | 595 encoded_data_next_pos_to_decode_(0), |
| 588 next_bitstream_buffer_id_(0), | 596 next_bitstream_buffer_id_(0), |
| 589 note_(note), | 597 note_(note), |
| 590 remaining_play_throughs_(num_play_throughs), | 598 remaining_play_throughs_(num_play_throughs), |
| 591 reset_after_frame_num_(reset_after_frame_num), | 599 reset_after_frame_num_(reset_after_frame_num), |
| 592 delete_decoder_state_(delete_decoder_state), | 600 delete_decoder_state_(delete_decoder_state), |
| 593 state_(CS_CREATED), | 601 state_(CS_CREATED), |
| 594 num_skipped_fragments_(0), | 602 num_skipped_fragments_(0), |
| 595 num_queued_fragments_(0), | 603 num_queued_fragments_(0), |
| 596 num_decoded_frames_(0), | 604 num_decoded_frames_(0), |
| 605 num_decoded_frames_before_reset_(0), | |
| 597 num_done_bitstream_buffers_(0), | 606 num_done_bitstream_buffers_(0), |
| 598 fake_decoder_(fake_decoder), | 607 fake_decoder_(fake_decoder), |
| 599 texture_target_(0), | 608 texture_target_(0), |
| 600 pixel_format_(PIXEL_FORMAT_UNKNOWN), | 609 pixel_format_(PIXEL_FORMAT_UNKNOWN), |
| 601 suppress_rendering_(suppress_rendering), | 610 suppress_rendering_(suppress_rendering), |
| 602 delay_reuse_after_frame_num_(delay_reuse_after_frame_num), | 611 delay_reuse_after_frame_num_(delay_reuse_after_frame_num), |
| 603 decode_calls_per_second_(decode_calls_per_second), | 612 decode_calls_per_second_(decode_calls_per_second), |
| 604 render_as_thumbnails_(render_as_thumbnails), | 613 render_as_thumbnails_(render_as_thumbnails), |
| 605 next_picture_buffer_id_(1), | 614 next_picture_buffer_id_(1), |
| 606 weak_this_factory_(this) { | 615 weak_this_factory_(this) { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 800 if (num_decoded_frames_ > delay_reuse_after_frame_num_) { | 809 if (num_decoded_frames_ > delay_reuse_after_frame_num_) { |
| 801 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 810 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 802 FROM_HERE, base::Bind(&VideoDecodeAccelerator::ReusePictureBuffer, | 811 FROM_HERE, base::Bind(&VideoDecodeAccelerator::ReusePictureBuffer, |
| 803 weak_vda_, picture_buffer_id), | 812 weak_vda_, picture_buffer_id), |
| 804 kReuseDelay); | 813 kReuseDelay); |
| 805 } else { | 814 } else { |
| 806 decoder_->ReusePictureBuffer(picture_buffer_id); | 815 decoder_->ReusePictureBuffer(picture_buffer_id); |
| 807 } | 816 } |
| 808 } | 817 } |
| 809 | 818 |
| 819 void GLRenderingVDAClient::ResetDecoder() { | |
|
wuchengli
2017/03/02 09:44:05
The name is not very good. There are three other d
wuchengli
2017/03/02 10:07:12
As discussed, let's use ResetDecoderAfterFlush.
johnylin1
2017/03/07 07:44:16
Done.
| |
| 820 --remaining_play_throughs_; | |
| 821 DCHECK_GE(remaining_play_throughs_, 0); | |
| 822 num_decoded_frames_before_reset_ = num_decoded_frames_; | |
|
wuchengli
2017/03/02 10:07:12
It's more consistent to set num_decoded_frames_bef
johnylin1
2017/03/07 07:44:16
After discussed, we gonna add this check after ref
| |
| 823 decoder_->Reset(); | |
| 824 if (state_ == CS_FLUSHED) | |
|
wuchengli
2017/03/02 09:44:04
I don't understand. Why do we need this line?
wuchengli
2017/03/02 10:07:11
As discussed, this can be removed.
johnylin1
2017/03/07 07:44:16
Done.
| |
| 825 SetState(CS_RESETTING); | |
| 826 } | |
| 827 | |
| 810 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( | 828 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( |
| 811 int32_t bitstream_buffer_id) { | 829 int32_t bitstream_buffer_id) { |
| 812 if (decoder_deleted()) | 830 if (decoder_deleted()) |
| 813 return; | 831 return; |
| 814 | 832 |
| 815 // TODO(fischman): this test currently relies on this notification to make | 833 // TODO(fischman): this test currently relies on this notification to make |
| 816 // forward progress during a Reset(). But the VDA::Reset() API doesn't | 834 // forward progress during a Reset(). But the VDA::Reset() API doesn't |
| 817 // guarantee this, so stop relying on it (and remove the notifications from | 835 // guarantee this, so stop relying on it (and remove the notifications from |
| 818 // VaapiVideoDecodeAccelerator::FinishReset()). | 836 // VaapiVideoDecodeAccelerator::FinishReset()). |
| 819 ++num_done_bitstream_buffers_; | 837 ++num_done_bitstream_buffers_; |
| 820 --outstanding_decodes_; | 838 --outstanding_decodes_; |
| 821 | 839 |
| 822 // Flush decoder after all BitstreamBuffers are processed. | 840 // Flush decoder after all BitstreamBuffers are processed. |
| 823 if (encoded_data_next_pos_to_decode_ == encoded_data_.size()) { | 841 if (encoded_data_next_pos_to_decode_ == encoded_data_.size()) { |
| 824 if (state_ != CS_FLUSHING) { | 842 if (state_ != CS_FLUSHING) { |
| 825 decoder_->Flush(); | 843 decoder_->Flush(); |
| 826 SetState(CS_FLUSHING); | 844 SetState(CS_FLUSHING); |
| 845 if (reset_after_frame_num_ == RESET_BEFORE_NOTIFY_FLUSH_DONE) { | |
| 846 SetState(CS_FLUSHED); | |
| 847 ResetDecoder(); | |
| 848 } | |
| 827 } | 849 } |
| 828 } else if (decode_calls_per_second_ == 0) { | 850 } else if (decode_calls_per_second_ == 0) { |
| 829 DecodeNextFragment(); | 851 DecodeNextFragment(); |
| 830 } | 852 } |
| 831 } | 853 } |
| 832 | 854 |
| 833 void GLRenderingVDAClient::NotifyFlushDone() { | 855 void GLRenderingVDAClient::NotifyFlushDone() { |
| 834 if (decoder_deleted()) | 856 if (decoder_deleted()) |
| 835 return; | 857 return; |
| 836 | 858 |
| 859 if (reset_after_frame_num_ == RESET_BEFORE_NOTIFY_FLUSH_DONE) { | |
| 860 // In ResetBeforeNotifyFlushDone case client is not necessary to wait for | |
| 861 // NotifyFlushDone(). But if client gets, it should be always before | |
|
wuchengli
2017/03/02 09:44:05
s/gets/gets here/
johnylin1
2017/03/07 07:44:16
Done.
| |
| 862 // NotifyResetDone(). | |
| 863 LOG_ASSERT(state_ == CS_RESETTING); | |
|
wuchengli
2017/03/02 09:44:04
When state_ != CS_RESETTING, it can be a bug of dr
johnylin1
2017/03/07 07:44:16
Done.
| |
| 864 return; | |
| 865 } | |
| 866 | |
| 837 SetState(CS_FLUSHED); | 867 SetState(CS_FLUSHED); |
| 838 --remaining_play_throughs_; | 868 ResetDecoder(); |
| 839 DCHECK_GE(remaining_play_throughs_, 0); | |
| 840 if (decoder_deleted()) | |
| 841 return; | |
| 842 decoder_->Reset(); | |
| 843 SetState(CS_RESETTING); | |
| 844 } | 869 } |
| 845 | 870 |
| 846 void GLRenderingVDAClient::NotifyResetDone() { | 871 void GLRenderingVDAClient::NotifyResetDone() { |
| 847 if (decoder_deleted()) | 872 if (decoder_deleted()) |
| 848 return; | 873 return; |
| 849 | 874 |
| 850 if (reset_after_frame_num_ == MID_STREAM_RESET) { | 875 if (reset_after_frame_num_ == MID_STREAM_RESET) { |
| 851 reset_after_frame_num_ = END_OF_STREAM_RESET; | 876 reset_after_frame_num_ = END_OF_STREAM_RESET; |
| 852 DecodeNextFragment(); | 877 DecodeNextFragment(); |
| 853 return; | 878 return; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1056 next_bitstream_buffer_id_ = (next_bitstream_buffer_id_ + 1) & 0x3FFFFFFF; | 1081 next_bitstream_buffer_id_ = (next_bitstream_buffer_id_ + 1) & 0x3FFFFFFF; |
| 1057 decoder_->Decode(bitstream_buffer); | 1082 decoder_->Decode(bitstream_buffer); |
| 1058 ++outstanding_decodes_; | 1083 ++outstanding_decodes_; |
| 1059 if (!remaining_play_throughs_ && | 1084 if (!remaining_play_throughs_ && |
| 1060 -delete_decoder_state_ == next_bitstream_buffer_id_) { | 1085 -delete_decoder_state_ == next_bitstream_buffer_id_) { |
| 1061 DeleteDecoder(); | 1086 DeleteDecoder(); |
| 1062 } | 1087 } |
| 1063 | 1088 |
| 1064 if (reset_here) { | 1089 if (reset_here) { |
| 1065 reset_after_frame_num_ = MID_STREAM_RESET; | 1090 reset_after_frame_num_ = MID_STREAM_RESET; |
| 1066 decoder_->Reset(); | 1091 decoder_->Reset(); |
|
wuchengli
2017/03/02 09:44:04
I'm curious. Why the state doesn't need to be set
| |
| 1067 // Restart from the beginning to re-Decode() the SPS we just sent. | 1092 // Restart from the beginning to re-Decode() the SPS we just sent. |
| 1068 encoded_data_next_pos_to_decode_ = 0; | 1093 encoded_data_next_pos_to_decode_ = 0; |
| 1069 } else { | 1094 } else { |
| 1070 encoded_data_next_pos_to_decode_ = end_pos; | 1095 encoded_data_next_pos_to_decode_ = end_pos; |
| 1071 } | 1096 } |
| 1072 | 1097 |
| 1073 if (decode_calls_per_second_ > 0) { | 1098 if (decode_calls_per_second_ > 0) { |
| 1074 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 1099 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 1075 FROM_HERE, | 1100 FROM_HERE, |
| 1076 base::Bind(&GLRenderingVDAClient::DecodeNextFragment, AsWeakPtr()), | 1101 base::Bind(&GLRenderingVDAClient::DecodeNextFragment, AsWeakPtr()), |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1456 if (delete_decoder_state < CS_FLUSHED) | 1481 if (delete_decoder_state < CS_FLUSHED) |
| 1457 continue; | 1482 continue; |
| 1458 GLRenderingVDAClient* client = clients_[i].get(); | 1483 GLRenderingVDAClient* client = clients_[i].get(); |
| 1459 TestVideoFile* video_file = | 1484 TestVideoFile* video_file = |
| 1460 test_video_files_[i % test_video_files_.size()].get(); | 1485 test_video_files_[i % test_video_files_.size()].get(); |
| 1461 if (video_file->num_frames > 0) { | 1486 if (video_file->num_frames > 0) { |
| 1462 // Expect the decoded frames may be more than the video frames as frames | 1487 // Expect the decoded frames may be more than the video frames as frames |
| 1463 // could still be returned until resetting done. | 1488 // could still be returned until resetting done. |
| 1464 if (video_file->reset_after_frame_num > 0) | 1489 if (video_file->reset_after_frame_num > 0) |
| 1465 EXPECT_GE(client->num_decoded_frames(), video_file->num_frames); | 1490 EXPECT_GE(client->num_decoded_frames(), video_file->num_frames); |
| 1466 else | 1491 // In ResetBeforeNotifyFlushDone case the decoded frames may be less than |
| 1492 // the video frames because decoder is reset before flush done. | |
| 1493 else if (video_file->reset_after_frame_num != | |
| 1494 RESET_BEFORE_NOTIFY_FLUSH_DONE) | |
| 1467 EXPECT_EQ(client->num_decoded_frames(), video_file->num_frames); | 1495 EXPECT_EQ(client->num_decoded_frames(), video_file->num_frames); |
| 1496 EXPECT_GE(client->num_decoded_frames(), | |
| 1497 client->num_decoded_frames_before_reset()); | |
| 1468 } | 1498 } |
| 1469 if (reset_point == END_OF_STREAM_RESET) { | 1499 if (reset_point == END_OF_STREAM_RESET) { |
| 1470 EXPECT_EQ(video_file->num_fragments, client->num_skipped_fragments() + | 1500 EXPECT_EQ(video_file->num_fragments, client->num_skipped_fragments() + |
| 1471 client->num_queued_fragments()); | 1501 client->num_queued_fragments()); |
| 1472 EXPECT_EQ(client->num_done_bitstream_buffers(), | 1502 EXPECT_EQ(client->num_done_bitstream_buffers(), |
| 1473 client->num_queued_fragments()); | 1503 client->num_queued_fragments()); |
| 1474 } | 1504 } |
| 1475 LOG(INFO) << "Decoder " << i << " fps: " << client->frames_per_second(); | 1505 LOG(INFO) << "Decoder " << i << " fps: " << client->frames_per_second(); |
| 1476 if (!render_as_thumbnails) { | 1506 if (!render_as_thumbnails) { |
| 1477 int min_fps = suppress_rendering ? video_file->min_fps_no_render | 1507 int min_fps = suppress_rendering ? video_file->min_fps_no_render |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1559 ResetAfterFirstConfigInfo, | 1589 ResetAfterFirstConfigInfo, |
| 1560 VideoDecodeAcceleratorParamTest, | 1590 VideoDecodeAcceleratorParamTest, |
| 1561 ::testing::Values(std::make_tuple(1, | 1591 ::testing::Values(std::make_tuple(1, |
| 1562 1, | 1592 1, |
| 1563 1, | 1593 1, |
| 1564 RESET_AFTER_FIRST_CONFIG_INFO, | 1594 RESET_AFTER_FIRST_CONFIG_INFO, |
| 1565 CS_RESET, | 1595 CS_RESET, |
| 1566 false, | 1596 false, |
| 1567 false))); | 1597 false))); |
| 1568 | 1598 |
| 1599 // Test Reset() immediately after Flush() and before NotifyFlushDone(). | |
| 1600 INSTANTIATE_TEST_CASE_P( | |
| 1601 ResetBeforeNotifyFlushDone, | |
| 1602 VideoDecodeAcceleratorParamTest, | |
| 1603 ::testing::Values(std::make_tuple(1, | |
| 1604 1, | |
| 1605 1, | |
| 1606 RESET_BEFORE_NOTIFY_FLUSH_DONE, | |
| 1607 CS_RESET, | |
| 1608 false, | |
| 1609 false))); | |
| 1610 | |
| 1569 // Test that Reset() mid-stream works fine and doesn't affect decoding even when | 1611 // Test that Reset() mid-stream works fine and doesn't affect decoding even when |
| 1570 // Decode() calls are made during the reset. | 1612 // Decode() calls are made during the reset. |
| 1571 INSTANTIATE_TEST_CASE_P( | 1613 INSTANTIATE_TEST_CASE_P( |
| 1572 MidStreamReset, | 1614 MidStreamReset, |
| 1573 VideoDecodeAcceleratorParamTest, | 1615 VideoDecodeAcceleratorParamTest, |
| 1574 ::testing::Values( | 1616 ::testing::Values( |
| 1575 std::make_tuple(1, 1, 1, MID_STREAM_RESET, CS_RESET, false, false))); | 1617 std::make_tuple(1, 1, 1, MID_STREAM_RESET, CS_RESET, false, false))); |
| 1576 | 1618 |
| 1577 INSTANTIATE_TEST_CASE_P( | 1619 INSTANTIATE_TEST_CASE_P( |
| 1578 SlowRendering, | 1620 SlowRendering, |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1849 continue; | 1891 continue; |
| 1850 } | 1892 } |
| 1851 } | 1893 } |
| 1852 | 1894 |
| 1853 base::ShadowingAtExitManager at_exit_manager; | 1895 base::ShadowingAtExitManager at_exit_manager; |
| 1854 | 1896 |
| 1855 return base::LaunchUnitTestsSerially( | 1897 return base::LaunchUnitTestsSerially( |
| 1856 argc, argv, | 1898 argc, argv, |
| 1857 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); | 1899 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); |
| 1858 } | 1900 } |
| OLD | NEW |