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 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "webrtc/video_engine/payload_router.h" | 24 #include "webrtc/video_engine/payload_router.h" |
25 #include "webrtc/video_engine/vie_encoder.h" | 25 #include "webrtc/video_engine/vie_encoder.h" |
26 | 26 |
27 using ::testing::NiceMock; | 27 using ::testing::NiceMock; |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 | 30 |
31 class MockVieEncoder : public ViEEncoder { | 31 class MockVieEncoder : public ViEEncoder { |
32 public: | 32 public: |
33 explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer) | 33 explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer) |
34 : ViEEncoder(1, 1, config_, *process_thread, pacer, NULL, NULL, false) {} | 34 : ViEEncoder(1, 1, *process_thread, pacer, NULL, NULL, false) {} |
35 ~MockVieEncoder() {} | 35 ~MockVieEncoder() {} |
36 | 36 |
37 MOCK_METHOD1(OnReceivedIntraFrameRequest, | 37 MOCK_METHOD1(OnReceivedIntraFrameRequest, |
38 void(uint32_t)); | 38 void(uint32_t)); |
39 MOCK_METHOD2(OnReceivedSLI, | 39 MOCK_METHOD2(OnReceivedSLI, |
40 void(uint32_t ssrc, uint8_t picture_id)); | 40 void(uint32_t ssrc, uint8_t picture_id)); |
41 MOCK_METHOD2(OnReceivedRPSI, | 41 MOCK_METHOD2(OnReceivedRPSI, |
42 void(uint32_t ssrc, uint64_t picture_id)); | 42 void(uint32_t ssrc, uint64_t picture_id)); |
43 MOCK_METHOD2(OnLocalSsrcChanged, | 43 MOCK_METHOD2(OnLocalSsrcChanged, |
44 void(uint32_t old_ssrc, uint32_t new_ssrc)); | 44 void(uint32_t old_ssrc, uint32_t new_ssrc)); |
45 | |
46 const Config config_; | |
47 }; | 45 }; |
48 | 46 |
49 class VieKeyRequestTest : public ::testing::Test { | 47 class VieKeyRequestTest : public ::testing::Test { |
50 protected: | 48 protected: |
51 VieKeyRequestTest() | 49 VieKeyRequestTest() |
52 : pacer_(Clock::GetRealTimeClock(), | 50 : pacer_(Clock::GetRealTimeClock(), |
53 &router_, | 51 &router_, |
54 BitrateController::kDefaultStartBitrateKbps, | 52 BitrateController::kDefaultStartBitrateKbps, |
55 PacedSender::kDefaultPaceMultiplier * | 53 PacedSender::kDefaultPaceMultiplier * |
56 BitrateController::kDefaultStartBitrateKbps, | 54 BitrateController::kDefaultStartBitrateKbps, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 133 |
136 encoder_state_feedback_->RemoveEncoder(&encoder_1); | 134 encoder_state_feedback_->RemoveEncoder(&encoder_1); |
137 EXPECT_CALL(encoder_2, OnReceivedIntraFrameRequest(ssrc_2)) | 135 EXPECT_CALL(encoder_2, OnReceivedIntraFrameRequest(ssrc_2)) |
138 .Times(1); | 136 .Times(1); |
139 encoder_state_feedback_->GetRtcpIntraFrameObserver()-> | 137 encoder_state_feedback_->GetRtcpIntraFrameObserver()-> |
140 OnReceivedIntraFrameRequest(ssrc_2); | 138 OnReceivedIntraFrameRequest(ssrc_2); |
141 encoder_state_feedback_->RemoveEncoder(&encoder_2); | 139 encoder_state_feedback_->RemoveEncoder(&encoder_2); |
142 } | 140 } |
143 | 141 |
144 } // namespace webrtc | 142 } // namespace webrtc |
OLD | NEW |