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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 } | 55 } |
56 const uint8_t* payload = data + header.headerLength; | 56 const uint8_t* payload = data + header.headerLength; |
57 RTC_CHECK_GE(len, header.headerLength); | 57 RTC_CHECK_GE(len, header.headerLength); |
58 const size_t payload_length = len - header.headerLength; | 58 const size_t payload_length = len - header.headerLength; |
59 receive_statistics_->IncomingPacket(header, len, false); | 59 receive_statistics_->IncomingPacket(header, len, false); |
60 return rtp_receiver_->IncomingRtpPacket(header, payload, payload_length, | 60 return rtp_receiver_->IncomingRtpPacket(header, payload, payload_length, |
61 payload_specific, true); | 61 payload_specific, true); |
62 } | 62 } |
63 | 63 |
64 bool LoopBackTransport::SendRtcp(const uint8_t* data, size_t len) { | 64 bool LoopBackTransport::SendRtcp(const uint8_t* data, size_t len) { |
65 if (rtp_rtcp_module_->IncomingRtcpPacket((const uint8_t*)data, len) < 0) { | 65 rtp_rtcp_module_->IncomingRtcpPacket((const uint8_t*)data, len); |
danilchap
2017/09/13 11:19:13
mind removing unneeded c-cast while touching this
| |
66 return false; | |
67 } | |
68 return true; | 66 return true; |
69 } | 67 } |
70 | 68 |
71 int32_t TestRtpReceiver::OnReceivedPayloadData( | 69 int32_t TestRtpReceiver::OnReceivedPayloadData( |
72 const uint8_t* payload_data, | 70 const uint8_t* payload_data, |
73 size_t payload_size, | 71 size_t payload_size, |
74 const webrtc::WebRtcRTPHeader* rtp_header) { | 72 const webrtc::WebRtcRTPHeader* rtp_header) { |
75 EXPECT_LE(payload_size, sizeof(payload_data_)); | 73 EXPECT_LE(payload_size, sizeof(payload_data_)); |
76 memcpy(payload_data_, payload_data, payload_size); | 74 memcpy(payload_data_, payload_data, payload_size); |
77 memcpy(&rtp_header_, rtp_header, sizeof(rtp_header_)); | 75 memcpy(&rtp_header_, rtp_header, sizeof(rtp_header_)); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 rtx_header.payloadType = kRtxPayloadType; | 173 rtx_header.payloadType = kRtxPayloadType; |
176 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 174 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
177 rtx_header.ssrc = 0; | 175 rtx_header.ssrc = 0; |
178 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | 176 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
179 rtx_header.ssrc = kRtxSsrc; | 177 rtx_header.ssrc = kRtxSsrc; |
180 rtx_header.payloadType = 0; | 178 rtx_header.payloadType = 0; |
181 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 179 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
182 } | 180 } |
183 | 181 |
184 } // namespace webrtc | 182 } // namespace webrtc |
OLD | NEW |