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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 public: | 57 public: |
58 MOCK_METHOD2(RtcpPacketTypesCounterUpdated, | 58 MOCK_METHOD2(RtcpPacketTypesCounterUpdated, |
59 void(uint32_t, const RtcpPacketTypeCounter&)); | 59 void(uint32_t, const RtcpPacketTypeCounter&)); |
60 }; | 60 }; |
61 | 61 |
62 class MockRtcpIntraFrameObserver : public RtcpIntraFrameObserver { | 62 class MockRtcpIntraFrameObserver : public RtcpIntraFrameObserver { |
63 public: | 63 public: |
64 MOCK_METHOD1(OnReceivedIntraFrameRequest, void(uint32_t)); | 64 MOCK_METHOD1(OnReceivedIntraFrameRequest, void(uint32_t)); |
65 MOCK_METHOD2(OnReceivedSLI, void(uint32_t, uint8_t)); | 65 MOCK_METHOD2(OnReceivedSLI, void(uint32_t, uint8_t)); |
66 MOCK_METHOD2(OnReceivedRPSI, void(uint32_t, uint64_t)); | 66 MOCK_METHOD2(OnReceivedRPSI, void(uint32_t, uint64_t)); |
67 MOCK_METHOD2(OnLocalSsrcChanged, void(uint32_t, uint32_t)); | |
68 }; | 67 }; |
69 | 68 |
70 class MockRtcpCallbackImpl : public RtcpStatisticsCallback { | 69 class MockRtcpCallbackImpl : public RtcpStatisticsCallback { |
71 public: | 70 public: |
72 MOCK_METHOD2(StatisticsUpdated, void(const RtcpStatistics&, uint32_t)); | 71 MOCK_METHOD2(StatisticsUpdated, void(const RtcpStatistics&, uint32_t)); |
73 MOCK_METHOD2(CNameChanged, void(const char*, uint32_t)); | 72 MOCK_METHOD2(CNameChanged, void(const char*, uint32_t)); |
74 }; | 73 }; |
75 | 74 |
76 class MockTransportFeedbackObserver : public TransportFeedbackObserver { | 75 class MockTransportFeedbackObserver : public TransportFeedbackObserver { |
77 public: | 76 public: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 : system_clock_(1335900000), | 112 : system_clock_(1335900000), |
114 rtcp_receiver_(&system_clock_, | 113 rtcp_receiver_(&system_clock_, |
115 false, | 114 false, |
116 &packet_type_counter_observer_, | 115 &packet_type_counter_observer_, |
117 &bandwidth_observer_, | 116 &bandwidth_observer_, |
118 &intra_frame_observer_, | 117 &intra_frame_observer_, |
119 &transport_feedback_observer_, | 118 &transport_feedback_observer_, |
120 &rtp_rtcp_impl_) {} | 119 &rtp_rtcp_impl_) {} |
121 void SetUp() { | 120 void SetUp() { |
122 std::set<uint32_t> ssrcs = {kReceiverMainSsrc, kReceiverExtraSsrc}; | 121 std::set<uint32_t> ssrcs = {kReceiverMainSsrc, kReceiverExtraSsrc}; |
123 EXPECT_CALL(intra_frame_observer_, | |
124 OnLocalSsrcChanged(0, kReceiverMainSsrc)); | |
125 rtcp_receiver_.SetSsrcs(kReceiverMainSsrc, ssrcs); | 122 rtcp_receiver_.SetSsrcs(kReceiverMainSsrc, ssrcs); |
126 | 123 |
127 rtcp_receiver_.SetRemoteSSRC(kSenderSsrc); | 124 rtcp_receiver_.SetRemoteSSRC(kSenderSsrc); |
128 } | 125 } |
129 | 126 |
130 void InjectRtcpPacket(rtc::ArrayView<const uint8_t> raw) { | 127 void InjectRtcpPacket(rtc::ArrayView<const uint8_t> raw) { |
131 rtcp_receiver_.IncomingPacket(raw.data(), raw.size()); | 128 rtcp_receiver_.IncomingPacket(raw.data(), raw.size()); |
132 } | 129 } |
133 | 130 |
134 void InjectRtcpPacket(const rtcp::RtcpPacket& packet) { | 131 void InjectRtcpPacket(const rtcp::RtcpPacket& packet) { |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 TEST_F(RtcpReceiverTest, ForceSenderReport) { | 1262 TEST_F(RtcpReceiverTest, ForceSenderReport) { |
1266 rtcp::RapidResyncRequest rr; | 1263 rtcp::RapidResyncRequest rr; |
1267 rr.SetSenderSsrc(kSenderSsrc); | 1264 rr.SetSenderSsrc(kSenderSsrc); |
1268 rr.SetMediaSsrc(kReceiverMainSsrc); | 1265 rr.SetMediaSsrc(kReceiverMainSsrc); |
1269 | 1266 |
1270 EXPECT_CALL(rtp_rtcp_impl_, OnRequestSendReport()); | 1267 EXPECT_CALL(rtp_rtcp_impl_, OnRequestSendReport()); |
1271 InjectRtcpPacket(rr); | 1268 InjectRtcpPacket(rr); |
1272 } | 1269 } |
1273 | 1270 |
1274 } // namespace webrtc | 1271 } // namespace webrtc |
OLD | NEW |