[Protocol-dev] FW: CR: Moving Global Config Variables into User Agent Settings

[Protocol-dev] FW: CR: Moving Global Config Variables into User Agent Settings

Nitin Patil npatil at real.com
Fri Aug 17 03:23:38 PDT 2007


Updated as suggested except the following -

> > +    hresult = m_pContext->QueryInterface(IID_IHXRegistry,
> (void**)&pRegistry);
> >      HX_VERIFY(HXR_OK == hresult);
> > -    if (hresult == HXR_OK)
> > +
> > +    if(pSignalBus)
> > +    {
> > +        HX_VERIFY(SUCCEEDED(pSignalBus-
> >QueryInterface(IID_IHXQoSProfileConfigurator,
> > +
> (void**)&pProfileConfigurator)));
> 
> Can't you just QI the context for an IHXQoSProfileConfigurator? You did
> it easily enough in the SDP plugin...

To QI the context for an IHXQoSProfileConfigurator we need UserAgent name in
some variable. Once we have this we call SelectProfile() on
IHXQoSProfileSelector and then user the same. However, when we use
SingnalBus we already get the handle to the current selected profile. 

Here in this file I do not directly have UserAgent there and has pointer of
SignalBus hence used that.

Please find updated diff attached.

Copied protocol-dev for reviewing the code in protocol/sdp.


Files Affected:
==============
protocol/sdp/pub/sdpmdgen.h
protocol/sdp/sdpmdgen.cpp
protocol/sdp/sdpplin.cpp
server-restricted/installer/proxy/proxyinst.cpp
server-restricted/installer/server/retailservinst.cpp
server-restricted/qos/session/pub/qos_sess_pktqueue.h
server-restricted/qos/session/qos_sess_pktqueue.cpp
server/protocol/rtsp/pub/transportparams.h
server/protocol/rtsp/transportparams.cpp
server/protocol/rtsp/rtspserv.cpp
server/qos/core/pub/qos_cfg_names.h

Thanks,
Nitin.


> -----Original Message-----
> From: Darrick Lew [mailto:dlew at real.com]
> Sent: Thursday, August 16, 2007 11:10 PM
> To: Nitin Patil
> Cc: 'Server Dev'
> Subject: Re: CR: Moving Global Config Variables into User Agent Settings
> 
> The SDP plugin portion of this CR also needs to go out to the
> HelixCommunity protocol-dev list.
> 
> Other comments inline.
> 
> Nitin Patil wrote:
> > Synopsis
> > ========
> > Moving Global Config Variables into User Agent Settings
> >
> > Quick link:
> >
> <http://systems.dev.prognet.com/Products/Server/Projects/marion/features/R
> at
> > eAdaptation/SODs/proxysdpissues/view> None
> >
> > Branch: SERVER_CURRENT_RN
> > Suggested Reviewer: Timothy
> >
> > Description
> > ===========
> >
> > Presently these settings reside in the global configuration. They shall
> be
> > moved into the User-Agent Settings as follows:
> >
> > Variable Name
> > New Name
> >
> > config.3GPPStreamAdaptation.NADUReportFreq
> > X.*.ClientCapabilities.NADUReportFrequency
> >
> > config.Protocols.RTSP.PreferClientTCP
> > X.*.PreferClientTCP
> >
> > config.MediaDelivery.EnableHelixRateAdaptation
> > X.*.RateAdaptation.ClientAdaptation.EnableHelixRateAdaptation
> >
> > This is complicated by the fact that presently the SDP plugin and RTSP
> > server protocol do not have access to the QoS profile configurator. When
> > Heramb completes the User Agent Settings split out work, it shall be
> > possible to instantiate QoS profile configurator from the context. This
> work
> > section is blocked until that is possible.
> > Integration Tests:
> >
> > 1.	Confirmed that the values are captured properly from the new
> > location (UAS).
> > 2.	Confirmed that the media is streaming without any error after the
> > changes.
> > ------------------------------------------------------------------------
> >
> > Index: protocol/sdp/pub/sdpmdgen.h
> > ===================================================================
> > RCS file: /cvsroot/protocol/sdp/pub/sdpmdgen.h,v
> > retrieving revision 1.19
> > diff -u -w -r1.19 sdpmdgen.h
> > --- protocol/sdp/pub/sdpmdgen.h	7 Aug 2007 21:07:26 -0000	1.19
> > +++ protocol/sdp/pub/sdpmdgen.h	16 Aug 2007 12:41:09 -0000
> > @@ -100,13 +100,13 @@
> >      HXBOOL m_bUseSessionGUID;
> >      HXBOOL m_bUseAbsoluteURL;
> >
> > -    static UINT32   g_ul3GPPNADUReportFreq;
> > -    static HXBOOL   g_bGot3GPPNADUReportFreq;
> > +    UINT32                      m_ul3GPPNADUReportFreq;
> > +    HXBOOL                      m_bGot3GPPNADUReportFreq;
> 
> You shouldn't store these as members. They should probably be locals in
> Generate() since the user agent will change each time Generate() is
> called. This is a non-multiload plugin. The same instance is shared
> across all sessions.
> 
> >      static const char*      g_pHelixClients[];
> >
> > -    static HXBOOL     g_bHelixRateAdaptationConfigured;
> 
> > -    static HXBOOL     g_bHelixRateAdaptationLicensed;
> > -    static HXBOOL     g_bCheckedHelixRateAdaptationLicense;
> 
> You can leave g_bHelixRateAdaptationLicensed and
> g_bCheckedHelixRateAdaptationLicense alone. These are still global and
> checked from the registry and therefore should only be done the one time.
> 
> > +    HXBOOL                      m_bHelixRateAdaptationConfigured;
> 
> The user-agent will change each time Generate() is called, so there is
> no point in storing this flag as a member. You'll have to retrieve this
> value each time Generate() is called anyway.
> 
> >      struct SDPDataLine { const char* pName; UINT32 ulLen;};
> >      static const SDPDataLine g_pSDPDataPullTable[];
> >
> >
> >
> >
> > Index: protocol/sdp/sdplib
> > ===================================================================
> > RCS file: /cvsroot/protocol/sdp/sdplib,v
> > retrieving revision 1.10
> > diff -u -w -r1.10 sdplib
> > --- protocol/sdp/sdplib	6 Jul 2007 20:51:37 -0000	1.10
> > +++ protocol/sdp/sdplib	16 Aug 2007 12:41:09 -0000
> > @@ -57,10 +57,13 @@
> >  			    "common/dbgtool/pub",
> >  			    "common/util/pub",
> >  			    "common/system/pub",
> > -			    "common/log/logutil/pub")
> > +			    "common/log/logutil/pub",
> > +			    "server/qos/core/pub"
> 
> I imagine that other teams will be hesitant to add server-only modules
> to otherwise common code.
> 
> > +				)
> >
> >  project.AddIncludes(	"../common/util/pub",
> > -			"../transport/rtp/include")
> > +						"../transport/rtp/include"
> > +				)
> >
> >  project.AddSources(	"sdpprop.cpp",
> >  			"sdpchunk.cpp",
> >
> >
> >
> >
> >  SDPMediaDescGenerator::SDPMediaDescGenerator(ULONG32 ulVersion) :
> > -    m_pContext(0),
> > -    m_pCCF(0),
> > -    m_pRegistry(0),
> > +    m_pContext(NULL),
> > +    m_pCCF(NULL),
> > +    m_pRegistry(NULL),
> >      m_ulVersion(ulVersion),
> >      m_bUseOldEOL(FALSE),
> >      m_bUseSessionGUID(FALSE),
> > -    m_bUseAbsoluteURL(FALSE)
> > -{}
> > +    m_bUseAbsoluteURL(FALSE),
> > +    m_bHelixRateAdaptationConfigured(TRUE),
> > +    m_ul3GPPNADUReportFreq(1),
> > +    m_bGot3GPPNADUReportFreq(FALSE),
> > +    m_bHelixRateAdaptationLicensed(FALSE),
> > +    m_bCheckedHelixRateAdaptationLicense(FALSE)
> > +{
> > +}
> >
> >  SDPMediaDescGenerator::~SDPMediaDescGenerator()
> >  {
> > @@ -140,8 +139,6 @@
> >      HX_RELEASE(m_pContext);
> >      HX_RELEASE(m_pCCF);
> >
> > -    if (pContext)
> > -    {
> 
> Why remove this check? Was it hurting anything?
> 
> >          res = pContext->QueryInterface(IID_IHXCommonClassFactory,
> >                                         (void**)&m_pCCF);
> >          if (SUCCEEDED(res) && m_pCCF)
> > @@ -152,21 +149,6 @@
> >              res = pContext->QueryInterface(IID_IHXRegistry,
> >                  (void**)&m_pRegistry);
> >          }
> > -        if (!g_bGot3GPPNADUReportFreq && SUCCEEDED(res))
> > -        {
> > -            // Look up and store the 3GPP Adaptation Report Frequency
> > -            // in the config if we haven't yet
> > -            INT32 lFrequency;
> > -            if (SUCCEEDED(m_pRegistry-
> >GetIntByName(NADU_REPORT_FREQUENCY_CFG,
> > -                lFrequency)))
> > -            {
> > -                g_ul3GPPNADUReportFreq = (UINT32)lFrequency;
> > -            }
> > -
> > -            g_bGot3GPPNADUReportFreq = TRUE;
> > -        }
> > -    }
> > -
> >      return res;
> >  }
> >
> > @@ -200,48 +182,6 @@
> >          pszEOL[2] = '\0';
> >      }
> >
> > -    // Check for Helix Rate Adaptation license if
> > -    // we haven't already
> > -    if (!g_bCheckedHelixRateAdaptationLicense && m_pRegistry)
> > -    {
> > -        // Check if license file includes key for Helix
> > -        // Rate Adaptation
> > -        INT32 lHRAEnabled;
> > -        if (SUCCEEDED(m_pRegistry->GetIntByName(REGISTRY_HRA_ENABLED,
> > -            lHRAEnabled)))
> > -        {
> > -            g_bHelixRateAdaptationLicensed = lHRAEnabled;
> > -        }
> > -        else
> > -        {
> > -            g_bHelixRateAdaptationLicensed = LICENSE_HRA_ENABLED;
> > -        }
> > -
> > -        g_bCheckedHelixRateAdaptationLicense = TRUE;
> > -    }
> 
> You should still do this license check here. It only needs to happen once.
> 
> > -    // Check for global Helix Rate Adaptation configuration. If it's
> present, it may
> > -    // affect whether or not HRA is used to init MDP.
> > -    INT32 lHRAConfigured = 0;
> > -    if (m_pRegistry)
> > -    {
> > -        if (SUCCEEDED(m_pRegistry->GetIntByName(REGISTRY_GL_HRA_CFG,
> > -                        lHRAConfigured)))
> > -        {
> > -            g_bHelixRateAdaptationConfigured = lHRAConfigured;
> > -        }
> > -
> > -        INT32 lTCPPref = 0;
> > -        if (SUCCEEDED(m_pRegistry->GetIntByName(REG_RTSP_PREF_TCP,
> lTCPPref))
> > -                && lTCPPref)
> > -        {
> > -            // If PreferClientTCP is set, we will assume TCP unless
> > -            // otherwise specified in the optional header
> > -            // (from UA config)
> > -            bTCP = TRUE;
> > -        }
> > -    }
> > -
> >      // get local host address from registry
> >
> >      /*  XXX
> > @@ -387,6 +327,76 @@
> >          }
> >      }
> >
> > +    if (m_pContext)
> > +    {
> > +        IHXQoSProfileSelector* pProfileSelector = NULL;
> > +        IHXUserAgentSettings* pUAS = NULL;
> > +        QoSProfileConfigurator* pProfileConfigurator = NULL;
> 
> I'm assuming you want this to be an IHXQoSProfileConfigurator object,
> right?
> 
> > +        m_pContext->QueryInterface(IID_IHXQoSProfileSelector,
> (void**)&pProfileSelector);
> > +        m_pContext->QueryInterface(IID_IHXQoSProfileConfigurator,
> (void**)&pProfileConfigurator);
> > +
> > +        if(pProfileSelector && pProfileConfigurator)
> > +        {
> > +            pProfileSelector->SelectProfile(pUserAgent, NULL, NULL,
> pUAS);
> > +            HX_RELEASE(pProfileSelector);
> > +
> > +            pProfileConfigurator->SetUserAgentSettings(pUAS);
> > +
> > +            INT32 lTemp;
> > +            if(SUCCEEDED(pProfileConfigurator-
> >GetConfigInt(NADU_REPORT_FREQUENCY_CFG, lTemp)))
> > +            {
> > +                m_ul3GPPNADUReportFreq = (BOOL)lTemp;
> > +            }
> > +            else
> > +            {
> > +                m_ul3GPPNADUReportFreq = 1;  //Set the default value
> > +            }
> > +
> > +            m_bGot3GPPNADUReportFreq = TRUE;
> > +
> > +            // Check for global Helix Rate Adaptation configuration. If
> it's present, it may
> > +            // affect whether or not HRA is used to init MDP.
> > +            if (SUCCEEDED(pProfileConfigurator-
> >GetConfigInt(REGISTRY_GL_HRA_CFG, lTemp)))
> > +            {
> > +                m_bHelixRateAdaptationConfigured = lTemp;
> > +            }
> > +            else
> > +            {
> > +                m_bHelixRateAdaptationConfigured = TRUE;    //Set the
> default value
> > +            }
> > +
> > +            if (SUCCEEDED(pProfileConfigurator-
> >GetConfigInt(REG_RTSP_PREF_TCP, lTemp)) && lTemp)
> > +            {
> > +                // If PreferClientTCP is set, we will assume TCP unless
> > +                // otherwise specified in the optional header
> > +                // (from UA config)
> > +                bTCP = TRUE;
> > +            }
> > +        }
> > +        HX_RELEASE(pUAS);
> > +        HX_RELEASE(pProfileConfigurator);
> > +    }
> > +
> > +    // Check for Helix Rate Adaptation license if
> > +    // we haven't already
> > +    if (!m_bCheckedHelixRateAdaptationLicense && m_pRegistry)
> > +    {
> > +        // Check if license file includes key for Helix
> > +        // Rate Adaptation
> > +        INT32 lHRAEnabled;
> > +        if (SUCCEEDED(m_pRegistry->GetIntByName(REGISTRY_HRA_ENABLED,
> lHRAEnabled)))
> > +        {
> > +            m_bHelixRateAdaptationLicensed = lHRAEnabled;
> > +        }
> > +        else
> > +        {
> > +            m_bHelixRateAdaptationLicensed = LICENSE_HRA_ENABLED;
> > +        }
> > +
> > +        m_bCheckedHelixRateAdaptationLicense = TRUE;
> > +    }
> 
> Again, this behavior did not need to change-- it was fine where it was.
> > +
> >      const char* szHostname = NULL;
> >      if (pHostname)
> >      {
> > @@ -1807,17 +1817,17 @@
> >
> >              // a=3GPP-Adaptation-Support
> >              // Do not offer 3GPP-Adaptation-Support for Real Datatypes
> > -            if (!bIsLive && !bIsRealDatatype && g_ul3GPPNADUReportFreq
> && bDefault)
> > +            if (!bIsLive && !bIsRealDatatype && m_ul3GPPNADUReportFreq
> && bDefault)
> >              {
> >                  SafeSprintf(psz256, 256, "a=3GPP-Adaptation-
> Support:%u%s",
> > -                    g_ul3GPPNADUReportFreq, pszEOL);
> > +                    m_ul3GPPNADUReportFreq, pszEOL);
> >                  mDesc += psz256;
> >              }
> >
> >              // a=Helix-Adaptation-Support
> >              // always signal
> > -            if (!bIsLive && bDefault && g_bHelixRateAdaptationLicensed
> > -                && g_bHelixRateAdaptationConfigured)
> > +            if (!bIsLive && bDefault && m_bHelixRateAdaptationLicensed
> > +                && m_bHelixRateAdaptationConfigured)
> >              {
> >                  SafeSprintf(psz256, 256, "a=Helix-Adaptation-
> Support:1%s",
> >                      pszEOL);
> >
> >
> >
> >
> > Index: protocol/sdp/sdpplin
> > ===================================================================
> > RCS file: /cvsroot/protocol/sdp/sdpplin,v
> > retrieving revision 1.12
> > diff -u -w -r1.12 sdpplin
> > --- protocol/sdp/sdpplin	6 Jul 2007 20:51:37 -0000	1.12
> > +++ protocol/sdp/sdpplin	16 Aug 2007 12:41:10 -0000
> > @@ -55,7 +55,9 @@
> >                            "common/container/pub",
> >                            "common/dbgtool/pub",
> >                            "common/system/pub",
> > -			  "common/log/logutil/pub")
> > +
"common/log/logutil/pub",
> > +
"server/qos/core/pub"
> > +						)
> >
> >  project.AddModuleLibraries("protocol/sdp[sdplib]",
> >                             "protocol/common/util[protutillib]",
> > @@ -64,7 +66,9 @@
> >                             "common/dbgtool[debuglib]",
> >                             "common/container[contlib]",
> >                             "common/runtime[runtlib]",
> > -			   "common/log/logutil[logutillib]")
> > +
> 	"common/log/logutil[logutillib]",
> > +
"server/qos/core[servqoscore]"
> 
> I'm betting the client folks will freak if they see a server model here.
> If you're only adding it for #defines it may be time to move these
> #defines.
> 
> > +						)
> >
> >  project.AddSources('sdpplin.cpp')
> >
> >
> >
> >
> > Index: protocol/sdp/sdpplin.cpp
> > ===================================================================
> > RCS file: /cvsroot/protocol/sdp/sdpplin.cpp,v
> > retrieving revision 1.20
> > diff -u -w -r1.20 sdpplin.cpp
> > --- protocol/sdp/sdpplin.cpp	6 Jul 2007 20:51:37 -0000	1.20
> > +++ protocol/sdp/sdpplin.cpp	16 Aug 2007 12:41:10 -0000
> > @@ -82,6 +82,7 @@
> >  #include "ihxtlogsystem.h"
> >  #include "ihxtlogsystemcontext.h"
> >  #include "hxdllaccess.h"
> > +#include "hxqos.h"
> >  #undef INITGUID
> >
> >  #include "hxver.h"
> >
> >
> >
> >
> > Index: server-restricted/installer/proxy/proxyinst.cpp
> > ===================================================================
> > RCS file: /cvsroot/proxy-restricted/installer/proxy/proxyinst.cpp,v
> > retrieving revision 1.7
> > diff -u -w -r1.7 proxyinst.cpp
> > --- server-restricted/installer/proxy/proxyinst.cpp	2 Jul 2007 08:44:55
> -0000	1.7
> > +++ server-restricted/installer/proxy/proxyinst.cpp	16 Aug 2007 12:41:18
> -0000
> > @@ -538,11 +538,6 @@
> >      p += sprintf(p, "</List>\n");
> >      p += sprintf(p, "\n");
> >
> > -    p += sprintf(p, "<List Name=\"3GPPStreamAdaptation\">\n");
> > -    p += sprintf(p, "    <Var NADUReportFreq=\"1\"/>\n");
> > -    p += sprintf(p, "</List>\n");
> > -    p += sprintf(p, "\n");
> > -
> >  #ifndef MOBILE
> >      p += sprintf(p, "<!-- M E D I A  D E L I V E R Y  P I P E L I N E -
> ->\n");
> >      p += sprintf(p, "<List Name=\"MediaDelivery\">\n");
> > @@ -589,6 +584,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -617,6 +615,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -645,6 +646,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -673,6 +677,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -705,6 +712,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"A830\">\n");
> > @@ -732,6 +742,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"A835\">\n");
> > @@ -759,6 +772,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"P900-Z100\">\n");
> > @@ -786,54 +802,12 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "     </List>\n");
> >      p += sprintf(p, "</List>\n");
> > -    p += sprintf(p, "\n");
> > -
> > -    p += sprintf(p, "<!-- C A P A B I L I T Y  E X C H A N G E -->\n");
> > -    p += sprintf(p, "<List Name=\"CapabilityExchange\">\n");
> > -    p += sprintf(p, "    <Var ProfileCacheSize=\"100\"/>\n");
> > -    p += sprintf(p, "    <List Name=\"DefaultProfiles\">\n");
> > -    p += sprintf(p, "        <List Name=\"Client1\">\n");
> > -    p += sprintf(p, "            <Var
> UserAgent=\"RealOnePlayer\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client2\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia
> Player/3\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client3\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia
> Player/s\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client4\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player
> (epoc_\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client5\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"PVPlayer\"/> \n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/PVPlayer.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client6\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"MOT-A820/00.00.00
> MIB/2.1 "
> > -                    "Profile/MIDP-1.0 Configuration/CLDC-1.0
> UP.Link/5.1.1.1a\"/>\n");
> > -    p += sprintf(p, "           <Var
> URI=\"file://profiles/Motorola.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client7\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"Motorola\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/Motorola.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client8\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia
> Player/mc\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Default\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"Default\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/default.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "    </List>\n");
> >      p += sprintf(p, "</List>\n");
> >      p += sprintf(p, "\n");
> >  #endif
> >
> >
> >
> > Index: server-restricted/installer/server/retailservinst.cpp
> > ===================================================================
> > RCS file: /cvsroot/server-
> restricted/installer/server/retailservinst.cpp,v
> > retrieving revision 1.8
> > diff -u -w -r1.8 retailservinst.cpp
> > --- server-restricted/installer/server/retailservinst.cpp	9 Jul 2007
> 06:22:26 -0000	1.8
> > +++ server-restricted/installer/server/retailservinst.cpp	16 Aug 2007
> 12:41:27 -0000
> > @@ -863,11 +863,6 @@
> >      p += sprintf(p, "</List>\n");
> >      p += sprintf(p, "\n");
> >
> > -    p += sprintf(p, "<List Name=\"3GPPStreamAdaptation\">\n");
> > -    p += sprintf(p, "    <Var NADUReportFreq=\"1\"/>\n");
> > -    p += sprintf(p, "</List>\n");
> > -    p += sprintf(p, "\n");
> > -
> >  #ifndef MOBILE
> >      p += sprintf(p, "<!-- M E D I A  D E L I V E R Y  P I P E L I N E -
> ->\n");
> >      p += sprintf(p, "<List Name=\"MediaDelivery\">\n");
> > @@ -903,6 +898,9 @@
> >      p += sprintf(p, "               <List Name=\"RateAdaptation\">\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "-->\n");
> > @@ -929,6 +927,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -957,6 +958,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -985,6 +989,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -1013,6 +1020,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"75%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "               <List Name=\"InputSource\">\n");
> >      p += sprintf(p, "                    <List
> Name=\"StaticPushSource\">\n");
> > @@ -1045,6 +1055,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"A830\">\n");
> > @@ -1072,6 +1085,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"A835\">\n");
> > @@ -1099,6 +1115,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"P900-Z100\">\n");
> > @@ -1126,6 +1145,9 @@
> >      p += sprintf(p, "                    <Var
> ResendTimeLimit=\"1000\"/>\n");
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"50%%\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> > +    p += sprintf(p, "                    </List>\n");
> >      p += sprintf(p, "               </List>\n");
> >      p += sprintf(p, "          </List>\n");
> >      p += sprintf(p, "          <List Name=\"Z105\">\n");
> > @@ -1157,57 +1179,11 @@
> >      p += sprintf(p, "                    <Var
> BufferModel=\"ANNEXG\"/>\n");
> >      p += sprintf(p, "                    <Var
> DownshiftDepth=\"20%%\"/>\n");
> >      p += sprintf(p, "                    <Var
> UpshiftDepth=\"120%%\"/>\n");
> > -#endif
> > -    p += sprintf(p, "               </List>\n");
> > -    p += sprintf(p, "          </List>\n");
> > -    p += sprintf(p, "     </List>\n");
> > -    p += sprintf(p, "</List>\n");
> > -    p += sprintf(p, "\n");
> > -
> > -    p += sprintf(p, "<!-- C A P A B I L I T Y  E X C H A N G E -->\n");
> > -    p += sprintf(p, "<List Name=\"CapabilityExchange\">\n");
> > -    p += sprintf(p, "    <Var ProfileCacheSize=\"100\"/>\n");
> > -    p += sprintf(p, "    <List Name=\"DefaultProfiles\">\n");
> > -    p += sprintf(p, "        <List Name=\"Client1\">\n");
> > -    p += sprintf(p, "            <Var
> UserAgent=\"RealOnePlayer\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client2\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia
> Player/3\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client3\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia
> Player/s\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client4\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player
> (epoc_\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > +    p += sprintf(p, "                    <List
> Name=\"ClientAdaptation\">\n");
> > +    p += sprintf(p, "                        <Var
> EnableHelixRateAdaptation=\"1\"/>\n");
> >      p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client5\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"PVPlayer\"/> \n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/PVPlayer.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client6\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"MOT-A820/00.00.00
> MIB/2.1 "
> > -                    "Profile/MIDP-1.0 Configuration/CLDC-1.0
> UP.Link/5.1.1.1a\"/>\n");
> > -    p += sprintf(p, "           <Var
> URI=\"file://profiles/Motorola.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client7\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"Motorola\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/Motorola.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client8\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"PVPlayer 3.4\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/PVZ105.rdf\"/>\n");
> > -    p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Client9\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"RealMedia
> Player/mc\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
> > +#endif
> >      p += sprintf(p, "        </List>\n");
> > -    p += sprintf(p, "        <List Name=\"Default\">\n");
> > -    p += sprintf(p, "            <Var UserAgent=\"Default\"/>\n");
> > -    p += sprintf(p, "            <Var
> URI=\"file://profiles/default.rdf\"/>\n");
> >      p += sprintf(p, "        </List>\n");
> >      p += sprintf(p, "    </List>\n");
> >      p += sprintf(p, "</List>\n");
> >
> >
> >
> > Index: server-restricted/qos/session/pub/qos_sess_pktqueue.h
> > ===================================================================
> > RCS file: /cvsroot/server-
> restricted/qos/session/pub/qos_sess_pktqueue.h,v
> > retrieving revision 1.4
> > diff -u -w -r1.4 qos_sess_pktqueue.h
> > --- server-restricted/qos/session/pub/qos_sess_pktqueue.h	22 Jun 2007
> 20:37:42 -0000	1.4
> > +++ server-restricted/qos/session/pub/qos_sess_pktqueue.h	16 Aug 2007
> 12:41:27 -0000
> > @@ -328,6 +328,7 @@
> >      ULONG32       m_ulLastTimeline;
> >      Process*      m_pProc;
> >
> > +    IHXQoSProfileConfigurator* m_pQoSConfig;
> >      StreamAdaptationSchemeEnum m_enumStreamAdaptScheme;
> >      StreamAdaptationParams*    m_pStreamAdaptParams;
> >
> >
> >
> >
> > Index: server-restricted/qos/session/qos_sess_pktqueue.cpp
> > ===================================================================
> > RCS file: /cvsroot/server-restricted/qos/session/qos_sess_pktqueue.cpp,v
> > retrieving revision 1.6
> > diff -u -w -r1.6 qos_sess_pktqueue.cpp
> > --- server-restricted/qos/session/qos_sess_pktqueue.cpp	6 Jul 2007
> 00:05:31 -0000	1.6
> > +++ server-restricted/qos/session/qos_sess_pktqueue.cpp	16 Aug 2007
> 12:41:28 -0000
> > @@ -36,6 +36,8 @@
> >
> >  #define DEFAULT_STREAM_SWITCH_DELAY 1000
> >
> > +#define NADU_REPORT_FREQUENCY_CFG
> "ClientCapabilities.NADUReportFrequency"
> > +
> >  CClientBuffer::CClientBuffer() : HXList(),
> >      m_bOutOfOrderSN(FALSE),
> >      m_pBuffHead(head)
> > @@ -342,6 +344,7 @@
> >                  , m_nLastSentSN(-1)
> >                  , m_ulLoss(0)
> >                  , m_bReportedNSNIncrease(FALSE)
> > +                , m_pQoSConfig(NULL)
> >  {
> >  #ifdef _UNITTEST
> >      m_ulRTT = 0;
> > @@ -386,6 +389,8 @@
> >          if (pQoSConfig)
> >          {
> >              pQoSConfig->GetConfigInt(QOS_CFG_CC_NADU_ENABLE,
> (INT32&)lUseNADU);
> > +            m_pQoSConfig = pQoSConfig;
> > +            m_pQoSConfig->AddRef();
> >          }
> >          if (lUseNADU)
> >          {
> > @@ -418,6 +423,8 @@
> >          m_pNADUTimeout->RemoveCallback();
> >          m_pNADUTimeout->Release();
> >      }
> > +
> > +    HX_RELEASE(m_pQoSConfig);
> >  }
> >
> >  HX_RESULT
> > @@ -1998,18 +2005,11 @@
> >  #ifndef _UNITTEST
> >      HX_ASSERT(pProc && pQueue);
> >
> > -    IHXRegistry* pReg = NULL;
> > -
> > -    // Look for 3GPPStreamAdaptation.NADUReportFreq in the registry
> > +    // Look for NADUReportFrequency in the UAS
> >      // Use timeout of NADU freq. * 3 seconds
> > -    // If not present, keep the default of 3 sec.
> > -    if (SUCCEEDED(m_pProc->pc->server_context-
> >QueryInterface(IID_IHXRegistry,
> > -        (void**)&pReg)))
> > -    {
> > +    // If not present, keep the default of 3 sec. (Note: default value
> of NADUReportFrequency = 1)
> >          INT32 lNADUFrequency = 0;
> > -
> > -        if (SUCCEEDED(pReg-
> >GetIntByName("config.3GPPStreamAdaptation.NADUReportFreq",
> > -            lNADUFrequency)) && lNADUFrequency > 0)
> > +    if(SUCCEEDED(pQueue->m_pQoSConfig-
> >GetConfigInt(NADU_REPORT_FREQUENCY_CFG, lNADUFrequency)))
> >          {
> >              m_tvCallbackInterval.tv_sec = 3*lNADUFrequency;
> >          }
> > @@ -2017,8 +2017,6 @@
> >          {
> >              m_tvCallbackInterval.tv_sec = 3;
> >          }
> > -        pReg->Release();
> > -    }
> >  #endif
> >  }
> >
> >
> >
> >
> > Index: server/protocol/rtsp/pub/transportparams.h
> > ===================================================================
> > RCS file: /cvsroot/server/protocol/rtsp/pub/transportparams.h,v
> > retrieving revision 1.5
> > diff -u -w -r1.5 transportparams.h
> > --- server/protocol/rtsp/pub/transportparams.h	15 May 2007 18:10:57
> -0000	1.5
> > +++ server/protocol/rtsp/pub/transportparams.h	16 Aug 2007 12:41:36
> -0000
> > @@ -133,7 +133,7 @@
> >  public:
> >      RTSPTransportInstantiator(BOOL bAggregate);
> >
> > -    HX_RESULT Init(IUnknown* pContext,
> > +    HX_RESULT Init(IUnknown* pContext, IHXQoSSignalBus* pSignalBus,
> >                     RTSPServerProtocol* pServerProtocol);
> >
> >      // IUnknown methods.
> > Index: server/protocol/rtsp/transportparams.cpp
> > ===================================================================
> > RCS file: /cvsroot/server/protocol/rtsp/transportparams.cpp,v
> > retrieving revision 1.12
> > diff -u -w -r1.12 transportparams.cpp
> > --- server/protocol/rtsp/transportparams.cpp	14 Aug 2007 12:35:26
-0000
> 	1.12
> > +++ server/protocol/rtsp/transportparams.cpp	16 Aug 2007 12:41:37
-0000
> > @@ -97,6 +97,11 @@
> >  #define STRACE1(x)
> >  #endif
> >
> > +#include "hxqos.h"
> > +#include "qos_prof_conf.h"
> > +
> > +#define REG_RTSP_PREF_TCP           "PreferClientTCP"
> > +
> >  /*
> >   * This defines the transports we support.  It is used in the session's
> >   * selectTransport() function.
> > @@ -272,7 +277,7 @@
> >   * \return HXR_OK
> >   */
> >  HX_RESULT
> > -RTSPTransportInstantiator::Init(IUnknown* pContext,
> > +RTSPTransportInstantiator::Init(IUnknown* pContext, IHXQoSSignalBus*
> pSignalBus,
> >                              RTSPServerProtocol* pServerProtocol)
> >  {
> >      HX_RESULT hresult = HXR_OK;
> > @@ -284,21 +289,25 @@
> >      m_pServProt->AddRef();
> >
> >  	IHXRegistry* pRegistry = NULL;
> > -    hresult = m_pContext->QueryInterface(IID_IHXRegistry,
> > -                                         (void**)&pRegistry);
> > +    QoSProfileConfigurator* pProfileConfigurator = NULL;
> 
> IHXQoSProfileConfigurator?
> 
> > +    hresult = m_pContext->QueryInterface(IID_IHXRegistry,
> (void**)&pRegistry);
> >      HX_VERIFY(HXR_OK == hresult);
> > -    if (hresult == HXR_OK)
> > +
> > +    if(pSignalBus)
> > +    {
> > +        HX_VERIFY(SUCCEEDED(pSignalBus-
> >QueryInterface(IID_IHXQoSProfileConfigurator,
> > +
> (void**)&pProfileConfigurator)));
> 
> Can't you just QI the context for an IHXQoSProfileConfigurator? You did
> it easily enough in the SDP plugin...
> 
> > +        if(pProfileConfigurator && pRegistry)
> >      {
> > -        IHXBuffer* pBuf = NULL;
> >          INT32 lEnabled = 0;
> > -        INT32 nTmp = 0;
> > +            INT32 lTCPPref = 0;
> >
> >          pRegistry->GetIntByName(REGISTRY_TCP_PREF_ENABLED, lEnabled);
> > -        nTmp = 0;
> > +
> >          if (( lEnabled || LICENSE_TCP_PREF_ENABLED) &&
> > -                SUCCEEDED(pRegistry-
> >GetIntByName("config.Protocols.RTSP.PreferClientTCP", nTmp)))
> > -        {
> > -            if (nTmp)
> > +                SUCCEEDED(pProfileConfigurator-
> >GetConfigInt(REG_RTSP_PREF_TCP, lTCPPref)) && lTCPPref)
> >              {
> >                  //Reset the transport priorities to prefer TCP
> >                  RTSPTransportPriorityTable [RTSP_TR_RDT_TCP] = 1;
> > @@ -307,7 +316,6 @@
> >              }
> >          }
> >      }
> > -
> >      return HXR_OK;
> >  }
> >
> >
> >
> >
> >
> > Index: server/protocol/rtsp/rtspserv.cpp
> > ===================================================================
> > RCS file: /cvsroot/server/protocol/rtsp/rtspserv.cpp,v
> > retrieving revision 1.281
> > diff -u -w -r1.281 rtspserv.cpp
> > --- server/protocol/rtsp/rtspserv.cpp	10 Aug 2007 18:03:00 -0000
> 	1.281
> > +++ server/protocol/rtsp/rtspserv.cpp	16 Aug 2007 12:41:42 -0000
> > @@ -99,12 +99,15 @@
> >  #include "mimescan.h"
> >  #include "qos_diffserv_cfg.h"
> >  #include "server_version.h"
> > +
> > +#include "hxqos.h"
> > +#include "qos_prof_conf.h"
> > +#include "qos_cfg_names.h"
> > +
> >  #ifdef HELIX_FEATURE_SERVER_FCS
> >  #include "fcsutil.h"
> >  #endif /* HELIX_FEATURE_SERVER_FCS */
> >
> > -
> > -
> >  const UINT16 FINISH_SETUP = 1;
> >  const UINT16 FINISH_PLAYNOW = 2;
> >
> > @@ -147,6 +150,9 @@
> >  // g_szAllMethods lists supported methods for Public header in OPTIONS
> response
> >  static const char* g_szAllMethods = "OPTIONS, DESCRIBE, PLAY, PAUSE,
> SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN";
> >
> > +const char* PSS_DEFAULT_VERSION = "3GPP-R5";
> > +const UINT16 PSS_DEFAULT_VERSION_LEN = 8;
> > +
> >  /**
> >   * \brief        Allowed methods in string form for RTSP Allow header
> >   *
> > @@ -6406,7 +6412,7 @@
> >              HX_RELEASE(pSession->m_pTransportInstantiator);
> >              pSession->m_pTransportInstantiator = new
> RTSPTransportInstantiator(TRUE);
> >              pSession->m_pTransportInstantiator->AddRef();
> > -            pSession->m_pTransportInstantiator->Init(m_pContext, this);
> > +            pSession->m_pTransportInstantiator->Init(m_pContext,
> (m_pClient->FindSession(sessionID))->m_pSignalBus, this);
> >
> >              rc = pSession->m_pTransportInstantiator-
> >parseTransportHeader(pTransportMIMEType);
> >              HX_RELEASE(pTransportMIMEType);
> > @@ -6871,7 +6877,7 @@
> >                      {
> >                          pSessionNew->m_pTransportInstantiator = new
> RTSPTransportInstantiator(FALSE);
> >                          pSessionNew->m_pTransportInstantiator-
> >AddRef();
> > -                        pSessionNew->m_pTransportInstantiator-
> >Init(m_pContext, this);
> > +                        pSessionNew->m_pTransportInstantiator-
> >Init(m_pContext, (m_pClient->FindSession(sessionID))->m_pSignalBus,
> this);
> >                      }
> >
> >                      if (pSessionNew->m_pTransportInstantiator-
> >IsAggregateTransport())
> > @@ -9149,7 +9155,7 @@
> >          pInstantiator = new RTSPTransportInstantiator(TRUE);
> >          pNewSession->m_pTransportInstantiator = pInstantiator;
> >          pInstantiator->AddRef();
> > -        pInstantiator->Init(m_pContext, this);
> > +        pInstantiator->Init(m_pContext, (m_pClient-
> >FindSession(newSessionID))->m_pSignalBus, this);
> >
> >          rc = pInstantiator->parseTransportHeader(pTransportMIMEType);
> >
> > @@ -13254,6 +13260,43 @@
> >                  pOptionalValues->SetPropertyCString("UserAgent",
> pUserAgent);
> >              }
> >
> > +            IHXQoSProfileSelector* pProfileSelector = NULL;
> > +            IHXUserAgentSettings* pUAS = NULL;
> > +            m_pContext->QueryInterface(IID_IHXQoSProfileSelector,
> (void**)&pProfileSelector);
> > +            if(pProfileSelector)
> > +            {
> > +                pProfileSelector->SelectProfile(pUserAgent, NULL, NULL,
> pUAS);
> > +                HX_RELEASE(pProfileSelector);
> > +            }
> > +
> > +            QoSProfileConfigurator* pProfileConfigurator = NULL;
> 
> IHXQoSProfileConfigurator?
> 
> > +            m_pContext->QueryInterface(IID_IHXQoSProfileConfigurator,
> (void**)&pProfileConfigurator);
> > +            if(pProfileConfigurator)
> > +            {
> > +                IHXBuffer* pBuf = NULL;
> > +                IHXBuffer* pLocalRDF = NULL;
> > +                UINT32 ulRetriveXWAPProfiles = 0;
> > +
> > +                pProfileConfigurator->SetUserAgentSettings(pUAS);
> > +                pProfileConfigurator-
> >GetConfigBuffer(QOS_CFG_CC_CE_LOCAL_RDF, pLocalRDF);
> > +                if(FAILED(pProfileConfigurator-
> >GetConfigInt(QOS_CFG_CC_CE_RET_XWAP_PROFILE,
> > +                    (INT32&)ulRetriveXWAPProfiles)))
> > +                {
> > +                    ulRetriveXWAPProfiles = 1;  //Set the default value
> > +                }
> > +
> > +                pProfileConfigurator-
> >GetConfigBuffer(QOS_CFG_CC_CE_PSS_VERSION, pBuf);
> > +                if(!pBuf)
> > +                {
> > +                    //Set default value for PSSVersion
> > +                    m_pCommonClassFactory-
> >CreateInstance(CLSID_IHXBuffer, (void**)&pBuf);
> > +                    pBuf->Set((const UCHAR*)PSS_DEFAULT_VERSION,
> PSS_DEFAULT_VERSION_LEN);
> > +                }
> > +
> > +                pOptionalValues->SetPropertyCString("PSSVersion",
> pBuf);
> > +
> > +                if(pLocalRDF || ulRetriveXWAPProfiles)
> > +                {
> >              IHXClientProfileInfo* pProfile;
> >              if (SUCCEEDED(pSession->m_pStats-
> >GetClientProfileInfo(pProfile)))
> >              {
> > @@ -13269,6 +13312,12 @@
> >                  HX_RELEASE(pProfile);
> >              }
> >          }
> > +                HX_RELEASE(pBuf);
> > +                HX_RELEASE(pLocalRDF);
> > +            }
> > +            HX_RELEASE(pUAS);
> > +            HX_RELEASE(pProfileConfigurator);
> > +        }
> >          result = sendSetupStreamResponse(HXR_OK, pSession,
> m_pFileHeader,
> >                                  pHeaders, pOptionalValues,
> pResponseHeaders);
> >
> >
> >
> >
> > Index: server/qos/core/pub/qos_cfg_names.h
> > ===================================================================
> > RCS file: /cvsroot/server/qos/core/pub/qos_cfg_names.h,v
> > retrieving revision 1.44
> > diff -u -w -r1.44 qos_cfg_names.h
> > --- server/qos/core/pub/qos_cfg_names.h	26 Jul 2007 06:27:33 -0000
> 	1.44
> > +++ server/qos/core/pub/qos_cfg_names.h	16 Aug 2007 12:41:42 -0000
> > @@ -51,6 +51,12 @@
> >  #define QOS_CFG_CC_BW_PROT  "ClientCapabilities.BandwidthProtocol"
> /* string */
> >  #define QOS_CFG_CC_BW_MULT  "ClientCapabilities.BandwidthMultiplier"
> /* % */
> >
> > +#define QOS_CFG_CC_CE_LOCAL_RDF
> "ClientCapabilities.CapabilitiesExchange.LocalRDF"                  /*
> string */
> > +#define QOS_CFG_CC_CE_RET_XWAP_PROFILE
> "ClientCapabilities.CapabilitiesExchange.RetrieveXWAPProfiles"      /*
> bool */
> > +#define QOS_CFG_CC_CE_VPREDEC_BUF_SIZE
> "ClientCapabilities.CapabilitiesExchange.VideoPreDecoderBufferSize" /*
> bytes */
> > +#define QOS_CFG_CC_CE_VDEC_BYTE_RATE
> "ClientCapabilities.CapabilitiesExchange.VideoDecodingByteRate"     /*
> bytes */
> > +#define QOS_CFG_CC_CE_PSS_VERSION
> "ClientCapabilities.CapabilitiesExchange.PssVersion"                /*
> string */
> > +
> >  /* RateControl: */
> >  /* RTCP RR and RS rate/ratio (b=RR, b=RS) */
> >  #define QOS_CFG_RATECONTROL_RR_RATIO "RateControl.RTCPRRrate" /* x.x%,
> xxbps, xx */
> > @@ -106,14 +112,14 @@
> >  /* Debug Variable in config file works on masking of bits */
> >  static const char* DEBUG_OUTPUT = "DebugOutput";
> >  /* Mask for each debug variable */
> > -static const DUMP_ALL              = 0x0001;
> > -static const DUMP_PKT              = 0x0002;
> > -static const DUMP_SELECTION        = 0x0004;
> > -static const DUMP_ALLRATE          = 0x0008;
> > -static const DUMP_ADAPTATION       = 0x0010;
> > -static const DUMP_ASMHANDLING      = 0x0020;
> > -static const DUMP_RM_TRACE         = 0x0040;
> > -static const DUMP_RC_TRACE         = 0x0080;
> > -static const DUMP_CHANNELRATE      = 0x0100;
> > +static const UINT32 DUMP_ALL              = 0x0001;
> > +static const UINT32 DUMP_PKT              = 0x0002;
> > +static const UINT32 DUMP_SELECTION        = 0x0004;
> > +static const UINT32 DUMP_ALLRATE          = 0x0008;
> > +static const UINT32 DUMP_ADAPTATION       = 0x0010;
> > +static const UINT32 DUMP_ASMHANDLING      = 0x0020;
> > +static const UINT32 DUMP_RM_TRACE         = 0x0040;
> > +static const UINT32 DUMP_RC_TRACE         = 0x0080;
> > +static const UINT32 DUMP_CHANNELRATE      = 0x0100;
> >
> >  #endif /*_QOS_CFG_NAMES_H_ */
-------------- next part --------------
Index: protocol/sdp/pub/sdpmdgen.h
===================================================================
RCS file: /cvsroot/protocol/sdp/pub/sdpmdgen.h,v
retrieving revision 1.19
diff -u -w -r1.19 sdpmdgen.h
--- protocol/sdp/pub/sdpmdgen.h	7 Aug 2007 21:07:26 -0000	1.19
+++ protocol/sdp/pub/sdpmdgen.h	17 Aug 2007 05:38:27 -0000
@@ -100,11 +100,8 @@
     HXBOOL m_bUseSessionGUID;
     HXBOOL m_bUseAbsoluteURL;
 
-    static UINT32   g_ul3GPPNADUReportFreq;
-    static HXBOOL   g_bGot3GPPNADUReportFreq;
     static const char*      g_pHelixClients[];
 
-    static HXBOOL     g_bHelixRateAdaptationConfigured;
     static HXBOOL     g_bHelixRateAdaptationLicensed;
     static HXBOOL     g_bCheckedHelixRateAdaptationLicense;
 



Index: protocol/sdp/sdpmdgen.cpp
===================================================================
RCS file: /cvsroot/protocol/sdp/sdpmdgen.cpp,v
retrieving revision 1.56
diff -u -w -r1.56 sdpmdgen.cpp
--- protocol/sdp/sdpmdgen.cpp	7 Aug 2007 21:07:26 -0000	1.56
+++ protocol/sdp/sdpmdgen.cpp	17 Aug 2007 05:38:28 -0000
@@ -61,6 +61,8 @@
 #include "sdpmdgen.h"
 #include "defslice.h"
 
+#include "hxqos.h"
+
 // Packet overhead in bits
 #define RTP_HEAD_SZ 96  // 12 bytes
 #define RDT_HEAD_SZ 128 // 16 bytes
@@ -75,18 +77,13 @@
 #define SDP_CLIENT_HLX  0x00000001
 #define SDP_CLIENT_REL6 0x00000010
 
-#define NADU_REPORT_FREQUENCY_CFG "config.3GPPStreamAdaptation.NADUReportFreq"
-#define REG_RTSP_PREF_TCP "config.Protocols.RTSP.PreferClientTCP"
+#define NADU_REPORT_FREQUENCY_CFG   "ClientCapabilities.NADUReportFrequency"
+#define REG_RTSP_PREF_TCP           "PreferClientTCP"
 #define SDP_TITLE_CFG "config.SDPDefaultTitle"
 #define SDP_TITLE_LEN_CFG "config.SDPTitleNumCharsOfFilename"
 
 // Helix Rate Adaptation Configuration; default is TRUE
-#define REGISTRY_GL_HRA_CFG "config.MediaDelivery.EnableHelixRateAdaptation"
-BOOL    SDPMediaDescGenerator::g_bHelixRateAdaptationConfigured = TRUE;
-
-// 3GPP adaptation report frequency. Default to 3.
-UINT32  SDPMediaDescGenerator::g_ul3GPPNADUReportFreq = 1;
-BOOL    SDPMediaDescGenerator::g_bGot3GPPNADUReportFreq = FALSE;
+#define REGISTRY_GL_HRA_CFG         "RateAdaptation.ClientAdaptation.EnableHelixRateAdaptation"
 
 // Helix Rate Adaptation licensing
 BOOL    SDPMediaDescGenerator::g_bHelixRateAdaptationLicensed = FALSE;
@@ -94,8 +91,7 @@
 
 // Maybe we should also add a config list so more
 // can be added in the field
-const char* SDPMediaDescGenerator::g_pHelixClients[] = 
-{ "RealMedia", "RealOne", "Helix", NULL };
+const char* SDPMediaDescGenerator::g_pHelixClients[] = { "RealMedia", "RealOne", "Helix", NULL };
 
 // SDPData chunk lines to skip when writing to the SDP.
 // All lines that are not a= will be skipped by default.
@@ -117,14 +113,15 @@
 
 
 SDPMediaDescGenerator::SDPMediaDescGenerator(ULONG32 ulVersion) :
-    m_pContext(0),
-    m_pCCF(0),
-    m_pRegistry(0),
+    m_pContext(NULL),
+    m_pCCF(NULL),
+    m_pRegistry(NULL),
     m_ulVersion(ulVersion),
     m_bUseOldEOL(FALSE),
     m_bUseSessionGUID(FALSE),
     m_bUseAbsoluteURL(FALSE)
-{}
+{
+}
 
 SDPMediaDescGenerator::~SDPMediaDescGenerator()
 {
@@ -149,24 +146,27 @@
             m_pContext = pContext;
             m_pContext->AddRef();
 
-            res = pContext->QueryInterface(IID_IHXRegistry, 
-                (void**)&m_pRegistry);
+            res = pContext->QueryInterface(IID_IHXRegistry, (void**)&m_pRegistry);
         }
-        if (!g_bGot3GPPNADUReportFreq && SUCCEEDED(res))
+
+        // Check for Helix Rate Adaptation license if 
+        // we haven't already
+        if (!g_bCheckedHelixRateAdaptationLicense && m_pRegistry)
         {
-            // Look up and store the 3GPP Adaptation Report Frequency 
-            // in the config if we haven't yet
-            INT32 lFrequency;
-            if (SUCCEEDED(m_pRegistry->GetIntByName(NADU_REPORT_FREQUENCY_CFG, 
-                lFrequency)))
+            // Check if license file includes key for Helix
+            // Rate Adaptation
+            INT32 lHRAEnabled;
+            if (SUCCEEDED(m_pRegistry->GetIntByName(REGISTRY_HRA_ENABLED, lHRAEnabled)))
             {
-                g_ul3GPPNADUReportFreq = (UINT32)lFrequency;
+                g_bHelixRateAdaptationLicensed = lHRAEnabled;
             }
-
-            g_bGot3GPPNADUReportFreq = TRUE;
+            else
+            {
+                g_bHelixRateAdaptationLicensed = LICENSE_HRA_ENABLED;
+            }
+            g_bCheckedHelixRateAdaptationLicense = TRUE;
         }
     }
