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/bind_to_current_loop.h" |
7 #include "base/command_line.h" | 8 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
9 #include "base/files/memory_mapped_file.h" | 10 #include "base/files/memory_mapped_file.h" |
10 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
11 #include "base/numerics/safe_conversions.h" | 12 #include "base/numerics/safe_conversions.h" |
12 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
15 #include "base/sys_byteorder.h" | 16 #include "base/sys_byteorder.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
18 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" | 19 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" |
19 #include "media/base/bind_to_current_loop.h" | |
20 #include "media/base/bitstream_buffer.h" | 20 #include "media/base/bitstream_buffer.h" |
21 #include "media/base/test_data_util.h" | 21 #include "media/base/test_data_util.h" |
22 #include "media/filters/h264_parser.h" | 22 #include "media/filters/h264_parser.h" |
23 #include "media/video/fake_video_encode_accelerator.h" | 23 #include "media/video/fake_video_encode_accelerator.h" |
24 #include "media/video/video_encode_accelerator.h" | 24 #include "media/video/video_encode_accelerator.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
27 #if defined(USE_OZONE) | 27 #if defined(USE_OZONE) |
28 #include "ui/ozone/public/ozone_platform.h" | 28 #include "ui/ozone/public/ozone_platform.h" |
29 #endif | 29 #endif |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 test_stream_->visible_size, | 1008 test_stream_->visible_size, |
1009 input_coded_size_.width(), | 1009 input_coded_size_.width(), |
1010 input_coded_size_.width() / 2, | 1010 input_coded_size_.width() / 2, |
1011 input_coded_size_.width() / 2, | 1011 input_coded_size_.width() / 2, |
1012 frame_data_y, | 1012 frame_data_y, |
1013 frame_data_u, | 1013 frame_data_u, |
1014 frame_data_v, | 1014 frame_data_v, |
1015 base::TimeDelta().FromMilliseconds( | 1015 base::TimeDelta().FromMilliseconds( |
1016 next_input_id_ * base::Time::kMillisecondsPerSecond / | 1016 next_input_id_ * base::Time::kMillisecondsPerSecond / |
1017 current_framerate_), | 1017 current_framerate_), |
1018 media::BindToCurrentLoop( | 1018 base::BindToCurrentLoop( |
1019 base::Bind(&VEAClient::InputNoLongerNeededCallback, | 1019 base::Bind(&VEAClient::InputNoLongerNeededCallback, |
1020 base::Unretained(this), | 1020 base::Unretained(this), |
1021 next_input_id_))); | 1021 next_input_id_))); |
1022 | 1022 |
1023 CHECK(inputs_at_client_.insert(next_input_id_).second); | 1023 CHECK(inputs_at_client_.insert(next_input_id_).second); |
1024 ++next_input_id_; | 1024 ++next_input_id_; |
1025 | 1025 |
1026 return frame; | 1026 return frame; |
1027 } | 1027 } |
1028 | 1028 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 } | 1408 } |
1409 | 1409 |
1410 content::g_env = | 1410 content::g_env = |
1411 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 1411 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( |
1412 testing::AddGlobalTestEnvironment( | 1412 testing::AddGlobalTestEnvironment( |
1413 new content::VideoEncodeAcceleratorTestEnvironment( | 1413 new content::VideoEncodeAcceleratorTestEnvironment( |
1414 test_stream_data.Pass(), run_at_fps))); | 1414 test_stream_data.Pass(), run_at_fps))); |
1415 | 1415 |
1416 return RUN_ALL_TESTS(); | 1416 return RUN_ALL_TESTS(); |
1417 } | 1417 } |
OLD | NEW |