Review URL: http://webrtc-codereview.appspot.com/109006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@383 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
5daeae2e5f
commit
977c2966fc
@ -9,7 +9,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "forward_error_correction.h"
|
#include "forward_error_correction.h"
|
||||||
#include "fec_private_tables.h"
|
|
||||||
#include "rtp_utility.h"
|
#include "rtp_utility.h"
|
||||||
|
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
@ -236,10 +236,12 @@ WebRtc_UWord32 RemoteRateControl::ChangeBitRate(WebRtc_UWord32 currentBitRate,
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
//char logStr[256];
|
//char logStr[256];
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
_snprintf(logStr,256, "New bitRate: %lu\n", currentBitRate / 1000);
|
_snprintf(logStr,256, "New bitRate: %lu\n",
|
||||||
|
static_cast<long unsigned int> (currentBitRate / 1000));
|
||||||
OutputDebugStringA(logStr);
|
OutputDebugStringA(logStr);
|
||||||
#else
|
#else
|
||||||
snprintf(logStr,256, "New bitRate: %lu\n", currentBitRate / 1000);
|
snprintf(logStr,256, "New bitRate: %lu\n",
|
||||||
|
static_cast<long unsigned int> (currentBitRate / 1000));
|
||||||
//TODO
|
//TODO
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,11 +35,11 @@ RTPReceiverVideo::RTPReceiverVideo(const WebRtc_Word32 id,
|
|||||||
_criticalSectionReceiverVideo(*CriticalSectionWrapper::CreateCriticalSection()),
|
_criticalSectionReceiverVideo(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
|
|
||||||
_completeFrame(false),
|
_completeFrame(false),
|
||||||
_receiveFEC(NULL),
|
|
||||||
_packetStartTimeMs(0),
|
_packetStartTimeMs(0),
|
||||||
_receivedBW(),
|
_receivedBW(),
|
||||||
_estimatedBW(0),
|
_estimatedBW(0),
|
||||||
_currentFecFrameDecoded(false),
|
_currentFecFrameDecoded(false),
|
||||||
|
_receiveFEC(NULL),
|
||||||
_h263InverseLogic(false),
|
_h263InverseLogic(false),
|
||||||
_overUseDetector(),
|
_overUseDetector(),
|
||||||
_videoBitRate(),
|
_videoBitRate(),
|
||||||
|
@ -2187,10 +2187,10 @@ ModuleRtpRtcpImpl::OnBandwidthEstimateUpdate(WebRtc_UWord16 bandWidthKbit)
|
|||||||
extensions. Overhead excludes any RTP payload headers and the
|
extensions. Overhead excludes any RTP payload headers and the
|
||||||
payload itself.
|
payload itself.
|
||||||
*/
|
*/
|
||||||
WebRtc_UWord16 RTPpacketOH = _rtpReceiver.PacketOHReceived();
|
_rtpReceiver.PacketOHReceived();
|
||||||
|
|
||||||
// call RequestTMMBR when our localy created estimate changes
|
// call RequestTMMBR when our localy created estimate changes
|
||||||
_rtcpSender.RequestTMMBR(bandWidthKbit, 0/*RTPpacketOH + _packetOverHead*/);
|
_rtcpSender.RequestTMMBR(bandWidthKbit, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,9 +611,9 @@ RTPSender::CheckPayloadType(const WebRtc_Word8 payloadType,
|
|||||||
_audio->SetAudioFrequency(payloadFreqHz);
|
_audio->SetAudioFrequency(payloadFreqHz);
|
||||||
// We need to correct the timestamp again,
|
// We need to correct the timestamp again,
|
||||||
// since this might happen after we've set it
|
// since this might happen after we've set it
|
||||||
WebRtc_UWord32 RTPtime =
|
WebRtc_UWord32 RTPtime =
|
||||||
ModuleRTPUtility::CurrentRTP(payloadFreqHz);
|
ModuleRTPUtility::CurrentRTP(payloadFreqHz);
|
||||||
SetStartTimestamp(RTPtime);
|
SetStartTimestamp(RTPtime);
|
||||||
// will be ignored if it's already configured via API
|
// will be ignored if it's already configured via API
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ RTPSenderAudio::SetAudioFrequency(const WebRtc_UWord32 f)
|
|||||||
_frequency = f;
|
_frequency = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_UWord32
|
int
|
||||||
RTPSenderAudio::AudioFrequency() const
|
RTPSenderAudio::AudioFrequency() const
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(_sendAudioCritsect);
|
CriticalSectionScoped cs(_sendAudioCritsect);
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
void SetAudioFrequency(const WebRtc_UWord32 f);
|
void SetAudioFrequency(const WebRtc_UWord32 f);
|
||||||
|
|
||||||
WebRtc_UWord32 AudioFrequency() const;
|
int AudioFrequency() const;
|
||||||
|
|
||||||
// Set payload type for Redundant Audio Data RFC 2198
|
// Set payload type for Redundant Audio Data RFC 2198
|
||||||
WebRtc_Word32 SetRED(const WebRtc_Word8 payloadType);
|
WebRtc_Word32 SetRED(const WebRtc_Word8 payloadType);
|
||||||
|
@ -170,7 +170,7 @@ RTPSenderVideo::SendVideoPacket(const FrameType frameType,
|
|||||||
// Add packet to FEC list
|
// Add packet to FEC list
|
||||||
_rtpPacketListFec.PushBack(ptrGenericFEC);
|
_rtpPacketListFec.PushBack(ptrGenericFEC);
|
||||||
// FEC can only protect up to kMaxMediaPackets packets
|
// FEC can only protect up to kMaxMediaPackets packets
|
||||||
if (_mediaPacketListFec.GetSize() <
|
if (static_cast<int>(_mediaPacketListFec.GetSize()) <
|
||||||
ForwardErrorCorrection::kMaxMediaPackets)
|
ForwardErrorCorrection::kMaxMediaPackets)
|
||||||
{
|
{
|
||||||
_mediaPacketListFec.PushBack(ptrGenericFEC->pkt);
|
_mediaPacketListFec.PushBack(ptrGenericFEC->pkt);
|
||||||
@ -195,7 +195,7 @@ RTPSenderVideo::SendVideoPacket(const FrameType frameType,
|
|||||||
|
|
||||||
// Number of first partition packets cannot exceed kMaxMediaPackets
|
// Number of first partition packets cannot exceed kMaxMediaPackets
|
||||||
if (_numberFirstPartition >
|
if (_numberFirstPartition >
|
||||||
ForwardErrorCorrection::kMaxMediaPackets)
|
ForwardErrorCorrection::kMaxMediaPackets)
|
||||||
{
|
{
|
||||||
_numberFirstPartition =
|
_numberFirstPartition =
|
||||||
ForwardErrorCorrection::kMaxMediaPackets;
|
ForwardErrorCorrection::kMaxMediaPackets;
|
||||||
|
@ -160,7 +160,7 @@ private:
|
|||||||
bool _useUepProtectionDelta;
|
bool _useUepProtectionDelta;
|
||||||
WebRtc_UWord8 _fecProtectionFactor;
|
WebRtc_UWord8 _fecProtectionFactor;
|
||||||
bool _fecUseUepProtection;
|
bool _fecUseUepProtection;
|
||||||
WebRtc_UWord32 _numberFirstPartition;
|
int _numberFirstPartition;
|
||||||
ListWrapper _mediaPacketListFec;
|
ListWrapper _mediaPacketListFec;
|
||||||
ListWrapper _rtpPacketListFec;
|
ListWrapper _rtpPacketListFec;
|
||||||
|
|
||||||
|
@ -567,11 +567,11 @@ ModuleRTPUtility::RTPHeaderParser::Parse(WebRtcRTPHeader& parsedPacket) const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Parse out the fields but only use it for debugging for now.
|
// Parse out the fields but only use it for debugging for now.
|
||||||
const WebRtc_UWord8 ID = (*ptr & 0xf0) >> 4;
|
//const WebRtc_UWord8 ID = (*ptr & 0xf0) >> 4;
|
||||||
const WebRtc_UWord8 len = (*ptr & 0x0f);
|
//const WebRtc_UWord8 len = (*ptr & 0x0f);
|
||||||
ptr++;
|
ptr++;
|
||||||
const WebRtc_UWord8 V = (*ptr & 0x80) >> 7;
|
//const WebRtc_UWord8 V = (*ptr & 0x80) >> 7;
|
||||||
const WebRtc_UWord8 level = (*ptr & 0x7f);
|
//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);
|
// DEBUG_PRINT("RTP_AUDIO_LEVEL_UNIQUE_ID: ID=%u, len=%u, V=%u, level=%u", ID, len, V, level);
|
||||||
}
|
}
|
||||||
parsedPacket.header.headerLength += XLen;
|
parsedPacket.header.headerLength += XLen;
|
||||||
|
Loading…
Reference in New Issue
Block a user