Fixed incorrect packet loss reported to encoder.
BUG=275 Review URL: https://webrtc-codereview.appspot.com/394004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1669 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
6b3bb89f12
commit
8224e19dd9
@ -2724,14 +2724,11 @@ void ModuleRtpRtcpImpl::ProcessDefaultModuleBandwidth() {
|
|||||||
{
|
{
|
||||||
// get min and max for the sending channels
|
// get min and max for the sending channels
|
||||||
CriticalSectionScoped lock(_criticalSectionModulePtrs);
|
CriticalSectionScoped lock(_criticalSectionModulePtrs);
|
||||||
|
for (std::list<ModuleRtpRtcpImpl*>::iterator it = _childModules.begin();
|
||||||
std::list<ModuleRtpRtcpImpl*>::iterator it =
|
it != _childModules.end(); ++ it) {
|
||||||
_childModules.begin();
|
// Get child RTP sender and ask for bitrate estimate.
|
||||||
while (it != _childModules.end()) {
|
|
||||||
// Get child RTP sender and ask for bitrate estimate
|
|
||||||
ModuleRtpRtcpImpl* childModule = *it;
|
ModuleRtpRtcpImpl* childModule = *it;
|
||||||
if (childModule->Sending()) {
|
if (childModule->Sending()) {
|
||||||
count++;
|
|
||||||
RTPSender& childRtpSender = (*it)->_rtpSender;
|
RTPSender& childRtpSender = (*it)->_rtpSender;
|
||||||
const WebRtc_UWord32 childEstimateBps =
|
const WebRtc_UWord32 childEstimateBps =
|
||||||
1000 * childRtpSender.TargetSendBitrateKbit();
|
1000 * childRtpSender.TargetSendBitrateKbit();
|
||||||
@ -2741,27 +2738,19 @@ void ModuleRtpRtcpImpl::ProcessDefaultModuleBandwidth() {
|
|||||||
if (childEstimateBps > maxBitrateBps) {
|
if (childEstimateBps > maxBitrateBps) {
|
||||||
maxBitrateBps = childEstimateBps;
|
maxBitrateBps = childEstimateBps;
|
||||||
}
|
}
|
||||||
WebRtc_UWord16 RTT = 0;
|
|
||||||
WebRtc_UWord8 fractionLost = 0;
|
|
||||||
RTPReceiver& childRtpReceiver = (*it)->_rtpReceiver;
|
|
||||||
RTCPReceiver& childRtcpReceiver = (*it)->_rtcpReceiver;
|
RTCPReceiver& childRtcpReceiver = (*it)->_rtcpReceiver;
|
||||||
childRtpReceiver.Statistics(&fractionLost,
|
|
||||||
NULL,
|
std::vector<RTCPReportBlock> rtcp_blocks;
|
||||||
NULL,
|
childRtcpReceiver.StatisticsReceived(&rtcp_blocks);
|
||||||
NULL,
|
for (std::vector<RTCPReportBlock>::iterator rit = rtcp_blocks.begin();
|
||||||
NULL,
|
rit != rtcp_blocks.end(); ++rit) {
|
||||||
NULL,
|
count++;
|
||||||
false);
|
fractionLostAcc += rit->fractionLost;
|
||||||
fractionLostAcc += fractionLost;
|
WebRtc_UWord16 RTT = 0;
|
||||||
childRtcpReceiver.RTT(childRtpReceiver.SSRC(),
|
childRtcpReceiver.RTT(rit->remoteSSRC, &RTT, NULL, NULL, NULL);
|
||||||
&RTT,
|
maxRoundTripTime = (RTT > maxRoundTripTime) ? RTT : maxRoundTripTime;
|
||||||
NULL,
|
}
|
||||||
NULL,
|
|
||||||
NULL);
|
|
||||||
maxRoundTripTime =
|
|
||||||
(RTT > maxRoundTripTime) ? RTT : maxRoundTripTime;
|
|
||||||
}
|
}
|
||||||
it++;
|
|
||||||
}
|
}
|
||||||
} // end critsect
|
} // end critsect
|
||||||
|
|
||||||
|
@ -210,7 +210,8 @@ class WEBRTC_DLLEXPORT ViERTP_RTCP {
|
|||||||
bool sender,
|
bool sender,
|
||||||
bool receiver) = 0;
|
bool receiver) = 0;
|
||||||
|
|
||||||
// The function gets statistics from the received RTCP report.
|
// This function returns our locally created statistics of the received RTP
|
||||||
|
// stream.
|
||||||
virtual int GetReceivedRTCPStatistics(
|
virtual int GetReceivedRTCPStatistics(
|
||||||
const int video_channel,
|
const int video_channel,
|
||||||
unsigned short& fraction_lost,
|
unsigned short& fraction_lost,
|
||||||
@ -219,7 +220,8 @@ class WEBRTC_DLLEXPORT ViERTP_RTCP {
|
|||||||
unsigned int& jitter,
|
unsigned int& jitter,
|
||||||
int& rtt_ms) const = 0;
|
int& rtt_ms) const = 0;
|
||||||
|
|
||||||
// The function gets statistics from the RTCP report sent to the receiver.
|
// This function returns statistics reported by the remote client in a RTCP
|
||||||
|
// packet.
|
||||||
virtual int GetSentRTCPStatistics(const int video_channel,
|
virtual int GetSentRTCPStatistics(const int video_channel,
|
||||||
unsigned short& fraction_lost,
|
unsigned short& fraction_lost,
|
||||||
unsigned int& cumulative_lost,
|
unsigned int& cumulative_lost,
|
||||||
|
Loading…
Reference in New Issue
Block a user