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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/dataflow ppm.cpp,1.102,1.103
From:       dsingh () helixcommunity ! org
Date:       2008-01-31 8:59:55
Message-ID: 200801310900.m0V902jF027600 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/engine/dataflow
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv17674

Modified Files:
	ppm.cpp 
Log Message:
Synopsis
========
Fix for [Bug 210441] With TCP transport, playback through proxy stalls after few \
seconds of streaming.

Branch: HEAD , SERVER_12_RN.
Suggested Reviewer: Darrick, Sean, Anyone.

Description
===========
The problem was that, when TCP socket buffered the data, the getpacket->packetready \
sequence halted due to call to PPM::Session::WouldBlock(). To restart the \
GetPacket->PacketReady sequence, function PPM::Session::WouldBlockCleared() should \
get called. The functon should be called when HX_SOCK_EVENT_WRITE event comes at \
RTSPProxyProtocol::EventPending. But HX_SOCK_EVENT_WRITE event was blocked at this \
socket. The event is enabled by removing 
m_pSock->SelectEvents(HX_SOCK_EVENT_READ | HX_SOCK_EVENT_CLOSE); from \
RTSPProxyProtocol::EventPending.

Also notification code is added to notify the HX_SOCK_EVENT_WRITE event to \
RDTTCPTransport::EventPending(), which in turn call PPM::Session::WouldBlockCleared \
and play will be called. 

with this fix still Play() was not getting called due to m_bPktBufQProcessed was \
always found FALSE. So m_bPktBufQProcessed is now checked only for live, for which it \
was added originaly.


Files Affected
==============

server/engine/dataflow/ppm.cpp
server-restricted/proxy/rproxy/rtspprxy.cpp
server/protocol/rtsp/crtspbase.cpp
server/protocol/rtsp/rtspserv.cpp
server/protocol/rtsp/pub/crtspbase.h 


Testing Performed
=================

Unit Tests:
- None

Integration Tests:
- Tested by playing through proxy over TCP and observed that clip is playing up to \
end.

Leak Tests:
- None.

Performance Tests:
- None

Platforms Tested: linux-rhel14-i686.
Build verified: linux-rhel14-i686.

QA Hints
===============
- Beacuse the fix also affects server code so please test server and proxy  for OD \
over TCP, live over TCP.

Regards
-Dalvinder


Index: ppm.cpp
===================================================================
RCS file: /cvsroot/server/engine/dataflow/ppm.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- ppm.cpp	16 Jan 2008 10:04:24 -0000	1.102
+++ ppm.cpp	31 Jan 2008 08:59:51 -0000	1.103
@@ -6509,9 +6509,18 @@
     {
         pSD->m_bWouldBlocking = TRUE;
         m_ulWouldBlocking++;
-        if (m_ulWouldBlocking == 1 && m_bPktBufQProcessed)
+        if (m_ulWouldBlocking == 1)
         {
-            Pause(TRUE);
+            if(m_bIsLive && m_bPktBufQProcessed == FALSE)
+            {
+                //Do nothing
+                return HXR_OK;
+            }
+            else
+            {
+                Pause(TRUE);
+            }
+            
         }
     }
     return HXR_OK;
@@ -6528,9 +6537,17 @@
     {
         pSD->m_bWouldBlocking = FALSE;
         m_ulWouldBlocking--;
-        if (m_ulWouldBlocking == 0 && m_bPktBufQProcessed)
+        if (m_ulWouldBlocking == 0)
         {
-            Play(TRUE);
+            if(m_bIsLive && m_bPktBufQProcessed == FALSE)
+            {
+                //Do nothing
+                return HXR_OK;
+            }
+            else
+            {
+                Play(TRUE);
+            }
         }
     }
     return HXR_OK;


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs


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

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