| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 bool LoopBackTransport::SendRtcp(const uint8_t* data, size_t len) { | 63 bool LoopBackTransport::SendRtcp(const uint8_t* data, size_t len) { |
| 64 if (rtp_rtcp_module_->IncomingRtcpPacket((const uint8_t*)data, len) < 0) { | 64 if (rtp_rtcp_module_->IncomingRtcpPacket((const uint8_t*)data, len) < 0) { |
| 65 return false; | 65 return false; |
| 66 } | 66 } |
| 67 return true; | 67 return true; |
| 68 } | 68 } |
| 69 | 69 |
| 70 int32_t TestRtpReceiver::OnReceivedPayloadData( | 70 int32_t TestRtpReceiver::OnReceivedPayloadData( |
| 71 const uint8_t* payload_data, | 71 const uint8_t* payload_data, |
| 72 const size_t payload_size, | 72 size_t payload_size, |
| 73 const webrtc::WebRtcRTPHeader* rtp_header) { | 73 const webrtc::WebRtcRTPHeader* rtp_header) { |
| 74 EXPECT_LE(payload_size, sizeof(payload_data_)); | 74 EXPECT_LE(payload_size, sizeof(payload_data_)); |
| 75 memcpy(payload_data_, payload_data, payload_size); | 75 memcpy(payload_data_, payload_data, payload_size); |
| 76 memcpy(&rtp_header_, rtp_header, sizeof(rtp_header_)); | 76 memcpy(&rtp_header_, rtp_header, sizeof(rtp_header_)); |
| 77 payload_size_ = payload_size; | 77 payload_size_ = payload_size; |
| 78 return 0; | 78 return 0; |
| 79 } | 79 } |
| 80 | 80 |
| 81 class RtpRtcpAPITest : public ::testing::Test { | 81 class RtpRtcpAPITest : public ::testing::Test { |
| 82 protected: | 82 protected: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 rtx_header.payloadType = kRtxPayloadType; | 178 rtx_header.payloadType = kRtxPayloadType; |
| 179 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 179 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
| 180 rtx_header.ssrc = 0; | 180 rtx_header.ssrc = 0; |
| 181 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | 181 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
| 182 rtx_header.ssrc = kRtxSsrc; | 182 rtx_header.ssrc = kRtxSsrc; |
| 183 rtx_header.payloadType = 0; | 183 rtx_header.payloadType = 0; |
| 184 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 184 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace webrtc | 187 } // namespace webrtc |
| OLD | NEW |