本文整理汇总了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);
}
}
示例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);
}
}
示例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_");
}