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

List:       helix-server-cvs
Subject:    [Server-cvs] common/util header_helper.cpp, 1.1, 1.2 make_lib, 1.4,
From:       jzeng () helixcommunity ! org
Date:       2008-12-24 19:17:08
Message-ID: 200812241918.mBOJIWg3015431 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/common/util
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv28433/server/common/util

Modified Files:
	make_lib 
Added Files:
	header_helper.cpp 
Log Message:
Synopsis
========
add lra splitting support to RBS splitting
Branches:  head, server_12_1 
Suggested Reviewer: Chytanya, Jamie 

Description
===========

1. add new files header_helper.h/cpp to server/common/util.  Implement
Is3gpMRLive(), which is used by bdstplin and server core(later).  I
also move the DumpHeader() form bcastmgr.cpp to here.  This is a
useful function that deserves its own place:->  We have multiple
implementation of it and I don't want to add another.

2. When the live feed is 3gp mr, bdstplin will not send it to legacy
receivers(indicated by config var for push, and version number for
pull).

3. Add a new packet type for RBS: rtp payload. The original rbs didn't
handle rtp time at all.  There is one timestamp field in the payload:
when the packet is rtp, it converts rtp time into delivery time and
send it.  This way we lost the delivery time.

With the new rtp payload, the transmitter will send rtp payload to new
receivers, but preserve the old behavior for legacy receivers. 

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

server/common/util/make_lib,v
server/engine/core/bcastmgr.cpp,v
server-restricted/broadcast/transport/bcng/recv/breceiver.cpp,v
server-restricted/broadcast/transport/bcng/recv/strmhand.cpp,v
server-restricted/broadcast/transport/bcng/recv/strmsess.cpp,v
server-restricted/broadcast/transport/bcng/recv/pub/strmsess.h,v
server-restricted/broadcast/transport/bcng/send-local/bdstplin.cpp,v
bdistplin/broadcast/transport/bcng/common/brdcst_sched.cpp,v
bdistplin/broadcast/transport/bcng/common/dests.cpp,v
bdistplin/broadcast/transport/bcng/common/distsend.cpp,v
bdistplin/broadcast/transport/bcng/common/nobuf_brdcst_sched.cpp,v
bdistplin/broadcast/transport/bcng/common/pullsplt.cpp,v
bdistplin/broadcast/transport/bcng/common/pub/bdstprot.h,v
bdistplin/broadcast/transport/bcng/common/pub/brdcst_sched.h,v
bdistplin/broadcast/transport/bcng/common/pub/dests.h,v
bdistplin/broadcast/transport/bcng/common/pub/distsend.h,v

File Added

serer/common/util/header_helper.cpp, pub/header_helper.h

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

Unit Tests:
None.

Integration Tests:

Verify the transmitter rejecting pull request from legacy receivers
for 3gp mr live, but accepting from new server.

Verify the transmitter doesn't push packets to receivers configed to
be legacy.

Verify the transmitter sends rtp payloads to the new receivers, and
regular payload to legacy receivers, for both pull and push splitting.

Leak Tests:
None.(will do it later).

Performance Tests:
- None

Platforms Tested: linux-rhel5-i686
Build verified: linux-rhel5-i686




Index: make_lib
===================================================================
RCS file: /cvsroot/server/common/util/make_lib,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- make_lib	19 Sep 2007 08:59:43 -0000	1.4
+++ make_lib	24 Dec 2008 19:17:06 -0000	1.5
@@ -87,6 +87,7 @@
 	, "livekeyframe.cpp"
 	, "servertbf.cpp"
 	, "urlparser.cpp"
+	, "header_helper.cpp"
 	)
 
 LibraryTarget('servutillib')

