| 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 12 matching lines...) Expand all Loading... |
| 23 namespace webrtc { | 23 namespace webrtc { |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const uint64_t kTestPictureId = 12345678; | 26 const uint64_t kTestPictureId = 12345678; |
| 27 const uint8_t kSliPictureId = 156; | 27 const uint8_t kSliPictureId = 156; |
| 28 | 28 |
| 29 class RtcpCallback : public RtcpIntraFrameObserver { | 29 class RtcpCallback : public RtcpIntraFrameObserver { |
| 30 public: | 30 public: |
| 31 void SetModule(RtpRtcp* module) { | 31 void SetModule(RtpRtcp* module) { |
| 32 _rtpRtcpModule = module; | 32 _rtpRtcpModule = module; |
| 33 }; | 33 } |
| 34 virtual void OnRTCPPacketTimeout(const int32_t id) { | 34 virtual void OnRTCPPacketTimeout(const int32_t id) { |
| 35 } | 35 } |
| 36 virtual void OnLipSyncUpdate(const int32_t id, | 36 virtual void OnLipSyncUpdate(const int32_t id, |
| 37 const int32_t audioVideoOffset) { | 37 const int32_t audioVideoOffset) {} |
| 38 }; | 38 virtual void OnReceivedIntraFrameRequest(uint32_t ssrc) {} |
| 39 virtual void OnReceivedIntraFrameRequest(uint32_t ssrc) { | |
| 40 }; | |
| 41 virtual void OnReceivedSLI(uint32_t ssrc, | 39 virtual void OnReceivedSLI(uint32_t ssrc, |
| 42 uint8_t pictureId) { | 40 uint8_t pictureId) { |
| 43 EXPECT_EQ(kSliPictureId & 0x3f, pictureId); | 41 EXPECT_EQ(kSliPictureId & 0x3f, pictureId); |
| 44 }; | 42 } |
| 45 virtual void OnReceivedRPSI(uint32_t ssrc, | 43 virtual void OnReceivedRPSI(uint32_t ssrc, |
| 46 uint64_t pictureId) { | 44 uint64_t pictureId) { |
| 47 EXPECT_EQ(kTestPictureId, pictureId); | 45 EXPECT_EQ(kTestPictureId, pictureId); |
| 48 }; | 46 } |
| 49 virtual void OnLocalSsrcChanged(uint32_t old_ssrc, uint32_t new_ssrc) {}; | 47 virtual void OnLocalSsrcChanged(uint32_t old_ssrc, uint32_t new_ssrc) {} |
| 48 |
| 50 private: | 49 private: |
| 51 RtpRtcp* _rtpRtcpModule; | 50 RtpRtcp* _rtpRtcpModule; |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 class TestRtpFeedback : public NullRtpFeedback { | 53 class TestRtpFeedback : public NullRtpFeedback { |
| 55 public: | 54 public: |
| 56 TestRtpFeedback(RtpRtcp* rtp_rtcp) : rtp_rtcp_(rtp_rtcp) {} | 55 explicit TestRtpFeedback(RtpRtcp* rtp_rtcp) : rtp_rtcp_(rtp_rtcp) {} |
| 57 virtual ~TestRtpFeedback() {} | 56 virtual ~TestRtpFeedback() {} |
| 58 | 57 |
| 59 void OnIncomingSSRCChanged(const uint32_t ssrc) override { | 58 void OnIncomingSSRCChanged(const uint32_t ssrc) override { |
| 60 rtp_rtcp_->SetRemoteSSRC(ssrc); | 59 rtp_rtcp_->SetRemoteSSRC(ssrc); |
| 61 } | 60 } |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 RtpRtcp* rtp_rtcp_; | 63 RtpRtcp* rtp_rtcp_; |
| 65 }; | 64 }; |
| 66 | 65 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 EXPECT_EQ(test_ssrc, report_blocks[0].sourceSSRC); | 262 EXPECT_EQ(test_ssrc, report_blocks[0].sourceSSRC); |
| 264 | 263 |
| 265 EXPECT_EQ(0u, report_blocks[0].cumulativeLost); | 264 EXPECT_EQ(0u, report_blocks[0].cumulativeLost); |
| 266 EXPECT_LT(0u, report_blocks[0].delaySinceLastSR); | 265 EXPECT_LT(0u, report_blocks[0].delaySinceLastSR); |
| 267 EXPECT_EQ(test_sequence_number, report_blocks[0].extendedHighSeqNum); | 266 EXPECT_EQ(test_sequence_number, report_blocks[0].extendedHighSeqNum); |
| 268 EXPECT_EQ(0u, report_blocks[0].fractionLost); | 267 EXPECT_EQ(0u, report_blocks[0].fractionLost); |
| 269 } | 268 } |
| 270 | 269 |
| 271 } // namespace | 270 } // namespace |
| 272 } // namespace webrtc | 271 } // namespace webrtc |
| OLD | NEW |