OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "content/renderer/media/gpu/rtc_video_encoder.h" | 12 #include "content/renderer/media/gpu/rtc_video_encoder.h" |
13 #include "media/renderers/mock_gpu_video_accelerator_factories.h" | 13 #include "media/renderers/mock_gpu_video_accelerator_factories.h" |
14 #include "media/video/mock_video_encode_accelerator.h" | 14 #include "media/video/mock_video_encode_accelerator.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "third_party/libyuv/include/libyuv/planar_functions.h" | 16 #include "third_party/libyuv/include/libyuv/planar_functions.h" |
| 17 #include "third_party/webrtc/api/video_codecs/video_encoder.h" |
17 #include "third_party/webrtc/modules/video_coding/include/video_codec_interface.
h" | 18 #include "third_party/webrtc/modules/video_coding/include/video_codec_interface.
h" |
18 #include "third_party/webrtc/video_encoder.h" | |
19 | 19 |
20 using ::testing::_; | 20 using ::testing::_; |
21 using ::testing::AtLeast; | 21 using ::testing::AtLeast; |
22 using ::testing::Invoke; | 22 using ::testing::Invoke; |
23 using ::testing::Return; | 23 using ::testing::Return; |
24 using ::testing::SaveArg; | 24 using ::testing::SaveArg; |
25 using ::testing::Values; | 25 using ::testing::Values; |
26 using ::testing::WithArgs; | 26 using ::testing::WithArgs; |
27 | 27 |
28 namespace content { | 28 namespace content { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 rtc_frame.set_ntp_time_ms(4567891); | 270 rtc_frame.set_ntp_time_ms(4567891); |
271 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, | 271 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, |
272 rtc_encoder_->Encode(rtc_frame, nullptr, &frame_types)); | 272 rtc_encoder_->Encode(rtc_frame, nullptr, &frame_types)); |
273 } | 273 } |
274 | 274 |
275 INSTANTIATE_TEST_CASE_P(CodecProfiles, | 275 INSTANTIATE_TEST_CASE_P(CodecProfiles, |
276 RTCVideoEncoderTest, | 276 RTCVideoEncoderTest, |
277 Values(webrtc::kVideoCodecVP8, | 277 Values(webrtc::kVideoCodecVP8, |
278 webrtc::kVideoCodecH264)); | 278 webrtc::kVideoCodecH264)); |
279 } // namespace content | 279 } // namespace content |
OLD | NEW |