[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] tools/dtdriver/engine csrcsplt.cpp, 1.4.82.5,
From:       jfinnecy () helixcommunity ! org
Date:       2009-05-29 21:41:49
Message-ID: 200905292249.n4TMmsro012396 () dommarcmx ! xen ! 10east ! com
[Download RAW message or body]

Update of /cvsroot/datatype/tools/dtdriver/engine
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv24121

Modified Files:
      Tag: hxclient_2_0_4_cayenne
	csrcsplt.cpp 
Log Message:
Description
----------------------------
FLVs hang while transcoding the audio stream. Bug is eliminated by reverting the \
following change:

- if (!m_pStreamStatusArray[ulStreamNum].m_bOnStreamDonePending)
+ if (m_pStreamStatusArray[ulStreamNum].m_eFilterType != CStreamStatus::SFT_BLOCK)

Prior to change, once OnStreamDone was called on the video stream, we would \
automatically process any further packets on that stream. After the change, we \
instead enter the evaluation code (because stream status is still == SFT_PASS). Since \
lastOutputTimestamp is no longer incrementing on the video stream, and because \
ulMinOutputTimeStamp gets the lowest timestamp of all streams, including the \
no-longer-incrementing video stream, we eventually fail the test against \
HX_DTDR_SPLITTER_INPUT_TOLERANCE and stop processing packets on the audio stream.

Fix puts back short-circuit to force processing packets on streams that are "done" \
but still set to status SFT_PASS.


