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

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/rtsp rtspserv.cpp,1.311,1.312
From:       dsingh () helixcommunity ! org
Date:       2008-01-31 9:10:45
Message-ID: 200801310910.m0V9Aquv028532 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/protocol/rtsp
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv29434

Modified Files:
	rtspserv.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: rtspserv.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/rtspserv.cpp,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -d -r1.311 -r1.312
--- rtspserv.cpp	20 Nov 2007 03:56:36 -0000	1.311
+++ rtspserv.cpp	31 Jan 2008 09:10:42 -0000	1.312
@@ -267,37 +267,7 @@
            when one packet is queued, and await
            a write event to continue:
          */
-        if ((m_pWriteNotifyMap) && !(m_pWriteNotifyMap->IsEmpty()))
-        {
-            HXBOOL bBlocked = FALSE;
-            CHXMapPtrToPtr::Iterator iter = \
                m_pWriteNotifyMap->Find(m_pWriteNotifyLastKey);
-            if (m_pWriteNotifyLastKey == NULL || iter == m_pWriteNotifyMap->End())
-            {
-                iter = m_pWriteNotifyMap->Begin();
-            }
-            m_pWriteNotifyLastKey = reinterpret_cast<IUnknown*>(iter.get_key());
-            do
-            {
-                IUnknown* punkItem = reinterpret_cast<IUnknown*>(*iter);
-                HX_ASSERT(punkItem != NULL);
-                IHXSocketResponse* pResp = NULL;
-                punkItem->QueryInterface(IID_IHXSocketResponse,
-                    (void**)&pResp);
-                HX_ASSERT(pResp);
-
-                bBlocked = (pResp->EventPending(uEvent, status) ==
-                    HXR_BLOCKED);
-                pResp->Release();
-
-                if (++iter == m_pWriteNotifyMap->End())
-                {
-                    iter = m_pWriteNotifyMap->Begin();
-                }
-            }
-            while (!(bBlocked || (iter.get_key() == m_pWriteNotifyLastKey)));
-
-            m_pWriteNotifyLastKey = reinterpret_cast<IUnknown*>(iter.get_key());
-        }
+        NotifyWriteEvent();
         break;
     default:
         HX_ASSERT(FALSE);


_______________________________________________
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