* Move constants into the files/functions that use them
* Declare variables in the narrowest scope possible
* Use correct (expected, actual) order for gtest macros
* Remove unused functions
* Untabify
* 80-column limit
* Avoid C-style casts
* Prefer true typed constants to "enum hack" constants
* Print size_t using the right format macro
* Shorten and simplify code
* Other random cleanup bits and style fixes

BUG=none
TEST=none
R=henrik.lundin@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36179004

Cr-Commit-Position: refs/heads/master@{#8467}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8467 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pkasting@chromium.org
2015-02-23 21:28:22 +00:00
parent 722739108a
commit d324546ced
43 changed files with 393 additions and 541 deletions

View File

@ -43,21 +43,18 @@ void RTPStream::ParseRTPHeader(WebRtcRTPHeader* rtpInfo,
void RTPStream::MakeRTPheader(uint8_t* rtpHeader, uint8_t payloadType,
int16_t seqNo, uint32_t timeStamp,
uint32_t ssrc) {
rtpHeader[0] = (unsigned char) 0x80;
rtpHeader[1] = (unsigned char) (payloadType & 0xFF);
rtpHeader[2] = (unsigned char) ((seqNo >> 8) & 0xFF);
rtpHeader[3] = (unsigned char) ((seqNo) & 0xFF);
rtpHeader[4] = (unsigned char) ((timeStamp >> 24) & 0xFF);
rtpHeader[5] = (unsigned char) ((timeStamp >> 16) & 0xFF);
rtpHeader[6] = (unsigned char) ((timeStamp >> 8) & 0xFF);
rtpHeader[7] = (unsigned char) (timeStamp & 0xFF);
rtpHeader[8] = (unsigned char) ((ssrc >> 24) & 0xFF);
rtpHeader[9] = (unsigned char) ((ssrc >> 16) & 0xFF);
rtpHeader[10] = (unsigned char) ((ssrc >> 8) & 0xFF);
rtpHeader[11] = (unsigned char) (ssrc & 0xFF);
rtpHeader[0] = 0x80;
rtpHeader[1] = payloadType;
rtpHeader[2] = (seqNo >> 8) & 0xFF;
rtpHeader[3] = seqNo & 0xFF;
rtpHeader[4] = timeStamp >> 24;
rtpHeader[5] = (timeStamp >> 16) & 0xFF;
rtpHeader[6] = (timeStamp >> 8) & 0xFF;
rtpHeader[7] = timeStamp & 0xFF;
rtpHeader[8] = ssrc >> 24;
rtpHeader[9] = (ssrc >> 16) & 0xFF;
rtpHeader[10] = (ssrc >> 8) & 0xFF;
rtpHeader[11] = ssrc & 0xFF;
}
RTPPacket::RTPPacket(uint8_t payloadType, uint32_t timeStamp, int16_t seqNo,