WebRtc_Word32 -> int32_t in utility/
BUG=314
Review URL: https://webrtc-codereview.appspot.com/1307005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3797 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/utility/source/rtp_dump_impl.cc b/webrtc/modules/utility/source/rtp_dump_impl.cc
index 69a52ec..74de4ac 100644
--- a/webrtc/modules/utility/source/rtp_dump_impl.cc
+++ b/webrtc/modules/utility/source/rtp_dump_impl.cc
@@ -40,7 +40,7 @@
namespace webrtc {
const char RTPFILE_VERSION[] = "1.0";
-const WebRtc_UWord32 MAX_UWORD32 = 0xffffffff;
+const uint32_t MAX_UWORD32 = 0xffffffff;
// This stucture is specified in the rtpdump documentation.
// This struct corresponds to RD_packet_t in
@@ -49,11 +49,11 @@
{
// Length of packet, including this header (may be smaller than plen if not
// whole packet recorded).
- WebRtc_UWord16 length;
+ uint16_t length;
// Actual header+payload length for RTP, 0 for RTCP.
- WebRtc_UWord16 plen;
+ uint16_t plen;
// Milliseconds since the start of recording.
- WebRtc_UWord32 offset;
+ uint32_t offset;
} rtpDumpPktHdr_t;
RtpDump* RtpDump::CreateRtpDump()
@@ -87,7 +87,7 @@
WEBRTC_TRACE(kTraceMemory, kTraceUtility, -1, "%s deleted", __FUNCTION__);
}
-WebRtc_Word32 RtpDumpImpl::Start(const char* fileNameUTF8)
+int32_t RtpDumpImpl::Start(const char* fileNameUTF8)
{
if (fileNameUTF8 == NULL)
@@ -136,7 +136,7 @@
return 0;
}
-WebRtc_Word32 RtpDumpImpl::Stop()
+int32_t RtpDumpImpl::Stop()
{
CriticalSectionScoped lock(_critSect);
_file.Flush();
@@ -150,8 +150,7 @@
return _file.Open();
}
-WebRtc_Word32 RtpDumpImpl::DumpPacket(const WebRtc_UWord8* packet,
- WebRtc_UWord16 packetLength)
+int32_t RtpDumpImpl::DumpPacket(const uint8_t* packet, uint16_t packetLength)
{
CriticalSectionScoped lock(_critSect);
if (!IsActive())
@@ -174,7 +173,7 @@
bool isRTCP = RTCP(packet);
rtpDumpPktHdr_t hdr;
- WebRtc_UWord32 offset;
+ uint32_t offset;
// Offset is relative to when recording was started.
offset = GetTimeInMS();
@@ -187,14 +186,14 @@
}
hdr.offset = RtpDumpHtonl(offset);
- hdr.length = RtpDumpHtons((WebRtc_UWord16)(packetLength + sizeof(hdr)));
+ hdr.length = RtpDumpHtons((uint16_t)(packetLength + sizeof(hdr)));
if (isRTCP)
{
hdr.plen = 0;
}
else
{
- hdr.plen = RtpDumpHtons((WebRtc_UWord16)packetLength);
+ hdr.plen = RtpDumpHtons((uint16_t)packetLength);
}
if (!_file.Write(&hdr, sizeof(hdr)))
@@ -213,9 +212,9 @@
return 0;
}
-bool RtpDumpImpl::RTCP(const WebRtc_UWord8* packet) const
+bool RtpDumpImpl::RTCP(const uint8_t* packet) const
{
- const WebRtc_UWord8 payloadType = packet[1];
+ const uint8_t payloadType = packet[1];
bool is_rtcp = false;
switch(payloadType)
@@ -234,7 +233,7 @@
}
// TODO (hellner): why is TickUtil not used here?
-inline WebRtc_UWord32 RtpDumpImpl::GetTimeInMS() const
+inline uint32_t RtpDumpImpl::GetTimeInMS() const
{
#if defined(_WIN32)
return timeGetTime();
@@ -253,7 +252,7 @@
#endif
}
-inline WebRtc_UWord32 RtpDumpImpl::RtpDumpHtonl(WebRtc_UWord32 x) const
+inline uint32_t RtpDumpImpl::RtpDumpHtonl(uint32_t x) const
{
#if defined(WEBRTC_BIG_ENDIAN)
return x;
@@ -267,7 +266,7 @@
#endif
}
-inline WebRtc_UWord16 RtpDumpImpl::RtpDumpHtons(WebRtc_UWord16 x) const
+inline uint16_t RtpDumpImpl::RtpDumpHtons(uint16_t x) const
{
#if defined(WEBRTC_BIG_ENDIAN)
return x;