-
     return res;
 }
 
@@ -200,48 +200,6 @@
         pszEOL[2] = '\0';
     }
 
-    // Check for Helix Rate Adaptation license if 
-    // we haven't already
-    if (!g_bCheckedHelixRateAdaptationLicense && m_pRegistry)
-    {
-        // Check if license file includes key for Helix
-        // Rate Adaptation
-        INT32 lHRAEnabled;
-        if (SUCCEEDED(m_pRegistry->GetIntByName(REGISTRY_HRA_ENABLED,
-            lHRAEnabled)))
-        {
-            g_bHelixRateAdaptationLicensed = lHRAEnabled;
-        }
-        else
-        {
-            g_bHelixRateAdaptationLicensed = LICENSE_HRA_ENABLED;
-        }
-
-        g_bCheckedHelixRateAdaptationLicense = TRUE;
-    }
-
-    // Check for global Helix Rate Adaptation configuration. If it's present, it may
-    // affect whether or not HRA is used to init MDP.
-    INT32 lHRAConfigured = 0;
-    if (m_pRegistry)
-    {
-        if (SUCCEEDED(m_pRegistry->GetIntByName(REGISTRY_GL_HRA_CFG,
-                        lHRAConfigured)))
-        {
-            g_bHelixRateAdaptationConfigured = lHRAConfigured;
-        }
-
-        INT32 lTCPPref = 0;
-        if (SUCCEEDED(m_pRegistry->GetIntByName(REG_RTSP_PREF_TCP, lTCPPref))
-                && lTCPPref)
-        {
-            // If PreferClientTCP is set, we will assume TCP unless
-            // otherwise specified in the optional header 
-            // (from UA config)
-            bTCP = TRUE;
-        }
-    }
-
     // get local host address from registry
 
     /*  XXX 
@@ -281,6 +239,8 @@
     IHXBuffer* pControlStringBuff = NULL;
     IHXBuffer* pUserAgent = NULL;
     IHXBuffer* pPSSVersion = NULL;
+    UINT32     ul3GPPNADUReportFreq = 1;
+    HXBOOL     bHelixRateAdaptationConfigured = TRUE;
 
     // munge current time with IP
     NPTime timeNow;
@@ -387,6 +347,55 @@
         }
     }
 
+    if (m_pContext)
+    {
+        IHXQoSProfileSelector* pProfileSelector = NULL;
+        IHXUserAgentSettings* pUAS = NULL;
+        IHXQoSProfileConfigurator* pProfileConfigurator = NULL;
+ 
+        m_pContext->QueryInterface(IID_IHXQoSProfileSelector, (void**)&pProfileSelector);
+        m_pContext->QueryInterface(IID_IHXQoSProfileConfigurator, (void**)&pProfileConfigurator);
+
+        if(pProfileSelector && pProfileConfigurator)
+        {
+            pProfileSelector->SelectProfile(pUserAgent, NULL, NULL, pUAS);
+            HX_RELEASE(pProfileSelector);
+
+            pProfileConfigurator->SetUserAgentSettings(pUAS);
+
+            INT32 lTemp;
+            if(SUCCEEDED(pProfileConfigurator->GetConfigInt(NADU_REPORT_FREQUENCY_CFG, lTemp)))
+            {
+                ul3GPPNADUReportFreq = (BOOL)lTemp;
+            }
+            else
+            {
+                ul3GPPNADUReportFreq = 1;  //Set the default value
+            }
+
+            // Check for global Helix Rate Adaptation configuration. If it's present, it may
+            // affect whether or not HRA is used to init MDP.
+            if (SUCCEEDED(pProfileConfigurator->GetConfigInt(REGISTRY_GL_HRA_CFG, lTemp)))
+            {
+                bHelixRateAdaptationConfigured = lTemp;
+            }
+            else
+            {
+                bHelixRateAdaptationConfigured = TRUE;    //Set the default value
+            }
+
+            if (SUCCEEDED(pProfileConfigurator->GetConfigInt(REG_RTSP_PREF_TCP, lTemp)) && lTemp)
+            {
+                // If PreferClientTCP is set, we will assume TCP unless
+                // otherwise specified in the optional header 
+                // (from UA config)
+                bTCP = TRUE;
+            }
+        }
+        HX_RELEASE(pUAS);
+        HX_RELEASE(pProfileConfigurator);
+    }
+
     const char* szHostname = NULL; 
     if (pHostname)
     {
@@ -1807,17 +1816,17 @@
 
             // a=3GPP-Adaptation-Support
             // Do not offer 3GPP-Adaptation-Support for Real Datatypes
-            if (!bIsLive && !bIsRealDatatype && g_ul3GPPNADUReportFreq && bDefault)
+            if (!bIsLive && !bIsRealDatatype && ul3GPPNADUReportFreq && bDefault)
             {
                 SafeSprintf(psz256, 256, "a=3GPP-Adaptation-Support:%u%s",
-                    g_ul3GPPNADUReportFreq, pszEOL);
+                    ul3GPPNADUReportFreq, pszEOL);
                 mDesc += psz256;
             }
 
             // a=Helix-Adaptation-Support
             // always signal
             if (!bIsLive && bDefault && g_bHelixRateAdaptationLicensed
-                && g_bHelixRateAdaptationConfigured)
+                && bHelixRateAdaptationConfigured)
             {
                 SafeSprintf(psz256, 256, "a=Helix-Adaptation-Support:1%s", 
                     pszEOL);




Index: protocol/sdp/sdpplin.cpp
===================================================================
RCS file: /cvsroot/protocol/sdp/sdpplin.cpp,v
retrieving revision 1.20
diff -u -w -r1.20 sdpplin.cpp
--- protocol/sdp/sdpplin.cpp	6 Jul 2007 20:51:37 -0000	1.20
+++ protocol/sdp/sdpplin.cpp	17 Aug 2007 05:38:28 -0000
@@ -82,6 +82,7 @@
 #include "ihxtlogsystem.h"
 #include "ihxtlogsystemcontext.h"
 #include "hxdllaccess.h"
+#include "hxqos.h"
 #undef INITGUID
 
 #include "hxver.h"




Index: server-restricted/installer/proxy/proxyinst.cpp
===================================================================
RCS file: /cvsroot/proxy-restricted/installer/proxy/proxyinst.cpp,v
retrieving revision 1.7
diff -u -w -r1.7 proxyinst.cpp
--- server-restricted/installer/proxy/proxyinst.cpp	2 Jul 2007 08:44:55 -0000	1.7
+++ server-restricted/installer/proxy/proxyinst.cpp	17 Aug 2007 05:38:35 -0000
@@ -538,11 +538,6 @@
     p += sprintf(p, "</List>\n");
     p += sprintf(p, "\n");
 
-    p += sprintf(p, "<List Name=\"3GPPStreamAdaptation\">\n");
-    p += sprintf(p, "    <Var NADUReportFreq=\"1\"/>\n");
-    p += sprintf(p, "</List>\n");
-    p += sprintf(p, "\n");
-
 #ifndef MOBILE
     p += sprintf(p, "<!-- M E D I A  D E L I V E R Y  P I P E L I N E -->\n");
     p += sprintf(p, "<List Name=\"MediaDelivery\">\n");
@@ -589,6 +584,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -617,6 +615,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -645,6 +646,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -673,6 +677,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -705,6 +712,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n");
     p += sprintf(p, "          <List Name=\"A830\">\n");
@@ -732,6 +742,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n");
     p += sprintf(p, "          <List Name=\"A835\">\n");
@@ -759,6 +772,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n");
     p += sprintf(p, "          <List Name=\"P900-Z100\">\n");
@@ -786,54 +802,12 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n");
     p += sprintf(p, "     </List>\n");
     p += sprintf(p, "</List>\n");
-    p += sprintf(p, "\n");
-
-    p += sprintf(p, "<!-- C A P A B I L I T Y  E X C H A N G E -->\n");
-    p += sprintf(p, "<List Name=\"CapabilityExchange\">\n");
-    p += sprintf(p, "    <Var ProfileCacheSize=\"100\"/>\n");
-    p += sprintf(p, "    <List Name=\"DefaultProfiles\">\n");
-    p += sprintf(p, "        <List Name=\"Client1\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealOnePlayer\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client2\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player/3\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client3\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player/s\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client4\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player (epoc_\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client5\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"PVPlayer\"/> \n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/PVPlayer.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client6\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"MOT-A820/00.00.00 MIB/2.1 "
-                    "Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.1a\"/>\n");
-    p += sprintf(p, "           <Var URI=\"file://profiles/Motorola.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client7\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"Motorola\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/Motorola.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client8\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player/mc\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Default\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"Default\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/default.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "    </List>\n");
     p += sprintf(p, "</List>\n");
     p += sprintf(p, "\n");
 #endif




Index: server-restricted/installer/server/retailservinst.cpp
===================================================================
RCS file: /cvsroot/server-restricted/installer/server/retailservinst.cpp,v
retrieving revision 1.8
diff -u -w -r1.8 retailservinst.cpp
--- server-restricted/installer/server/retailservinst.cpp	9 Jul 2007 06:22:26 -0000	1.8
+++ server-restricted/installer/server/retailservinst.cpp	17 Aug 2007 05:38:42 -0000
@@ -863,11 +863,6 @@
     p += sprintf(p, "</List>\n");
     p += sprintf(p, "\n");
 
-    p += sprintf(p, "<List Name=\"3GPPStreamAdaptation\">\n");
-    p += sprintf(p, "    <Var NADUReportFreq=\"1\"/>\n");
-    p += sprintf(p, "</List>\n");
-    p += sprintf(p, "\n");
-
 #ifndef MOBILE
     p += sprintf(p, "<!-- M E D I A  D E L I V E R Y  P I P E L I N E -->\n");
     p += sprintf(p, "<List Name=\"MediaDelivery\">\n"); 
@@ -903,6 +898,9 @@
     p += sprintf(p, "               <List Name=\"RateAdaptation\">\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n");
     p += sprintf(p, "-->\n");
@@ -929,6 +927,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -957,6 +958,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -985,6 +989,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -1013,6 +1020,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"75%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "               <List Name=\"InputSource\">\n");
     p += sprintf(p, "                    <List Name=\"StaticPushSource\">\n");
@@ -1045,6 +1055,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n"); 
     p += sprintf(p, "          <List Name=\"A830\">\n"); 
@@ -1072,6 +1085,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n"); 
     p += sprintf(p, "          <List Name=\"A835\">\n"); 
@@ -1099,6 +1115,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n"); 
     p += sprintf(p, "          <List Name=\"P900-Z100\">\n"); 
@@ -1126,6 +1145,9 @@
     p += sprintf(p, "                    <Var ResendTimeLimit=\"1000\"/>\n");
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"50%%\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
+    p += sprintf(p, "                    </List>\n");
     p += sprintf(p, "               </List>\n");
     p += sprintf(p, "          </List>\n"); 
     p += sprintf(p, "          <List Name=\"Z105\">\n"); 
@@ -1157,57 +1179,11 @@
     p += sprintf(p, "                    <Var BufferModel=\"ANNEXG\"/>\n");
     p += sprintf(p, "                    <Var DownshiftDepth=\"20%%\"/>\n");
     p += sprintf(p, "                    <Var UpshiftDepth=\"120%%\"/>\n");
-#endif
-    p += sprintf(p, "               </List>\n");
-    p += sprintf(p, "          </List>\n"); 
-    p += sprintf(p, "     </List>\n"); 
-    p += sprintf(p, "</List>\n"); 
-    p += sprintf(p, "\n");
-
-    p += sprintf(p, "<!-- C A P A B I L I T Y  E X C H A N G E -->\n");
-    p += sprintf(p, "<List Name=\"CapabilityExchange\">\n");
-    p += sprintf(p, "    <Var ProfileCacheSize=\"100\"/>\n");      
-    p += sprintf(p, "    <List Name=\"DefaultProfiles\">\n");
-    p += sprintf(p, "        <List Name=\"Client1\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealOnePlayer\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client2\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player/3\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client3\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player/s\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client4\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player (epoc_\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
+    p += sprintf(p, "                    <List Name=\"ClientAdaptation\">\n");
+    p += sprintf(p, "                        <Var EnableHelixRateAdaptation=\"1\"/>\n");
     p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client5\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"PVPlayer\"/> \n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/PVPlayer.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client6\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"MOT-A820/00.00.00 MIB/2.1 "
-                    "Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.1a\"/>\n");
-    p += sprintf(p, "           <Var URI=\"file://profiles/Motorola.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client7\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"Motorola\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/Motorola.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client8\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"PVPlayer 3.4\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/PVZ105.rdf\"/>\n");
-    p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Client9\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"RealMedia Player/mc\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/NokiaR1M.rdf\"/>\n");
+#endif
     p += sprintf(p, "        </List>\n");
-    p += sprintf(p, "        <List Name=\"Default\">\n");
-    p += sprintf(p, "            <Var UserAgent=\"Default\"/>\n");
-    p += sprintf(p, "            <Var URI=\"file://profiles/default.rdf\"/>\n");
     p += sprintf(p, "        </List>\n");
     p += sprintf(p, "    </List>\n");
     p += sprintf(p, "</List>\n");




Index: server-restricted/qos/session/pub/qos_sess_pktqueue.h
===================================================================
RCS file: /cvsroot/server-restricted/qos/session/pub/qos_sess_pktqueue.h,v
retrieving revision 1.4
diff -u -w -r1.4 qos_sess_pktqueue.h
--- server-restricted/qos/session/pub/qos_sess_pktqueue.h	22 Jun 2007 20:37:42 -0000	1.4
+++ server-restricted/qos/session/pub/qos_sess_pktqueue.h	17 Aug 2007 05:38:42 -0000
@@ -328,6 +328,7 @@
     ULONG32       m_ulLastTimeline;
     Process*      m_pProc;
 
+    IHXQoSProfileConfigurator* m_pQoSConfig;
     StreamAdaptationSchemeEnum m_enumStreamAdaptScheme;
     StreamAdaptationParams*    m_pStreamAdaptParams;
 



Index: server-restricted/qos/session/qos_sess_pktqueue.cpp
===================================================================
RCS file: /cvsroot/server-restricted/qos/session/qos_sess_pktqueue.cpp,v
retrieving revision 1.6
diff -u -w -r1.6 qos_sess_pktqueue.cpp
--- server-restricted/qos/session/qos_sess_pktqueue.cpp	6 Jul 2007 00:05:31 -0000	1.6
+++ server-restricted/qos/session/qos_sess_pktqueue.cpp	17 Aug 2007 05:38:43 -0000
@@ -36,6 +36,8 @@
 
 #define DEFAULT_STREAM_SWITCH_DELAY 1000
 
+#define NADU_REPORT_FREQUENCY_CFG   "ClientCapabilities.NADUReportFrequency"
+
 CClientBuffer::CClientBuffer() : HXList(), 
     m_bOutOfOrderSN(FALSE), 
     m_pBuffHead(head)
@@ -342,6 +344,7 @@
                 , m_nLastSentSN(-1)
                 , m_ulLoss(0)
                 , m_bReportedNSNIncrease(FALSE)
+                , m_pQoSConfig(NULL)
 {
 #ifdef _UNITTEST
     m_ulRTT = 0;
@@ -386,6 +389,8 @@
         if (pQoSConfig)
         {
             pQoSConfig->GetConfigInt(QOS_CFG_CC_NADU_ENABLE, (INT32&)lUseNADU);
+            m_pQoSConfig = pQoSConfig;
+            m_pQoSConfig->AddRef();
         }
         if (lUseNADU)
         {
@@ -418,6 +423,8 @@
         m_pNADUTimeout->RemoveCallback();
         m_pNADUTimeout->Release();
     }
+
+    HX_RELEASE(m_pQoSConfig);
 }
 
 HX_RESULT
@@ -1998,18 +2005,11 @@
 #ifndef _UNITTEST
     HX_ASSERT(pProc && pQueue);
 
-    IHXRegistry* pReg = NULL;
-
-    // Look for 3GPPStreamAdaptation.NADUReportFreq in the registry
+    // Look for NADUReportFrequency in the UAS
     // Use timeout of NADU freq. * 3 seconds
-    // If not present, keep the default of 3 sec.
-    if (SUCCEEDED(m_pProc->pc->server_context->QueryInterface(IID_IHXRegistry, 
-        (void**)&pReg)))
-    {
+    // If not present, keep the default of 3 sec. (Note: default value of NADUReportFrequency = 1)
         INT32 lNADUFrequency = 0;
-        
-        if (SUCCEEDED(pReg->GetIntByName("config.3GPPStreamAdaptation.NADUReportFreq",
-            lNADUFrequency)) && lNADUFrequency > 0)
+    if(SUCCEEDED(pQueue->m_pQoSConfig->GetConfigInt(NADU_REPORT_FREQUENCY_CFG, lNADUFrequency)))
         {
             m_tvCallbackInterval.tv_sec = 3*lNADUFrequency;
         }
@@ -2017,8 +2017,6 @@
         {
             m_tvCallbackInterval.tv_sec = 3;
         }
-        pReg->Release();
-    }
 #endif
 }
 



Index: server/protocol/rtsp/pub/transportparams.h
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/pub/transportparams.h,v
retrieving revision 1.5
diff -u -w -r1.5 transportparams.h
--- server/protocol/rtsp/pub/transportparams.h	15 May 2007 18:10:57 -0000	1.5
+++ server/protocol/rtsp/pub/transportparams.h	17 Aug 2007 05:38:50 -0000
@@ -133,7 +133,7 @@
 public:
     RTSPTransportInstantiator(BOOL bAggregate);
 
-    HX_RESULT Init(IUnknown* pContext,
+    HX_RESULT Init(IUnknown* pContext, IHXQoSSignalBus* pSignalBus,
                    RTSPServerProtocol* pServerProtocol);
 
     // IUnknown methods.




Index: server/protocol/rtsp/transportparams.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/transportparams.cpp,v
retrieving revision 1.12
diff -u -w -r1.12 transportparams.cpp
--- server/protocol/rtsp/transportparams.cpp	14 Aug 2007 12:35:26 -0000	1.12
+++ server/protocol/rtsp/transportparams.cpp	17 Aug 2007 05:38:51 -0000
@@ -97,6 +97,10 @@
 #define STRACE1(x)
 #endif
 
+#include "hxqos.h"
+
+#define REG_RTSP_PREF_TCP           "PreferClientTCP"
+
 /*
  * This defines the transports we support.  It is used in the session's
  * selectTransport() function.
@@ -272,7 +276,7 @@
  * \return HXR_OK
  */
 HX_RESULT
