From 265a5d298aeff39a31defb51a80569844a232831 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Thu, 2 May 2013 09:11:20 +0000 Subject: [PATCH] Remove traces of deprecated WebRtc_Word types. BUG=314 R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1385004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3933 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/common_types.h | 14 +++++++------- webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h | 3 +-- .../video_coding/main/test/receiver_tests.h | 6 +++--- webrtc/modules/video_coding/main/test/test_util.cc | 2 +- webrtc/modules/video_coding/main/test/test_util.h | 2 +- .../main/test/vcm_payload_sink_factory.cc | 11 ++++++----- webrtc/typedefs.h | 11 ----------- 7 files changed, 19 insertions(+), 30 deletions(-) diff --git a/webrtc/common_types.h b/webrtc/common_types.h index fd0d1d97aa..5001da2974 100644 --- a/webrtc/common_types.h +++ b/webrtc/common_types.h @@ -266,23 +266,23 @@ enum VadModes // degree of bandwidth reduction struct NetworkStatistics // NETEQ statistics { // current jitter buffer size in ms - WebRtc_UWord16 currentBufferSize; + uint16_t currentBufferSize; // preferred (optimal) buffer size in ms - WebRtc_UWord16 preferredBufferSize; + uint16_t preferredBufferSize; // adding extra delay due to "peaky jitter" bool jitterPeaksFound; // loss rate (network + late) in percent (in Q14) - WebRtc_UWord16 currentPacketLossRate; + uint16_t currentPacketLossRate; // late loss rate in percent (in Q14) - WebRtc_UWord16 currentDiscardRate; + uint16_t currentDiscardRate; // fraction (of original stream) of synthesized speech inserted through // expansion (in Q14) - WebRtc_UWord16 currentExpandRate; + uint16_t currentExpandRate; // fraction of synthesized speech inserted through pre-emptive expansion // (in Q14) - WebRtc_UWord16 currentPreemptiveRate; + uint16_t currentPreemptiveRate; // fraction of data removed through acceleration (in Q14) - WebRtc_UWord16 currentAccelerateRate; + uint16_t currentAccelerateRate; // clock-drift in parts-per-million (negative or positive) int32_t clockDriftPPM; // average packet waiting time in the jitter buffer (ms) diff --git a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h index 2d02062969..0a36a9ef6e 100644 --- a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @@ -82,8 +82,7 @@ class MockRtpRtcp : public RtpRtcp { MOCK_METHOD1(SetRtxReceivePayloadType, void(int)); MOCK_METHOD2(IncomingPacket, - int32_t(const WebRtc_UWord8* incomingPacket, - const WebRtc_UWord16 packetLength)); + int32_t(const uint8_t* incomingPacket, const uint16_t packetLength)); MOCK_METHOD4(IncomingAudioNTP, int32_t(const uint32_t audioReceivedNTPsecs, const uint32_t audioReceivedNTPfrac, diff --git a/webrtc/modules/video_coding/main/test/receiver_tests.h b/webrtc/modules/video_coding/main/test/receiver_tests.h index 15ec4245f8..095a231dd2 100644 --- a/webrtc/modules/video_coding/main/test/receiver_tests.h +++ b/webrtc/modules/video_coding/main/test/receiver_tests.h @@ -26,9 +26,9 @@ class RtpDataCallback : public webrtc::RtpData { RtpDataCallback(webrtc::VideoCodingModule* vcm) : vcm_(vcm) {} virtual ~RtpDataCallback() {} - virtual WebRtc_Word32 OnReceivedPayloadData( - const WebRtc_UWord8* payload_data, - const WebRtc_UWord16 payload_size, + virtual int32_t OnReceivedPayloadData( + const uint8_t* payload_data, + const uint16_t payload_size, const webrtc::WebRtcRTPHeader* rtp_header) { return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header); } diff --git a/webrtc/modules/video_coding/main/test/test_util.cc b/webrtc/modules/video_coding/main/test/test_util.cc index c16b98dffa..159de17181 100644 --- a/webrtc/modules/video_coding/main/test/test_util.cc +++ b/webrtc/modules/video_coding/main/test/test_util.cc @@ -111,7 +111,7 @@ FileOutputFrameReceiver::~FileOutputFrameReceiver() { } } -WebRtc_Word32 FileOutputFrameReceiver::FrameToRender( +int32_t FileOutputFrameReceiver::FrameToRender( webrtc::I420VideoFrame& video_frame) { if (timing_file_ == NULL) { std::string basename; diff --git a/webrtc/modules/video_coding/main/test/test_util.h b/webrtc/modules/video_coding/main/test/test_util.h index cfbd24bc41..43af6f16ba 100644 --- a/webrtc/modules/video_coding/main/test/test_util.h +++ b/webrtc/modules/video_coding/main/test/test_util.h @@ -87,7 +87,7 @@ class FileOutputFrameReceiver : public webrtc::VCMReceiveCallback { virtual ~FileOutputFrameReceiver(); // VCMReceiveCallback - virtual WebRtc_Word32 FrameToRender(webrtc::I420VideoFrame& video_frame); + virtual int32_t FrameToRender(webrtc::I420VideoFrame& video_frame); private: std::string out_filename_; diff --git a/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc b/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc index 0026767072..a84561ad7d 100644 --- a/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc +++ b/webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.cc @@ -60,21 +60,22 @@ class VcmPayloadSinkFactory::VcmPayloadSink } // PayloadSinkInterface - virtual WebRtc_Word32 OnReceivedPayloadData(const WebRtc_UWord8* payload_data, - const WebRtc_UWord16 payload_size, + virtual int32_t OnReceivedPayloadData( + const uint8_t* payload_data, + const uint16_t payload_size, const WebRtcRTPHeader* rtp_header) { return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header); } // VCMPacketRequestCallback - virtual WebRtc_Word32 ResendPackets(const WebRtc_UWord16* sequence_numbers, - WebRtc_UWord16 length) { + virtual int32_t ResendPackets(const uint16_t* sequence_numbers, + uint16_t length) { stream_->ResendPackets(sequence_numbers, length); return 0; } // VCMFrameStorageCallback - virtual WebRtc_Word32 StoreReceivedFrame( + virtual int32_t StoreReceivedFrame( const EncodedVideoData& frame_to_store) { vcm_playback_->DecodeFromStorage(frame_to_store); return VCM_OK; diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h index 0d2dfcd90b..7edb12c077 100644 --- a/webrtc/typedefs.h +++ b/webrtc/typedefs.h @@ -75,17 +75,6 @@ typedef unsigned int uint32_t; typedef unsigned __int64 uint64_t; #endif -// TODO(andrew): remove WebRtc_ types: -// http://code.google.com/p/webrtc/issues/detail?id=314 -typedef int8_t WebRtc_Word8; -typedef int16_t WebRtc_Word16; -typedef int32_t WebRtc_Word32; -typedef int64_t WebRtc_Word64; -typedef uint8_t WebRtc_UWord8; -typedef uint16_t WebRtc_UWord16; -typedef uint32_t WebRtc_UWord32; -typedef uint64_t WebRtc_UWord64; - // Borrowed from Chromium's base/compiler_specific.h. // Annotate a virtual method indicating it must be overriding a virtual // method in the parent class.