From 977c2966fcb217f65d242fe5ba6d5fd3e4eab468 Mon Sep 17 00:00:00 2001 From: "hellner@google.com" Date: Tue, 16 Aug 2011 17:30:30 +0000 Subject: [PATCH] Review URL: http://webrtc-codereview.appspot.com/109006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@383 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/rtp_rtcp/source/forward_error_correction.cc | 1 - src/modules/rtp_rtcp/source/remote_rate_control.cc | 6 ++++-- src/modules/rtp_rtcp/source/rtp_receiver_video.cc | 2 +- src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 4 ++-- src/modules/rtp_rtcp/source/rtp_sender.cc | 4 ++-- src/modules/rtp_rtcp/source/rtp_sender_audio.cc | 2 +- src/modules/rtp_rtcp/source/rtp_sender_audio.h | 2 +- src/modules/rtp_rtcp/source/rtp_sender_video.cc | 4 ++-- src/modules/rtp_rtcp/source/rtp_sender_video.h | 2 +- src/modules/rtp_rtcp/source/rtp_utility.cc | 8 ++++---- 10 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/modules/rtp_rtcp/source/forward_error_correction.cc b/src/modules/rtp_rtcp/source/forward_error_correction.cc index c6cbf20f7..deedd716b 100644 --- a/src/modules/rtp_rtcp/source/forward_error_correction.cc +++ b/src/modules/rtp_rtcp/source/forward_error_correction.cc @@ -9,7 +9,6 @@ */ #include "forward_error_correction.h" -#include "fec_private_tables.h" #include "rtp_utility.h" #include "trace.h" diff --git a/src/modules/rtp_rtcp/source/remote_rate_control.cc b/src/modules/rtp_rtcp/source/remote_rate_control.cc index 3c72fd73f..c2ed20412 100644 --- a/src/modules/rtp_rtcp/source/remote_rate_control.cc +++ b/src/modules/rtp_rtcp/source/remote_rate_control.cc @@ -236,10 +236,12 @@ WebRtc_UWord32 RemoteRateControl::ChangeBitRate(WebRtc_UWord32 currentBitRate, #ifdef _DEBUG //char logStr[256]; #ifdef _WIN32 - _snprintf(logStr,256, "New bitRate: %lu\n", currentBitRate / 1000); + _snprintf(logStr,256, "New bitRate: %lu\n", + static_cast (currentBitRate / 1000)); OutputDebugStringA(logStr); #else - snprintf(logStr,256, "New bitRate: %lu\n", currentBitRate / 1000); + snprintf(logStr,256, "New bitRate: %lu\n", + static_cast (currentBitRate / 1000)); //TODO #endif #endif diff --git a/src/modules/rtp_rtcp/source/rtp_receiver_video.cc b/src/modules/rtp_rtcp/source/rtp_receiver_video.cc index 894e5deac..ff71d7b20 100644 --- a/src/modules/rtp_rtcp/source/rtp_receiver_video.cc +++ b/src/modules/rtp_rtcp/source/rtp_receiver_video.cc @@ -35,11 +35,11 @@ RTPReceiverVideo::RTPReceiverVideo(const WebRtc_Word32 id, _criticalSectionReceiverVideo(*CriticalSectionWrapper::CreateCriticalSection()), _completeFrame(false), - _receiveFEC(NULL), _packetStartTimeMs(0), _receivedBW(), _estimatedBW(0), _currentFecFrameDecoded(false), + _receiveFEC(NULL), _h263InverseLogic(false), _overUseDetector(), _videoBitRate(), diff --git a/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index 78724da8f..8f67f2d03 100644 --- a/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -2187,10 +2187,10 @@ ModuleRtpRtcpImpl::OnBandwidthEstimateUpdate(WebRtc_UWord16 bandWidthKbit) extensions. Overhead excludes any RTP payload headers and the payload itself. */ - WebRtc_UWord16 RTPpacketOH = _rtpReceiver.PacketOHReceived(); + _rtpReceiver.PacketOHReceived(); // call RequestTMMBR when our localy created estimate changes - _rtcpSender.RequestTMMBR(bandWidthKbit, 0/*RTPpacketOH + _packetOverHead*/); + _rtcpSender.RequestTMMBR(bandWidthKbit, 0); } } diff --git a/src/modules/rtp_rtcp/source/rtp_sender.cc b/src/modules/rtp_rtcp/source/rtp_sender.cc index 08d445e1d..8711b0aeb 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender.cc +++ b/src/modules/rtp_rtcp/source/rtp_sender.cc @@ -611,9 +611,9 @@ RTPSender::CheckPayloadType(const WebRtc_Word8 payloadType, _audio->SetAudioFrequency(payloadFreqHz); // We need to correct the timestamp again, // since this might happen after we've set it - WebRtc_UWord32 RTPtime = + WebRtc_UWord32 RTPtime = ModuleRTPUtility::CurrentRTP(payloadFreqHz); - SetStartTimestamp(RTPtime); + SetStartTimestamp(RTPtime); // will be ignored if it's already configured via API } } diff --git a/src/modules/rtp_rtcp/source/rtp_sender_audio.cc b/src/modules/rtp_rtcp/source/rtp_sender_audio.cc index 768b45a36..f643b0550 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender_audio.cc +++ b/src/modules/rtp_rtcp/source/rtp_sender_audio.cc @@ -87,7 +87,7 @@ RTPSenderAudio::SetAudioFrequency(const WebRtc_UWord32 f) _frequency = f; } -WebRtc_UWord32 +int RTPSenderAudio::AudioFrequency() const { CriticalSectionScoped cs(_sendAudioCritsect); diff --git a/src/modules/rtp_rtcp/source/rtp_sender_audio.h b/src/modules/rtp_rtcp/source/rtp_sender_audio.h index 592a17388..5a8214dcc 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender_audio.h +++ b/src/modules/rtp_rtcp/source/rtp_sender_audio.h @@ -71,7 +71,7 @@ public: void SetAudioFrequency(const WebRtc_UWord32 f); - WebRtc_UWord32 AudioFrequency() const; + int AudioFrequency() const; // Set payload type for Redundant Audio Data RFC 2198 WebRtc_Word32 SetRED(const WebRtc_Word8 payloadType); diff --git a/src/modules/rtp_rtcp/source/rtp_sender_video.cc b/src/modules/rtp_rtcp/source/rtp_sender_video.cc index db4f5a2f1..a6ef3f41a 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/src/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -170,7 +170,7 @@ RTPSenderVideo::SendVideoPacket(const FrameType frameType, // Add packet to FEC list _rtpPacketListFec.PushBack(ptrGenericFEC); // FEC can only protect up to kMaxMediaPackets packets - if (_mediaPacketListFec.GetSize() < + if (static_cast(_mediaPacketListFec.GetSize()) < ForwardErrorCorrection::kMaxMediaPackets) { _mediaPacketListFec.PushBack(ptrGenericFEC->pkt); @@ -195,7 +195,7 @@ RTPSenderVideo::SendVideoPacket(const FrameType frameType, // Number of first partition packets cannot exceed kMaxMediaPackets if (_numberFirstPartition > - ForwardErrorCorrection::kMaxMediaPackets) + ForwardErrorCorrection::kMaxMediaPackets) { _numberFirstPartition = ForwardErrorCorrection::kMaxMediaPackets; diff --git a/src/modules/rtp_rtcp/source/rtp_sender_video.h b/src/modules/rtp_rtcp/source/rtp_sender_video.h index 640f568da..46ea28234 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender_video.h +++ b/src/modules/rtp_rtcp/source/rtp_sender_video.h @@ -160,7 +160,7 @@ private: bool _useUepProtectionDelta; WebRtc_UWord8 _fecProtectionFactor; bool _fecUseUepProtection; - WebRtc_UWord32 _numberFirstPartition; + int _numberFirstPartition; ListWrapper _mediaPacketListFec; ListWrapper _rtpPacketListFec; diff --git a/src/modules/rtp_rtcp/source/rtp_utility.cc b/src/modules/rtp_rtcp/source/rtp_utility.cc index 3fbb3ffbd..70062afd9 100644 --- a/src/modules/rtp_rtcp/source/rtp_utility.cc +++ b/src/modules/rtp_rtcp/source/rtp_utility.cc @@ -567,11 +567,11 @@ ModuleRTPUtility::RTPHeaderParser::Parse(WebRtcRTPHeader& parsedPacket) const */ // Parse out the fields but only use it for debugging for now. - const WebRtc_UWord8 ID = (*ptr & 0xf0) >> 4; - const WebRtc_UWord8 len = (*ptr & 0x0f); + //const WebRtc_UWord8 ID = (*ptr & 0xf0) >> 4; + //const WebRtc_UWord8 len = (*ptr & 0x0f); ptr++; - const WebRtc_UWord8 V = (*ptr & 0x80) >> 7; - const WebRtc_UWord8 level = (*ptr & 0x7f); + //const WebRtc_UWord8 V = (*ptr & 0x80) >> 7; + //const WebRtc_UWord8 level = (*ptr & 0x7f); // DEBUG_PRINT("RTP_AUDIO_LEVEL_UNIQUE_ID: ID=%u, len=%u, V=%u, level=%u", ID, len, V, level); } parsedPacket.header.headerLength += XLen;