-RTSPTransportInstantiator::Init(IUnknown* pContext,
+RTSPTransportInstantiator::Init(IUnknown* pContext, IHXQoSSignalBus* pSignalBus,
                             RTSPServerProtocol* pServerProtocol)
 {
     HX_RESULT hresult = HXR_OK;
@@ -284,21 +288,25 @@
     m_pServProt->AddRef();
 
 	IHXRegistry* pRegistry = NULL;
-    hresult = m_pContext->QueryInterface(IID_IHXRegistry,
-                                         (void**)&pRegistry);
+    IHXQoSProfileConfigurator* pProfileConfigurator = NULL;
+
+    hresult = m_pContext->QueryInterface(IID_IHXRegistry, (void**)&pRegistry);
     HX_VERIFY(HXR_OK == hresult);
-    if (hresult == HXR_OK)
+
+    if(pSignalBus)
+    {
+        HX_VERIFY(SUCCEEDED(pSignalBus->QueryInterface(IID_IHXQoSProfileConfigurator, 
+                                                    (void**)&pProfileConfigurator)));
+
+        if(pProfileConfigurator && pRegistry)
     {
-        IHXBuffer* pBuf = NULL;
         INT32 lEnabled = 0;
-        INT32 nTmp = 0;
+            INT32 lTCPPref = 0;
         
         pRegistry->GetIntByName(REGISTRY_TCP_PREF_ENABLED, lEnabled);
-        nTmp = 0;
+
         if (( lEnabled || LICENSE_TCP_PREF_ENABLED) && 
-                SUCCEEDED(pRegistry->GetIntByName("config.Protocols.RTSP.PreferClientTCP", nTmp)))
-        {
-            if (nTmp)
+                SUCCEEDED(pProfileConfigurator->GetConfigInt(REG_RTSP_PREF_TCP, lTCPPref)) && lTCPPref)
             {
                 //Reset the transport priorities to prefer TCP
                 RTSPTransportPriorityTable [RTSP_TR_RDT_TCP] = 1;
@@ -307,7 +315,6 @@
             }
         }
     }
-
     return HXR_OK;
 }
 



Index: server/protocol/rtsp/rtspserv.cpp
===================================================================
RCS file: /cvsroot/server/protocol/rtsp/rtspserv.cpp,v
retrieving revision 1.281
diff -u -w -r1.281 rtspserv.cpp
--- server/protocol/rtsp/rtspserv.cpp	10 Aug 2007 18:03:00 -0000	1.281
+++ server/protocol/rtsp/rtspserv.cpp	17 Aug 2007 05:38:56 -0000
@@ -99,12 +99,14 @@
 #include "mimescan.h"
 #include "qos_diffserv_cfg.h"
 #include "server_version.h"
+
+#include "hxqos.h"
+#include "qos_cfg_names.h"
+
 #ifdef HELIX_FEATURE_SERVER_FCS
 #include "fcsutil.h"
 #endif /* HELIX_FEATURE_SERVER_FCS */
 
-
-
 const UINT16 FINISH_SETUP = 1;
 const UINT16 FINISH_PLAYNOW = 2;
 
@@ -147,6 +149,9 @@
 // g_szAllMethods lists supported methods for Public header in OPTIONS response
 static const char* g_szAllMethods = "OPTIONS, DESCRIBE, PLAY, PAUSE, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN";
 
+const char* PSS_DEFAULT_VERSION = "3GPP-R5";
+const UINT16 PSS_DEFAULT_VERSION_LEN = 8;
+
 /**
  * \brief        Allowed methods in string form for RTSP Allow header
  *
@@ -6406,7 +6411,7 @@
             HX_RELEASE(pSession->m_pTransportInstantiator);
             pSession->m_pTransportInstantiator = new RTSPTransportInstantiator(TRUE);
             pSession->m_pTransportInstantiator->AddRef();
-            pSession->m_pTransportInstantiator->Init(m_pContext, this);
+            pSession->m_pTransportInstantiator->Init(m_pContext, (m_pClient->FindSession(sessionID))->m_pSignalBus, this);
 
             rc = pSession->m_pTransportInstantiator->parseTransportHeader(pTransportMIMEType);
             HX_RELEASE(pTransportMIMEType);
@@ -6871,7 +6876,7 @@
                     {
                         pSessionNew->m_pTransportInstantiator = new RTSPTransportInstantiator(FALSE);
                         pSessionNew->m_pTransportInstantiator->AddRef();
-                        pSessionNew->m_pTransportInstantiator->Init(m_pContext, this);
+                        pSessionNew->m_pTransportInstantiator->Init(m_pContext, (m_pClient->FindSession(sessionID))->m_pSignalBus, this);
                     }
 
                     if (pSessionNew->m_pTransportInstantiator->IsAggregateTransport())
@@ -9149,7 +9154,7 @@
         pInstantiator = new RTSPTransportInstantiator(TRUE);
         pNewSession->m_pTransportInstantiator = pInstantiator;
         pInstantiator->AddRef();
-        pInstantiator->Init(m_pContext, this);
+        pInstantiator->Init(m_pContext, (m_pClient->FindSession(newSessionID))->m_pSignalBus, this);
 
         rc = pInstantiator->parseTransportHeader(pTransportMIMEType);
 
@@ -13254,6 +13259,43 @@
                 pOptionalValues->SetPropertyCString("UserAgent", pUserAgent);
             }
 
+            IHXQoSProfileSelector* pProfileSelector = NULL;
+            IHXUserAgentSettings* pUAS = NULL;
+            m_pContext->QueryInterface(IID_IHXQoSProfileSelector, (void**)&pProfileSelector);
+            if(pProfileSelector)
+            {
+                pProfileSelector->SelectProfile(pUserAgent, NULL, NULL, pUAS);
+                HX_RELEASE(pProfileSelector);
+            }
+
+            IHXQoSProfileConfigurator* pProfileConfigurator = NULL;
+            m_pContext->QueryInterface(IID_IHXQoSProfileConfigurator, (void**)&pProfileConfigurator);
+            if(pProfileConfigurator)
+            {
+                IHXBuffer* pBuf = NULL;
+                IHXBuffer* pLocalRDF = NULL;
+                UINT32 ulRetriveXWAPProfiles = 0;
+
+                pProfileConfigurator->SetUserAgentSettings(pUAS);
+                pProfileConfigurator->GetConfigBuffer(QOS_CFG_CC_CE_LOCAL_RDF, pLocalRDF);
+                if(FAILED(pProfileConfigurator->GetConfigInt(QOS_CFG_CC_CE_RET_XWAP_PROFILE, 
+                    (INT32&)ulRetriveXWAPProfiles)))
+                {
+                    ulRetriveXWAPProfiles = 1;  //Set the default value
+                }
+
+                pProfileConfigurator->GetConfigBuffer(QOS_CFG_CC_CE_PSS_VERSION, pBuf);
+                if(!pBuf)
+                {
+                    //Set default value for PSSVersion
+                    m_pCommonClassFactory->CreateInstance(CLSID_IHXBuffer, (void**)&pBuf);
+                    pBuf->Set((const UCHAR*)PSS_DEFAULT_VERSION, PSS_DEFAULT_VERSION_LEN);
+                }
+
+                pOptionalValues->SetPropertyCString("PSSVersion", pBuf);
+
+                if(pLocalRDF || ulRetriveXWAPProfiles)
+                {
             IHXClientProfileInfo* pProfile;
             if (SUCCEEDED(pSession->m_pStats->GetClientProfileInfo(pProfile)))
             {
@@ -13269,6 +13311,12 @@
                 HX_RELEASE(pProfile);
             }
         }
+                HX_RELEASE(pBuf);
+                HX_RELEASE(pLocalRDF);
+            }
+            HX_RELEASE(pUAS);
+            HX_RELEASE(pProfileConfigurator);
+        }
         result = sendSetupStreamResponse(HXR_OK, pSession, m_pFileHeader,
                                 pHeaders, pOptionalValues, pResponseHeaders);
 



Index: server/qos/core/pub/qos_cfg_names.h
===================================================================
RCS file: /cvsroot/server/qos/core/pub/qos_cfg_names.h,v
retrieving revision 1.44
diff -u -w -r1.44 qos_cfg_names.h
--- server/qos/core/pub/qos_cfg_names.h	26 Jul 2007 06:27:33 -0000	1.44
+++ server/qos/core/pub/qos_cfg_names.h	17 Aug 2007 05:38:56 -0000
@@ -51,6 +51,12 @@
 #define QOS_CFG_CC_BW_PROT  "ClientCapabilities.BandwidthProtocol"     /* string */
 #define QOS_CFG_CC_BW_MULT  "ClientCapabilities.BandwidthMultiplier"   /* % */
 
+#define QOS_CFG_CC_CE_LOCAL_RDF         "ClientCapabilities.CapabilitiesExchange.LocalRDF"                  /* string */
+#define QOS_CFG_CC_CE_RET_XWAP_PROFILE  "ClientCapabilities.CapabilitiesExchange.RetrieveXWAPProfiles"      /* bool */
+#define QOS_CFG_CC_CE_VPREDEC_BUF_SIZE  "ClientCapabilities.CapabilitiesExchange.VideoPreDecoderBufferSize" /* bytes */
+#define QOS_CFG_CC_CE_VDEC_BYTE_RATE    "ClientCapabilities.CapabilitiesExchange.VideoDecodingByteRate"     /* bytes */
+#define QOS_CFG_CC_CE_PSS_VERSION       "ClientCapabilities.CapabilitiesExchange.PssVersion"                /* string */
+
 /* RateControl: */
 /* RTCP RR and RS rate/ratio (b=RR, b=RS) */
 #define QOS_CFG_RATECONTROL_RR_RATIO "RateControl.RTCPRRrate" /* x.x%, xxbps, xx */
@@ -106,14 +112,14 @@
 /* Debug Variable in config file works on masking of bits */
 static const char* DEBUG_OUTPUT = "DebugOutput";
 /* Mask for each debug variable */
-static const DUMP_ALL              = 0x0001;
-static const DUMP_PKT              = 0x0002;
-static const DUMP_SELECTION        = 0x0004;
-static const DUMP_ALLRATE          = 0x0008;
-static const DUMP_ADAPTATION       = 0x0010;
-static const DUMP_ASMHANDLING      = 0x0020;
-static const DUMP_RM_TRACE         = 0x0040;
-static const DUMP_RC_TRACE         = 0x0080;
-static const DUMP_CHANNELRATE      = 0x0100;
+static const UINT32 DUMP_ALL              = 0x0001;
+static const UINT32 DUMP_PKT              = 0x0002;
+static const UINT32 DUMP_SELECTION        = 0x0004;
+static const UINT32 DUMP_ALLRATE          = 0x0008;
+static const UINT32 DUMP_ADAPTATION       = 0x0010;
+static const UINT32 DUMP_ASMHANDLING      = 0x0020;
+static const UINT32 DUMP_RM_TRACE         = 0x0040;
+static const UINT32 DUMP_RC_TRACE         = 0x0080;
+static const UINT32 DUMP_CHANNELRATE      = 0x0100;
 
 #endif /*_QOS_CFG_NAMES_H_ */


More information about the Protocol-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.