--- NEW FILE: header_helper.cpp ---
/* ***** BEGIN LICENSE BLOCK *****  
 * Source last modified: $Id: header_helper.cpp,v 1.2 2008/12/24 19:17:06 jzeng Exp $ 
 *   
 * Portions Copyright (c) 1995-2005 RealNetworks, Inc. All Rights Reserved.  
 *       
 * The contents of this file, and the files included with this file, 
 * are subject to the current version of the RealNetworks Public 
 * Source License (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the current version of the RealNetworks Community 
 * Source License (the "RCSL") available at 
 * http://www.helixcommunity.org/content/rcsl, in which case the RCSL 
 * will apply. You may also obtain the license terms directly from 
 * RealNetworks.  You may not use this file except in compliance with 
 * the RPSL or, if you have a valid RCSL with RealNetworks applicable 
 * to this file, the RCSL.  Please see the applicable RPSL or RCSL for 
 * the rights, obligations and limitations governing use of the 
 * contents of the file. 
 *   
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the 
 * portions it created. 
 *   
 * This file, and the files included with this file, is distributed 
 * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY 
 * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS 
 * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES 
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET 
 * ENJOYMENT OR NON-INFRINGEMENT. 
 *  
 * Technology Compatibility Kit Test Suite(s) Location:  
 *    http://www.helixcommunity.org/content/tck  
 *  
 * Contributor(s):  
 *   
 * ***** END LICENSE BLOCK ***** */

#include "ihxpckts.h"
#include "hxassert.h"
#include "hxstrutl.h"
#include "header_helper.h"

BOOL Is3gpMRLive(IHXValues* pFileHeader)
{
    UINT32 ulStreamGroupCount = 0;
    UINT32 ulStreamCount = 0;
    if(FAILED(pFileHeader->GetPropertyULONG32("StreamGroupCount", ulStreamGroupCount)))
    {
        return FALSE;
    }

    if(FAILED(pFileHeader->GetPropertyULONG32("StreamCount", ulStreamCount)))
    {
        return FALSE;
    }

    return ulStreamCount > ulStreamGroupCount;
}

void DumpHeader(IHXValues* pHeader)
{
    IHXBuffer* pRuleBook = NULL;
    IHXBuffer* pSDPData = NULL;
    HX_RESULT res;

    IHXBuffer* pVal;
    UINT32 ulVal;
    const char* pName;

    res = pHeader->GetFirstPropertyULONG32(pName, ulVal);
    while(SUCCEEDED(res))
    {
        printf("%s: %u\n", pName, ulVal);
        res = pHeader->GetNextPropertyULONG32(pName, ulVal);
    }

    res = pHeader->GetFirstPropertyBuffer(pName, pVal);
    while(SUCCEEDED(res))
    {
        printf("%s: %s\n", pName, pVal->GetBuffer());
        pVal->Release();
        res = pHeader->GetNextPropertyBuffer(pName, pVal);
    }

    res = pHeader->GetFirstPropertyCString(pName, pVal);
    while(SUCCEEDED(res))
    {
        if (strcasecmp(pName, "ASMRuleBook") == 0)
        {
            pRuleBook = pVal;
        }
        else if (strcasecmp(pName, "SDPData") == 0)
        {
            pSDPData = pVal;
        }
        else
        {
            printf("%s: %s\n", pName, pVal->GetBuffer());
            pVal->Release();
        }
        res = pHeader->GetNextPropertyCString(pName, pVal);
    }
    
    if (pSDPData)
    {
        UINT32 ulLen = pSDPData->GetSize();
        char* szSDPData = new char[ulLen];
        strncpy(szSDPData, (const char*)pSDPData->GetBuffer(), ulLen);
        szSDPData[ulLen-1] = '\0';
        
        printf("\nSDPData:\n");
        char* szLine = strtok(szSDPData, "\r\n");
        while(szLine)
        {
            printf("%s\n", szLine);
            szLine = strtok(NULL, "\r\n");
        }
        delete[] szSDPData;
        pSDPData->Release();
    }

    if (pRuleBook)
    {
        BYTE* pc = new BYTE[pRuleBook->GetSize() + 1];
        memcpy(pc, pRuleBook->GetBuffer(), pRuleBook->GetSize());
        pc[pRuleBook->GetSize()] = '\0';
        BYTE* pcStart = pc;
        
        for (pc = (BYTE*)strchr((const char*)pc, '#'); pc; pc = (BYTE*)strchr((const char*)pc, '#'))
        {
	    *pc = '\n';	
        }

        printf("\nASMRuleBook:%s\n", pcStart);
        delete[] pcStart;
        pRuleBook->Release();
    }

    printf("\n");
    fflush(0);
}






_______________________________________________
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