Relanding r3952: VCM: Updating receiver logic
BUG=r1734 R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1433004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3970 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -34,8 +34,7 @@ _renderDelayMs(kDefaultRenderDelayMs),
|
||||
_minTotalDelayMs(0),
|
||||
_requiredDelayMs(0),
|
||||
_currentDelayMs(0),
|
||||
_prevFrameTimestamp(0),
|
||||
_maxVideoDelayMs(kMaxVideoDelayMs)
|
||||
_prevFrameTimestamp(0)
|
||||
{
|
||||
if (masterTiming == NULL)
|
||||
{
|
||||
@ -219,10 +218,6 @@ VCMTiming::RenderTimeMs(uint32_t frameTimestamp, int64_t nowMs) const
|
||||
{
|
||||
CriticalSectionScoped cs(_critSect);
|
||||
const int64_t renderTimeMs = RenderTimeMsInternal(frameTimestamp, nowMs);
|
||||
if (renderTimeMs < 0)
|
||||
{
|
||||
return renderTimeMs;
|
||||
}
|
||||
if (_master)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCoding, VCMId(_vcmId, _timingId),
|
||||
@ -239,16 +234,6 @@ VCMTiming::RenderTimeMsInternal(uint32_t frameTimestamp, int64_t nowMs) const
|
||||
{
|
||||
int64_t estimatedCompleteTimeMs =
|
||||
_tsExtrapolator->ExtrapolateLocalTime(frameTimestamp);
|
||||
if (estimatedCompleteTimeMs - nowMs > _maxVideoDelayMs)
|
||||
{
|
||||
if (_master)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCoding, VCMId(_vcmId, _timingId),
|
||||
"Timestamp arrived 2 seconds early, reset statistics",
|
||||
frameTimestamp, estimatedCompleteTimeMs);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (_master)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCoding, VCMId(_vcmId, _timingId),
|
||||
@ -315,12 +300,6 @@ VCMTiming::EnoughTimeToDecode(uint32_t availableProcessingTimeMs) const
|
||||
return static_cast<int32_t>(availableProcessingTimeMs) - maxDecodeTimeMs > 0;
|
||||
}
|
||||
|
||||
void VCMTiming::SetMaxVideoDelay(int maxVideoDelayMs)
|
||||
{
|
||||
CriticalSectionScoped cs(_critSect);
|
||||
_maxVideoDelayMs = maxVideoDelayMs;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
VCMTiming::TargetVideoDelay() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user