[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-protocol-cvs
Subject: [Protocol-cvs] transport/rtp rtptran.cpp,1.108,1.109
From: milko () helixcommunity ! org
Date: 2007-01-11 21:19:44
Message-ID: 200701112120.l0BLKdCE006836 () dombackupmx2 ! xen ! 10east ! com
[Download RAW message or body]
Update of /cvsroot/protocol/transport/rtp
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv14780/rtp
Modified Files:
rtptran.cpp
Log Message:
Overview:
This check-in provides tools for deterministic testing of time-stamp wrap-around \
issues of live streams and corrects few issues discovered via such tools.
1.) The live stream testing tool:
The tools provided in this check-in allow testing of time-stamp wrap-around \
handling of live streams starting with source object and in all other down-stream \
objects (renderer, audio stream, audio player, audio session, audio device, site, \
surface).
2.) Fixes for live-stream timestamp wrap-around.
One test revelead few errors in time-stamp wrap-around handling that required \
modfications:
- Audio stream time-stamp mapping code (specific to RealAudio streams) use to \
correct files produced with inaccurate ressampling was causing constant-rebuffering \
after time-stamp wrap around due to failure to properly map the time-stamp. Mapping \
failure resulted in time line in up-stream player objects to halt. The mapping \
failure was caused by improper computation of 64 bit time-stamps in the mapping code \
by using time-stamp wrap around counter from the future (beginning of audio stream) \
at the time of audio mixing (end of audio stream). The issues was corrected by \
eliminating the use of 64 bit time-stamps in the mapping code since it is \
unnecessary.
- Corrected HXSource::CalcEventTime which attempted to clip event times against \
m_ulFirstPacketTime for live streams. This code is conceptually wrong and simply \
does not work in general. The code was simplified and rid of special case clipping \
logic.
- Corrected RealVideo depacketizer logic which handles incorrectly produced content \
missing the proper time-stamp size field setting (14 or 30 bits). The detection of \
such scenario was based on comparison of packet (32bit) and frame (14 or 30bit) \
time-stamps. The logic failed to discrad the upper 2 bits from the packet time-stamp \
thus possibly producing wrong conclusions for time-stamps > 30bits.
- Time-stamp wrap-around caused improper water-mark based rate throttling. The \
cause was inadequate implementation of IHXSourceBufferingStats::GetCurrentBuffering \
method in the transport buffer which did not continue to return the proper lowest and \
highest 64bit time-stamps after the wrap-around. While the relationship between the \
returned lowest and highest time-stamp was correct for a particular stream, the \
relationship to other stream was not guaranteed thus causing higher level code to \
establish incorrect time ranges on wrap-around condition.
- RealMedia file format and dtdriver framework halted on encounter with 0xFFFFFFFF \
time-stamp due to assumption made in the lowest time-stamp search algorithm that \
0xFFFFFFFF time-stamp is larger than any encountered time-stamp. This was true for \
the most part until the containment of live streams was introduced.
Other modification include addition of logging statements and eliminationn od \
circular QI in dtdriver framework.
Index: rtptran.cpp
===================================================================
RCS file: /cvsroot/protocol/transport/rtp/rtptran.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- rtptran.cpp 19 Dec 2006 15:51:45 -0000 1.108
+++ rtptran.cpp 11 Jan 2007 21:19:42 -0000 1.109
@@ -3820,8 +3820,8 @@
HXTimeval rmatv = m_pScheduler->GetCurrentSchedulerTime();
UINT32 ulNow = rmatv.tv_sec*1000 + rmatv.tv_usec/1000;
- INT64 llLowTS = 0;
- INT64 llHighTS = 0;
+ UINT32 ulLowTS = 0;
+ UINT32 ulHighTS = 0;
UINT32 ulBytesBuffered = 0;
HXBOOL bDone = FALSE;
HXBOOL bNeedBufInfoPkt = TRUE; // Assume we need to send BufInfo pkts
@@ -3926,12 +3926,12 @@
if (!m_pSrcBufferStats || !m_pReportHandler ||
HXR_OK != m_pSrcBufferStats->GetTotalBuffering(m_streamNumber,
- llLowTS, llHighTS,
+ ulLowTS, ulHighTS,
ulBytesBuffered,
bDone) ||
HXR_OK != m_pReportHandler->MakeBufInfoApp(pPktBufInfo,
- INT64_TO_UINT32(llLowTS),
- INT64_TO_UINT32(llHighTS),
+ ulLowTS,
+ ulHighTS,
ulBytesBuffered))
{
// If we failed for some reason,
_______________________________________________
Protocol-cvs mailing list
Protocol-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/protocol-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic