| 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, VideoEncoderConfig::ContentType::kRealtimeVideo) {} |
| 31 ~MockVieEncoder() { Stop(); } | 31 ~MockVieEncoder() { Stop(); } |
| 32 | 32 |
| 33 MOCK_METHOD1(OnReceivedIntraFrameRequest, void(size_t)); | 33 MOCK_METHOD1(OnReceivedIntraFrameRequest, void(size_t)); |
| 34 MOCK_METHOD1(OnReceivedSLI, void(uint8_t picture_id)); | 34 MOCK_METHOD1(OnReceivedSLI, void(uint8_t picture_id)); |
| 35 MOCK_METHOD1(OnReceivedRPSI, void(uint64_t picture_id)); | 35 MOCK_METHOD1(OnReceivedRPSI, void(uint64_t picture_id)); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 class VieKeyRequestTest : public ::testing::Test { | 38 class VieKeyRequestTest : public ::testing::Test { |
| 39 public: | 39 public: |
| 40 VieKeyRequestTest() | 40 VieKeyRequestTest() |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 78 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
| 79 | 79 |
| 80 EXPECT_CALL(encoder_, OnReceivedIntraFrameRequest(0)).Times(1); | 80 EXPECT_CALL(encoder_, OnReceivedIntraFrameRequest(0)).Times(1); |
| 81 simulated_clock_.AdvanceTimeMilliseconds(300); | 81 simulated_clock_.AdvanceTimeMilliseconds(300); |
| 82 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 82 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
| 83 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 83 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
| 84 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); | 84 encoder_rtcp_feedback_.OnReceivedIntraFrameRequest(kSsrc); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace webrtc | 87 } // namespace webrtc |
| OLD | NEW |