OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/video/encoder_rtcp_feedback.h" | 11 #include "webrtc/video/encoder_rtcp_feedback.h" |
12 | 12 |
13 #include "webrtc/modules/utility/include/mock/mock_process_thread.h" | 13 #include "webrtc/modules/utility/include/mock/mock_process_thread.h" |
14 #include "webrtc/test/gmock.h" | 14 #include "webrtc/test/gmock.h" |
15 #include "webrtc/test/gtest.h" | 15 #include "webrtc/test/gtest.h" |
16 #include "webrtc/video/send_statistics_proxy.h" | 16 #include "webrtc/video/send_statistics_proxy.h" |
17 #include "webrtc/video/vie_encoder.h" | 17 #include "webrtc/video/vie_encoder.h" |
18 | 18 |
19 using ::testing::NiceMock; | 19 using ::testing::NiceMock; |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 class MockVieEncoder : public ViEEncoder { | 23 class MockVieEncoder : public ViEEncoder { |
24 public: | 24 public: |
25 explicit MockVieEncoder(SendStatisticsProxy* send_stats_proxy) | 25 explicit MockVieEncoder(SendStatisticsProxy* send_stats_proxy) |
26 : ViEEncoder(1, | 26 : ViEEncoder(1, |
27 send_stats_proxy, | 27 send_stats_proxy, |
28 VideoSendStream::Config::EncoderSettings("fake", 0, nullptr), | 28 VideoSendStream::Config::EncoderSettings("fake", 0, nullptr), |
29 nullptr, | 29 nullptr, |
30 nullptr) {} | 30 nullptr, |
| 31 VideoEncoderConfig::ContentType::kRealtimeVideo) {} |
31 ~MockVieEncoder() { Stop(); } | 32 ~MockVieEncoder() { Stop(); } |
32 | 33 |
33 MOCK_METHOD1(OnReceivedIntraFrameRequest, void(size_t)); | 34 MOCK_METHOD1(OnReceivedIntraFrameRequest, void(size_t)); |
34 }; | 35 }; |
35 | 36 |
36 class VieKeyRequestTest : public ::testing::Test { | 37 class VieKeyRequestTest : public ::testing::Test { |
37 public: | 38 public: |
38 VieKeyRequestTest() | 39 VieKeyRequestTest() |
39 : simulated_clock_(123456789), | 40 : simulated_clock_(123456789), |
40 send_stats_proxy_(&simulated_clock_, | 41 send_stats_proxy_(&simulated_clock_, |
(...skipping 27 matching lines...) Expand all Loading... |
68 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 69 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
69 | 70 |
70 EXPECT_CALL(encoder_, OnReceivedIntraFrameRequest(0)).Times(1); | 71 EXPECT_CALL(encoder_, OnReceivedIntraFrameRequest(0)).Times(1); |
71 simulated_clock_.AdvanceTimeMilliseconds(300); | 72 simulated_clock_.AdvanceTimeMilliseconds(300); |
72 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 73 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
73 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 74 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
74 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 75 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
75 } | 76 } |
76 | 77 |
77 } // namespace webrtc | 78 } // namespace webrtc |
OLD | NEW |