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

List:       helix-server-cvs
Subject:    [Server-cvs] protocol/transport/common/pub transport.h,1.13,1.14
From:       mingda () helixcommunity ! org
Date:       2013-02-28 11:32:58
[Download RAW message or body]

Update of /cvsroot/server/protocol/transport/common/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv14348

Modified Files:
	transport.h 
Log Message:
ommitted to: SERVER_15_0_RN, HEAD

Reviewed by: Xiaocheng

Verification Build: 


Synopsis: 
===============
RSS: In RSS log the % RTP and the % RDT didn't add up to 100%

Branch: HEAD

Reviewed by: Xiaocheng

Description: 
===============
The problem is:
1, In RSS log, the total of  % of RTP client and % of RDT clients should be 100% 2, \
when one single RTP player connected, the value m_pProc->pc->server_info->m_RTPCount \
will be increased by 2. 3, % MDP is the percentage for all connections, not only RTSP \
connection.

Analysis:
1, in _main.cpp, it uses the lTotalTrans as the total number of RTSP players, which \
is incorrect. 2, When connecting, assume there are 2 streams, the client will send 2 \
RTSP SETUP packets. So function RTSPTransportInstantiator::SetupTransportRTPUdp will \
be called twice. Each time, it creates a new transport and increase the RTP client \
count by 1. See code below:  
RTSPTransportInstantiator::SetupTransportRTPUdp()
{
	...........
	ServerRTPUDPTransport* pTransport = new \
                ServerRTPUDPTransport(!m_pBaseProt->m_bSetupRecord, bOldRTPTS);
  ..........
  pTransport->IncrProtocolCount();
	...........
}

My fix:
1, When calculating RTP/RDT client percentage, use the m_RTSPClientCount as the total \
number. 2, in RTSPTransportInstantiator::SetupTransportRTPUdp and \
RTSPTransportInstantiator::SetupTransportRTPTcp, check pSession->m_sSetupCount. If it \
is 1, the current stream is the first stream of the feed. Then increase the RTP \
client count by 1. 3, If a Transport didn't increase the RTP count, we must not \
decrease the RTP count in function Transport::DecrProtocolCount().  add a new bool \
variable "m_bProtInfoSet" to Transport. If it's true, then the IncrProtocolCount() \
has been called.   Transport::DecrProtocolCount() is also modified, only when \
m_bProtInfoSet is TRUE, it will actually decrease the RTP client count. 4, change the \
formula to calculate %MDP to lMDPPct     = 100 * m_pProc->pc->server_info->m_MDPCount \
/ m_pProc->pc->server_info->m_RTSPClientCount;

Files affected:
=========
server/engine/core/_main.cpp
server/protocol/transport/common/transport.cpp
server/protocol/transport/common/pub/transport.h
server/protocol/rtsp/transportparams.cpp


Testing Performed: 
===============
Integration Tests:
N/A

Performance Tests: 
N/A

QA Hints
========
None.



Index: transport.h
===================================================================
RCS file: /cvsroot/server/protocol/transport/common/pub/transport.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- transport.h	12 Jul 2011 23:08:40 -0000	1.13
+++ transport.h	28 Feb 2013 11:32:51 -0000	1.14
@@ -468,6 +468,9 @@
 #endif // RDT_MESSAGE_DEBUG
 
     CHXSimpleList                       m_StreamNumbers;
+
+    HXBOOL                              m_bProtInfoSet;
+
 };
 
 inline HXBOOL


_______________________________________________
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