Use size_t more consistently for packet/payload lengths.
See design doc at https://docs.google.com/a/chromium.org/document/d/1I6nmE9D_BmCY-IoV6MDPY2V6WYpEI-dg2apWXTfZyUI/edit?usp=sharing for more information. This CL was reviewed and approved in pieces in the following CLs: https://webrtc-codereview.appspot.com/24209004/ https://webrtc-codereview.appspot.com/24229004/ https://webrtc-codereview.appspot.com/24259004/ https://webrtc-codereview.appspot.com/25109004/ https://webrtc-codereview.appspot.com/26099004/ https://webrtc-codereview.appspot.com/27069004/ https://webrtc-codereview.appspot.com/27969004/ https://webrtc-codereview.appspot.com/27989004/ https://webrtc-codereview.appspot.com/29009004/ https://webrtc-codereview.appspot.com/30929004/ https://webrtc-codereview.appspot.com/30939004/ https://webrtc-codereview.appspot.com/31999004/ Committing as TBR to the original reviewers. BUG=chromium:81439 TEST=none TBR=pthatcher,henrik.lundin,tina.legrand,stefan,tkchin,glaznev,kjellander,perkj,mflodman,henrika,asapersson,niklas.enbom Review URL: https://webrtc-codereview.appspot.com/23129004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7726 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -188,7 +188,7 @@ TEST(NACKStringBuilderTest, TestCase13) {
|
||||
void CreateRtpPacket(const bool marker_bit, const uint8_t payload,
|
||||
const uint16_t seq_num, const uint32_t timestamp,
|
||||
const uint32_t ssrc, uint8_t* array,
|
||||
uint16_t* cur_pos) {
|
||||
size_t* cur_pos) {
|
||||
ASSERT_TRUE(payload <= 127);
|
||||
array[(*cur_pos)++] = 0x80;
|
||||
array[(*cur_pos)++] = payload | (marker_bit ? 0x80 : 0);
|
||||
@ -229,15 +229,15 @@ class TestTransport : public Transport,
|
||||
}
|
||||
virtual int SendPacket(int /*ch*/,
|
||||
const void* /*data*/,
|
||||
int /*len*/) OVERRIDE {
|
||||
size_t /*len*/) OVERRIDE {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int SendRTCPPacket(int /*ch*/,
|
||||
const void *packet,
|
||||
int packet_len) OVERRIDE {
|
||||
size_t packet_len) OVERRIDE {
|
||||
RTCPUtility::RTCPParserV2 rtcpParser((uint8_t*)packet,
|
||||
(int32_t)packet_len,
|
||||
packet_len,
|
||||
true); // Allow non-compound RTCP
|
||||
|
||||
EXPECT_TRUE(rtcpParser.IsValid());
|
||||
@ -262,11 +262,11 @@ class TestTransport : public Transport,
|
||||
rtcp_packet_info_.ntp_frac = rtcpPacketInformation.ntp_frac;
|
||||
rtcp_packet_info_.rtp_timestamp = rtcpPacketInformation.rtp_timestamp;
|
||||
|
||||
return packet_len;
|
||||
return static_cast<int>(packet_len);
|
||||
}
|
||||
|
||||
virtual int OnReceivedPayloadData(const uint8_t* payloadData,
|
||||
const uint16_t payloadSize,
|
||||
const size_t payloadSize,
|
||||
const WebRtcRTPHeader* rtpHeader) OVERRIDE {
|
||||
return 0;
|
||||
}
|
||||
@ -357,10 +357,10 @@ TEST_F(RtcpSenderTest, TestCompound) {
|
||||
const uint16_t seq_num = 11111;
|
||||
const uint32_t timestamp = 1234567;
|
||||
const uint32_t ssrc = 0x11111111;
|
||||
uint16_t packet_length = 0;
|
||||
size_t packet_length = 0;
|
||||
CreateRtpPacket(marker_bit, payload, seq_num, timestamp, ssrc, packet_,
|
||||
&packet_length);
|
||||
EXPECT_EQ(25, packet_length);
|
||||
EXPECT_EQ(25u, packet_length);
|
||||
|
||||
VideoCodec codec_inst;
|
||||
strncpy(codec_inst.plName, "VP8", webrtc::kPayloadNameSize - 1);
|
||||
|
Reference in New Issue
Block a user