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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/memory_mapped_file.h" | 9 #include "base/files/memory_mapped_file.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 490 |
491 const uint8* stream_ptr = static_cast<const uint8*>(shm->memory()); | 491 const uint8* stream_ptr = static_cast<const uint8*>(shm->memory()); |
492 if (payload_size > 0) | 492 if (payload_size > 0) |
493 validator_->ProcessStreamBuffer(stream_ptr, payload_size); | 493 validator_->ProcessStreamBuffer(stream_ptr, payload_size); |
494 | 494 |
495 EXPECT_EQ(key_frame, seen_keyframe_in_this_buffer_); | 495 EXPECT_EQ(key_frame, seen_keyframe_in_this_buffer_); |
496 seen_keyframe_in_this_buffer_ = false; | 496 seen_keyframe_in_this_buffer_ = false; |
497 | 497 |
498 if (save_to_file_) { | 498 if (save_to_file_) { |
499 int size = base::checked_cast<int>(payload_size); | 499 int size = base::checked_cast<int>(payload_size); |
500 EXPECT_EQ(file_util::AppendToFile( | 500 EXPECT_EQ(base::AppendToFile( |
501 base::FilePath::FromUTF8Unsafe(test_stream_.out_filename), | 501 base::FilePath::FromUTF8Unsafe(test_stream_.out_filename), |
502 static_cast<char*>(shm->memory()), | 502 static_cast<char*>(shm->memory()), |
503 size), | 503 size), |
504 size); | 504 size); |
505 } | 505 } |
506 | 506 |
507 FeedEncoderWithOutput(shm); | 507 FeedEncoderWithOutput(shm); |
508 } | 508 } |
509 | 509 |
510 void VEAClient::NotifyError(VideoEncodeAccelerator::Error error) { | 510 void VEAClient::NotifyError(VideoEncodeAccelerator::Error error) { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 } | 761 } |
762 if (it->first == "v" || it->first == "vmodule") | 762 if (it->first == "v" || it->first == "vmodule") |
763 continue; | 763 continue; |
764 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 764 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
765 } | 765 } |
766 | 766 |
767 base::ShadowingAtExitManager at_exit_manager; | 767 base::ShadowingAtExitManager at_exit_manager; |
768 | 768 |
769 return RUN_ALL_TESTS(); | 769 return RUN_ALL_TESTS(); |
770 } | 770 } |
OLD | NEW |