From 68e5a68f073b43a195ef7a846f3965fa9e6a2356 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Thu, 2 May 2013 09:30:12 +0000 Subject: [PATCH] Revert 3933 "Remove traces of deprecated WebRtc_Word types." > Remove traces of deprecated WebRtc_Word types. > > BUG=314 > R=tommi@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/1385004 TBR=pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1386004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3934 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, 30 insertions(+), 19 deletions(-) diff --git a/webrtc/common_types.h b/webrtc/common_types.h index 5001da297..fd0d1d97a 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 - uint16_t currentBufferSize; + WebRtc_UWord16 currentBufferSize; // preferred (optimal) buffer size in ms - uint16_t preferredBufferSize; + WebRtc_UWord16 preferredBufferSize; // adding extra delay due to "peaky jitter" bool jitterPeaksFound; // loss rate (network + late) in percent (in Q14) - uint16_t currentPacketLossRate; + WebRtc_UWord16 currentPacketLossRate; // late loss rate in percent (in Q14) - uint16_t currentDiscardRate; + WebRtc_UWord16 currentDiscardRate; // fraction (of original stream) of synthesized speech inserted through // expansion (in Q14) - uint16_t currentExpandRate; + WebRtc_UWord16 currentExpandRate; // fraction of synthesized speech inserted through pre-emptive expansion // (in Q14) - uint16_t currentPreemptiveRate; + WebRtc_UWord16 currentPreemptiveRate; // fraction of data removed through acceleration (in Q14) - uint16_t currentAccelerateRate; + WebRtc_UWord16 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 0a36a9ef6..2d0206296 100644 --- a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @@ -82,7 +82,8 @@ class MockRtpRtcp : public RtpRtcp { MOCK_METHOD1(SetRtxReceivePayloadType, void(int)); MOCK_METHOD2(IncomingPacket, - int32_t(const uint8_t* incomingPacket, const uint16_t packetLength)); + int32_t(const WebRtc_UWord8* incomingPacket, + const WebRtc_UWord16 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 095a231dd..15ec4245f 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 int32_t OnReceivedPayloadData( - const uint8_t* payload_data, - const uint16_t payload_size, + virtual WebRtc_Word32 OnReceivedPayloadData( + const WebRtc_UWord8* payload_data, + const WebRtc_UWord16 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 159de1718..c16b98dff 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() { } } -int32_t FileOutputFrameReceiver::FrameToRender( +WebRtc_Word32 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 43af6f16b..cfbd24bc4 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 int32_t FrameToRender(webrtc::I420VideoFrame& video_frame); + virtual WebRtc_Word32 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 a84561ad7..002676707 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,22 +60,21 @@ class VcmPayloadSinkFactory::VcmPayloadSink } // PayloadSinkInterface - virtual int32_t OnReceivedPayloadData( - const uint8_t* payload_data, - const uint16_t payload_size, + virtual WebRtc_Word32 OnReceivedPayloadData(const WebRtc_UWord8* payload_data, + const WebRtc_UWord16 payload_size, const WebRtcRTPHeader* rtp_header) { return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header); } // VCMPacketRequestCallback - virtual int32_t ResendPackets(const uint16_t* sequence_numbers, - uint16_t length) { + virtual WebRtc_Word32 ResendPackets(const WebRtc_UWord16* sequence_numbers, + WebRtc_UWord16 length) { stream_->ResendPackets(sequence_numbers, length); return 0; } // VCMFrameStorageCallback - virtual int32_t StoreReceivedFrame( + virtual WebRtc_Word32 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 7edb12c07..0d2dfcd90 100644 --- a/webrtc/typedefs.h +++ b/webrtc/typedefs.h @@ -75,6 +75,17 @@ 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.