当前位置: 首页>>代码示例>>C++>>正文


C++ NamedList::addParam方法代码示例

本文整理汇总了C++中NamedList::addParam方法的典型用法代码示例。如果您正苦于以下问题:C++ NamedList::addParam方法的具体用法?C++ NamedList::addParam怎么用?C++ NamedList::addParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NamedList的用法示例。


在下文中一共展示了NamedList::addParam方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: putMedia

// Put the list of net media in a parameter list
void SDPMedia::putMedia(NamedList& msg, bool putPort)
{
    msg.addParam("media" + suffix(),"yes");
    msg.addParam("formats" + suffix(),formats());
    msg.addParam("transport" + suffix(),transport());
    if (mappings())
	msg.addParam("rtp_mapping" + suffix(),mappings());
    if (isAudio())
	msg.addParam("rtp_rfc2833",rfc2833());
    if (putPort)
	msg.addParam("rtp_port" + suffix(),remotePort());
    if (remoteCrypto())
	msg.addParam("crypto" + suffix(),remoteCrypto());
    // must handle encryption differently
    const char* enc = getValue("encryption");
    if (enc)
	msg.addParam("encryption" + suffix(),enc);
    clearParam("encryption");
    unsigned int n = length();
    for (unsigned int i = 0; i < n; i++) {
	const NamedString* param = getParam(i);
	if (param)
	    msg.addParam("sdp" + suffix() + "_" + param->name(),*param);
    }
}
开发者ID:0x7678,项目名称:evilbts,代码行数:26,代码来源:media.cpp

示例2: putNamedList

// Append all paramters from one named list to another, inserting keys prefix
static void putNamedList(NamedList& dst, const NamedList& src, String prefix)
{
    unsigned int n = src.length();
    for (unsigned int i = 0; i < n; i++) {
	const NamedString* param = src.getParam(i);
	if (param)
	    dst.addParam(prefix + param->name(),*param);
    }
}
开发者ID:CimpianAlin,项目名称:yate,代码行数:10,代码来源:media.cpp

示例3: putMedia

// Put the list of net media in a parameter list
void SDPMedia::putMedia(NamedList& msg, bool putPort)
{
    msg.addParam("media" + suffix(),"yes");
    msg.addParam("formats" + suffix(),formats());
    msg.addParam("transport" + suffix(),transport());
    if (mappings())
	msg.addParam("rtp_mapping" + suffix(),mappings());
    if (isAudio())
	msg.addParam("rtp_rfc2833",rfc2833());
    if (putPort)
	msg.addParam("rtp_port" + suffix(),remotePort());
    if (remoteCrypto())
	msg.addParam("crypto" + suffix(),remoteCrypto());
    // must handle encryption differently
    const char* enc = m_rAttrs.getValue("encryption");
    if (enc)
	msg.addParam("encryption" + suffix(),enc);
    putNamedList(msg, m_rAttrs, "sdp" + suffix() + "_");
    putNamedList(msg, m_fmtps, "fmtp_");
}
开发者ID:CimpianAlin,项目名称:yate,代码行数:21,代码来源:media.cpp


注:本文中的NamedList::addParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。