Index: csrcsplt.cpp
===================================================================
RCS file: /cvsroot/datatype/tools/dtdriver/engine/csrcsplt.cpp,v
retrieving revision 1.4.82.5
retrieving revision 1.4.82.6
diff -u -d -r1.4.82.5 -r1.4.82.6
--- csrcsplt.cpp	26 May 2009 02:03:23 -0000	1.4.82.5
+++ csrcsplt.cpp	29 May 2009 21:41:46 -0000	1.4.82.6
@@ -258,70 +258,76 @@
         // Sanity check
         if (ulStreamNum < m_ulNumStreams)
         {
+	    // If OnStreamDone() has been called on this stream, 
+	    // we need to process this packet regardless.
+	    if (m_pStreamStatusArray[ulStreamNum].m_bOnStreamDonePending)
+	    {
+		bRet = TRUE;
+	    }	    
             // Is this stream being blocked?
-            if (m_pStreamStatusArray[ulStreamNum].m_eFilterType != \
CStreamStatus::SFT_BLOCK) +            else if \
(m_pStreamStatusArray[ulStreamNum].m_eFilterType != CStreamStatus::SFT_BLOCK)  {
                 // This stream is either being passed through or decoded,
                 // so we need to do further checking to see if we should
                 // push this packet through to the processor.
                 //
-            // Has this stream given us any output yet?
-            if (!m_pStreamStatusArray[ulStreamNum].m_bFirstOutputPacket)
-            {
-                // This stream has given us some output, so compute the
-                // minimum output timestamp across all streams
-                for (i = 0; i < m_ulNumStreams; i++)
-                {
-                    // Get the last output time for this stream. If this
-                    // stream has not produced any output yet, then we 
-                    // will use 0 for the last output timestamp.
-                        UINT32 ulLastOutputTimeStamp = m_ulStartTime;
-                        if (!m_pStreamStatusArray[i].m_bFirstOutputPacket &&
-                            m_pStreamStatusArray[i].m_ulLastOutputTimeStamp >= \
                m_ulStartTime)
-                    {
-                        ulLastOutputTimeStamp = \
                m_pStreamStatusArray[i].m_ulLastOutputTimeStamp;
-                    }
-                    // Is the last output timestamp on this stream less than the \
                minimum?
-                    if (ulLastOutputTimeStamp < ulMinOutputTimeStamp)
-                    {
-                        // This is the new minimum, so save the timestamp and the \
                stream
-                        ulMinOutputTimeStamp = ulLastOutputTimeStamp;
-                        ulMinOutputStream    = i;
-                    }
-                }
-                // Do we have a valid minimum output time?
-                if (ulMinOutputStream < m_ulNumStreams)
-                {
-                    // Get the intput packet timestamp
-                    UINT32 ulTime = pPacket->GetTime();
-                    // Compute the difference between the minimum
-                    // output timestamp and this input timestamp.
-                    ulDiff = (ulTime > ulMinOutputTimeStamp ? ulTime - \
                ulMinOutputTimeStamp : 0);
-                    // We will allow the packet to be sent to the processor if this \
                is the
-                    // minimum stream, or if it is not the minimum stream, if it is \
                within
-                    // HX_DTDR_SPLITTER_INPUT_TOLERANCE milliseconds of the minimum \
                output time.
-                    if (ulStreamNum == ulMinOutputStream || ulDiff < \
                HX_DTDR_SPLITTER_INPUT_TOLERANCE)
-                    {
-                        // The timestamp of this packet is within \
                HX_DTDR_SPLITTER_INPUT_TOLERANCE
-                        // milliseconds of the minimum output timestamp, so let this \
                packet
-                        // be sent to the processor
-                        bRet = TRUE;
-                    }
-                }
-                else
-                {
-                    // No streams have given us output yet, so we will
-                    // let this packet be passed onto the processor
-                    bRet = TRUE;
-                }
-            }
-            else
-            {
-                // This stream has not given us any output, so we
-                // will allow this packet to be given to the processor
-                bRet = TRUE;
-            }
-        }
+		// Has this stream given us any output yet?
+		if (!m_pStreamStatusArray[ulStreamNum].m_bFirstOutputPacket)
+		{
+		    // This stream has given us some output, so compute the
+		    // minimum output timestamp across all streams
+		    for (i = 0; i < m_ulNumStreams; i++)
+		    {
+			// Get the last output time for this stream. If this
+			// stream has not produced any output yet, then we 
+			// will use 0 for the last output timestamp.
+			    UINT32 ulLastOutputTimeStamp = m_ulStartTime;
+			    if (!m_pStreamStatusArray[i].m_bFirstOutputPacket &&
+				m_pStreamStatusArray[i].m_ulLastOutputTimeStamp >= m_ulStartTime)
+			{
+			    ulLastOutputTimeStamp = m_pStreamStatusArray[i].m_ulLastOutputTimeStamp;
+			}
+			// Is the last output timestamp on this stream less than the minimum?
+			if (ulLastOutputTimeStamp < ulMinOutputTimeStamp)
+			{
+			    // This is the new minimum, so save the timestamp and the stream
+			    ulMinOutputTimeStamp = ulLastOutputTimeStamp;
+			    ulMinOutputStream    = i;
+			}
+		    }
+		    // Do we have a valid minimum output time?
+		    if (ulMinOutputStream < m_ulNumStreams)
+		    {
+			// Get the intput packet timestamp
+			UINT32 ulTime = pPacket->GetTime();
+			// Compute the difference between the minimum
+			// output timestamp and this input timestamp.
+			ulDiff = (ulTime > ulMinOutputTimeStamp ? ulTime - ulMinOutputTimeStamp : 0);
+			// We will allow the packet to be sent to the processor if this is the
+			// minimum stream, or if it is not the minimum stream, if it is within
+			// HX_DTDR_SPLITTER_INPUT_TOLERANCE milliseconds of the minimum output time.
+			if (ulStreamNum == ulMinOutputStream || ulDiff < \
HX_DTDR_SPLITTER_INPUT_TOLERANCE) +			{
+			    // The timestamp of this packet is within HX_DTDR_SPLITTER_INPUT_TOLERANCE
+			    // milliseconds of the minimum output timestamp, so let this packet
+			    // be sent to the processor
+			    bRet = TRUE;
+			}
+		    }
+		    else
+		    {
+			// No streams have given us output yet, so we will
+			// let this packet be passed onto the processor
+			bRet = TRUE;
+		    }
+		}
+		else
+		{
+		    // This stream has not given us any output, so we
+		    // will allow this packet to be given to the processor
+		    bRet = TRUE;
+		}
+	    }
             else
             {
                 // This stream is being blocked on output, so we can


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic