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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/dataflow rsdpacketq.cpp,1.6,1.6.20.1
From:       rasher () helixcommunity ! org
Date:       2007-12-28 7:39:50
Message-ID: 200712280739.lBS7dwq8019296 () mailer ! progressive-comp ! com
[Download RAW message or body]

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

Modified Files:
      Tag: SERVER_12
	rsdpacketq.cpp 
Log Message:
Synopsis
  ==========

 Poor quality live stream with multiple SLTAs and FCS.

 Branches           :  HEAD , SERVER_12_RN
 Suggested Reviewer :  Jamie

   Description
   ============
      When we play a live stream with FCS we see quality of video
degrading after some time.The reason behing this is that the server
discards some packets and does not pass it on to its sink(the Shim).
   The reason is that LiveSourceWrapper has a data member CRSDPacketQueue
which contains a list and a PacketBufferQueue.When a GetPacket of the
LiveSource is called it calls the packet queue's GetPacket where
packets are taken from the list or PacketBufferQueue.If packets are
taken from buffer queue,m_ulSize is decremented even though a AddPacket
is not called.
So m_ulSize becomes less than 0 at some point of time and when AddPacket
is called the condition
 m_ulSize > m_ulMaxSize  ( -1 > 2000) is true as m_ulSize is UINT32.So some of
the packets are discarded and not added as this condition fails.

  Fix
 ==========
   Changed the data type of m_ulSize and m_ulMaxSize to INT32.Now the
condition evaluates to False and quality is maintained.


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

   server\engine\inputsource\live_source_wrapper.cpp
   server\engine\dataflow\pub\rsdpacketq.h

   Testing Performed
  =================
Functional-Testing:
    Checked that a live clip with slta and fcs url plays using 3 copies of
realvideo10.rm and quality does not degrade after a period of time.

 Leak-Tests:
    n/a

Build verified  :win32-i386-vc7,sunos-5.10-sparc-server
Platforms tested: win32-i386-vc7


 Thanks
 Raj  Asher




Index: rsdpacketq.cpp
===================================================================
RCS file: /cvsroot/server/engine/dataflow/rsdpacketq.cpp,v
retrieving revision 1.6
retrieving revision 1.6.20.1
diff -u -d -r1.6 -r1.6.20.1
--- rsdpacketq.cpp	21 Dec 2006 05:06:06 -0000	1.6
+++ rsdpacketq.cpp	28 Dec 2007 07:39:47 -0000	1.6.20.1
@@ -67,8 +67,8 @@
     m_bQueueDone = FALSE;
     m_pHeadPacket = NULL;
     m_packetList = new CHXSimpleList();
-    m_ulSize = ulSize;
-    m_ulMaxSize = ulSize*2;
+    m_lSize = ulSize;
+    m_lMaxSize = ulSize*2;
 }
 
 CRSDPacketQueue::~CRSDPacketQueue()
@@ -97,10 +97,10 @@
 
     //normally it is one packet out, and one packet in.  So the maxsize of double initial
     //queue size should be enough. 
-    if(pQueue->GetSize() > m_ulSize)
+    if(pQueue->GetSize() > m_lSize)
     {
-        m_ulSize = pQueue->GetSize();
-        m_ulMaxSize = m_ulSize*2;
+        m_lSize = pQueue->GetSize();
+        m_lMaxSize = m_lSize*2;
     }
     
     m_pPacketBufferQueue = pQueue;
@@ -110,7 +110,7 @@
 
 HX_RESULT CRSDPacketQueue::AddPacket(IHXPacket* pPacket)
 {
-    if(!pPacket || m_ulSize > m_ulMaxSize)
+    if(!pPacket || m_lSize > m_lMaxSize)
     {
         return HXR_FAIL;
     }
@@ -120,7 +120,7 @@
         m_pFirstPacket = pPacket;
     }
 
-    m_ulSize++;
+    m_lSize++;
     m_packetList->AddTail(pPacket);
     pPacket->AddRef();
     m_pTailPacketTS = pPacket->GetTime();
@@ -159,7 +159,7 @@
     {
         return HXR_FAIL;
     }
-    m_ulSize--;
+    m_lSize--;
 
     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