本文整理汇总了C++中MpCodecSubInfo::getCodecCall方法的典型用法代码示例。如果您正苦于以下问题:C++ MpCodecSubInfo::getCodecCall方法的具体用法?C++ MpCodecSubInfo::getCodecCall怎么用?C++ MpCodecSubInfo::getCodecCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MpCodecSubInfo
的用法示例。
在下文中一共展示了MpCodecSubInfo::getCodecCall方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: freeAllLoadedLibsAndCodec
void MpCodecFactory::freeAllLoadedLibsAndCodec()
{
OsSharedLibMgrBase* pShrMgr = OsSharedLibMgr::getOsSharedLibMgr();
UtlHashBagIterator iter(mCodecsInfo);
MpCodecSubInfo* pinfo;
UtlHashBag libLoaded;
UtlString* libName;
while ((pinfo = (MpCodecSubInfo*)iter()))
{
if ((!pinfo->getCodecCall()->isStatic()) &&
(!libLoaded.find(&pinfo->getCodecCall()->getModuleName()))) {
libLoaded.insert(const_cast<UtlString*>(&pinfo->getCodecCall()->getModuleName()));
}
}
UtlHashBagIterator iter2(libLoaded);
while ((libName = (UtlString*)iter2()))
{
pShrMgr->unloadSharedLib(libName->data());
}
iter.reset();
while ((pinfo = (MpCodecSubInfo*)iter()))
{
if (!pinfo->getCodecCall()->isStatic()) {
mCodecsInfo.remove(pinfo);
delete pinfo;
}
}
mCodecInfoCacheValid = FALSE;
}
示例2: createEncoder
OsStatus MpCodecFactory::createEncoder(const UtlString &mime,
const UtlString &fmtp,
int sampleRate,
int numChannels,
int payloadType,
MpEncoderBase*& rpEncoder) const
{
MpCodecSubInfo* codec = searchByMIME(mime, sampleRate, numChannels);
if (codec)
{
rpEncoder = new MpEncoderBase(payloadType,
*codec->getCodecCall(),
*codec->getCodecInfo(),
fmtp);
}
else
{
OsSysLog::add(FAC_MP, PRI_ERR,
"MpCodecFactory::createEncoder unknown codec type "
"%s, fmtp=%s"
"payloadType = %d",
mime.data(), fmtp.data(), payloadType);
rpEncoder=NULL;
}
if (NULL != rpEncoder)
{
return OS_SUCCESS;
}
return OS_INVALID_ARGUMENT;
}
示例3: iter
MpCodecFactory::~MpCodecFactory()
{
freeAllLoadedLibsAndCodec();
MpCodecSubInfo* pinfo;
UtlHashBagIterator iter(mCodecsInfo);
while ((pinfo = (MpCodecSubInfo*)iter()))
{
if (!pinfo->getCodecCall()->isStatic()) {
assert(!"Dynamically loaded codecs must be unloaded already");
}
delete pinfo;
}
mCodecsInfo.removeAll();
delete[] mpCodecInfoCache;
}