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

List:       helix-server-cvs
Subject:    [Server-cvs] engine/core _main.cpp,1.223,1.224
From:       tniu () helixcommunity ! org
Date:       2013-03-29 9:28:57
[Download RAW message or body]

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

Modified Files:
	_main.cpp 
Log Message:


Synopsis
========
This CR fix bug: (HLXSRV-148) RSS stats not showing live wmv feeds.
(http://jira.real.com/browse/HLXSRV-148)

Branch : HEAD 

Suggested Reviewer : Anyone

Description: 
===============
Look at rss stats, wmv reception not listed:
    Helix Live Reception: Feeds 0, 0.00 Kbps, Packets 0, Lost 0, Lost Upstream 0
    Helix Live Reception: Resends 0, Out of Order 0, Duplicate 0, Late 0
    RTP Live Reception: Feeds 0, 0.00 Kbps, Packets 0, Lost 0, Lost Upstream 0
    RTP Live Reception: Resends 0, Out of Order 0, Duplicate 0, Late 0
    TS Live Reception: Feeds 0, 0.00 Kbps, Packets 0, Lost 0, Lost Upstream 0
    TS Live Reception: Resends 0, Out of Order 0, Duplicate 0, Late 0
    RTMP Live Reception: Feeds 0, 0.00 Kbps, Packets 0

Actual:
live wmv reception not listed in rss log.

Expected:
live wmv reception listed in stats. 

Root cause:
There isn't code to deal with wmv feeds log in RSS stats in previous design.

My solution:
Add code to list wmv reception in rss log.

Files affected:
=========
server/common/util/pub/bcast_defs.h
server/engine/core/pub/server_info.h
server/engine/core/pub/_main.h
server/engine/core/server_info.cpp
server/engine/core/_main.cpp
server_rn/broadcast/transport/mms/recv/wmsrcobj.h
server_rn/broadcast/transport/mms/recv/wmsrcobj.cpp

Test perform
================
Integration Tests:
wmv reception is listed in rss log:
    WMV Live Reception: Feeds 2, 397.73 Kbps, Packets 2489, Lost 0, Lost Upstream 0
    WMV Live Reception: Resends 0, Out of Order 0, Duplicate 0, Late 0

Platforms Tested: win-x86_64-vc10.

Performance Tests: N/A.

Leak Tests: None.

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

Index: _main.cpp
===================================================================
RCS file: /cvsroot/server/engine/core/_main.cpp,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- _main.cpp	29 Mar 2013 08:45:40 -0000	1.223
+++ _main.cpp	29 Mar 2013 09:28:39 -0000	1.224
@@ -3013,6 +3013,7 @@
     memset(&m_LastBrcvStats, 0, sizeof(BrcvStatistics));
     memset(&m_LastRTMPLiveStats, 0, sizeof(BrcvStatistics));
     memset(&m_LastRTPLiveStats, 0, sizeof(BrcvStatistics));
+    memset(&m_LastWMVLiveStats, 0, sizeof(BrcvStatistics));
     memset(&m_LastBdstStats, 0, sizeof(BdstStatistics));
     memset(&m_LastTSLiveStats, 0, sizeof(BrcvStatistics));
     memset(m_LastMainLoops, 0, sizeof(UINT32) * (MAX_THREADS+1));
@@ -3511,6 +3512,55 @@
         pBufPointer += sprintf(pBufPointer, "    RTP Live Reception: Inactive\n");
     }
 
+    if (pServerInfo->m_pWMVLiveStats)
+    {
+        UINT64 uBytesRcvd;
+        UINT32 uPacketsRcvd;
+        UINT32 uOutOfOrder;
+        UINT32 uLost;
+        UINT32 uLate;
+        UINT32 uResendsRequested;
+        UINT32 uDuplicates;
+        UINT32 uLostUpstream;
+
+        BrcvStatistics* bs = pServerInfo->m_pWMVLiveStats;
+
+        uPacketsRcvd = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uPacketsRcvd), +                 \
bs->m_uPacketsRcvd); +        uBytesRcvd = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uBytesRcvd), +                   \
bs->m_uBytesRcvd); +        uLost = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uLost), +                        \
bs->m_uLost); +        uLate = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uLate), +                        \
bs->m_uLate); +        uLostUpstream = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uLostUpstream), +                \
bs->m_uLostUpstream); +        uResendsRequested = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uResendsRequested), +            \
bs->m_uResendsRequested); +        uOutOfOrder = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uOutOfOrder), +                  \
bs->m_uOutOfOrder); +        uDuplicates = \
ServerInfo::CounterDifference(&(m_LastWMVLiveStats.m_uDuplicates), +                  \
bs->m_uDuplicates); +
+        scale = uBytesRcvd * 8.0 / timediff / 1000.0;
+
+        pBufPointer += sprintf(pBufPointer, "    WMV Live Reception: Feeds %lu, \
%0.2f Kbps, Packets %lu, Lost %lu, Lost Upstream %lu\n", +            (unsigned \
long)bs->m_uReceiverSessions, +            scale,
+            (unsigned long)uPacketsRcvd,
+            (unsigned long)uLost,
+            (unsigned long)uLostUpstream);
+        pBufPointer += sprintf(pBufPointer, "    WMV Live Reception: Resends %lu, \
Out of Order %lu, Duplicate %lu, Late %lu\n", +            (unsigned \
long)uResendsRequested, +            (unsigned long)uOutOfOrder,
+            (unsigned long)uDuplicates,
+            (unsigned long)uLate);
+    }
+    else
+    {
+        pBufPointer += sprintf(pBufPointer, "    WMV Live Reception: Inactive\n");
+    }
+
     if (pServerInfo->m_pTSLiveStats)
     {
         UINT32 uBytesRcvd;


_______________________________________________
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