本文整理汇总了C++中AE_DSP_MENUHOOKS::size方法的典型用法代码示例。如果您正苦于以下问题:C++ AE_DSP_MENUHOOKS::size方法的具体用法?C++ AE_DSP_MENUHOOKS::size怎么用?C++ AE_DSP_MENUHOOKS::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AE_DSP_MENUHOOKS
的用法示例。
在下文中一共展示了AE_DSP_MENUHOOKS::size方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HaveActiveMenuHooks
bool CGUIDialogAudioDSPSettings::HaveActiveMenuHooks(AE_DSP_MENUHOOK_CAT category)
{
/*!> Check menus are active on current stream */
AE_DSP_ADDONMAP addonMap;
if (CActiveAEDSP::GetInstance().HaveMenuHooks(category) &&
CActiveAEDSP::GetInstance().GetEnabledAudioDSPAddons(addonMap) > 0)
{
for (AE_DSP_ADDONMAP_ITR itr = addonMap.begin(); itr != addonMap.end(); itr++)
{
AE_DSP_MENUHOOKS hooks;
if (CActiveAEDSP::GetInstance().GetMenuHooks(itr->second->GetID(), category, hooks))
{
for (unsigned int i = 0; i < hooks.size(); i++)
{
if (category != AE_DSP_MENUHOOK_MISCELLANEOUS &&
!m_ActiveStreamProcess->IsMenuHookModeActive(hooks[i].category, itr->second->GetID(), hooks[i].iRelevantModeId))
continue;
return true;
}
}
}
}
return false;
}
示例2: GetAudioDSPMenus
void CGUIDialogAudioDSPSettings::GetAudioDSPMenus(CSettingGroup *group, AE_DSP_MENUHOOK_CAT category)
{
AE_DSP_ADDONMAP addonMap;
if (CActiveAEDSP::GetInstance().GetEnabledAudioDSPAddons(addonMap) > 0)
{
for (AE_DSP_ADDONMAP_ITR itr = addonMap.begin(); itr != addonMap.end(); itr++)
{
AE_DSP_MENUHOOKS hooks;
if (CActiveAEDSP::GetInstance().GetMenuHooks(itr->second->GetID(), category, hooks))
{
for (unsigned int i = 0; i < hooks.size(); i++)
{
if (category != hooks[i].category || (category != AE_DSP_MENUHOOK_MISCELLANEOUS &&
!m_ActiveStreamProcess->IsMenuHookModeActive(hooks[i].category, itr->second->GetID(), hooks[i].iRelevantModeId)))
continue;
MenuHookMember menu;
menu.addonId = itr->second->GetID();
menu.hook.category = hooks[i].category;
menu.hook.iHookId = hooks[i].iHookId;
menu.hook.iLocalizedStringId = hooks[i].iLocalizedStringId;
menu.hook.iRelevantModeId = hooks[i].iRelevantModeId;
m_Menus.push_back(menu);
}
}
}
}
for (unsigned int i = 0; i < m_Menus.size(); i++)
{
AE_DSP_ADDON addon;
if (CActiveAEDSP::GetInstance().GetAudioDSPAddon(m_Menus[i].addonId, addon) && category == m_Menus[i].hook.category)
{
std::string modeName = g_localizeStrings.GetAddonString(addon->ID(), m_Menus[i].hook.iLocalizedStringId);
if (modeName.empty())
modeName = g_localizeStrings.Get(15041);
std::string setting = StringUtils::Format("%s%i", SETTING_AUDIO_PROC_SETTINGS_MENUS, i);
AddButton(group, setting, 15041, 0);
}
}
}
示例3: ADSPRemoveMenuHook
void CAddonCallbacksADSP::ADSPRemoveMenuHook(void *addonData, AE_DSP_MENUHOOK *hook)
{
CActiveAEDSPAddon *client = GetAudioDSPAddon(addonData);
if (!hook || !client)
{
CLog::Log(LOGERROR, "Audio DSP - %s - invalid handler data", __FUNCTION__);
return;
}
AE_DSP_MENUHOOKS *hooks = client->GetMenuHooks();
if (hooks)
{
for (unsigned int i = 0; i < hooks->size(); i++)
{
if (hooks->at(i).iHookId == hook->iHookId)
{
/* remove this hook */
hooks->erase(hooks->begin()+i);
break;
}
}
}
}
示例4: GetMenuHooks
bool CActiveAEDSP::GetMenuHooks(int iDSPAddonID, AE_DSP_MENUHOOK_CAT cat, AE_DSP_MENUHOOKS &hooks)
{
bool bReturn(false);
if (iDSPAddonID < 0)
return bReturn;
AE_DSP_ADDON addon;
if (GetReadyAudioDSPAddon(iDSPAddonID, addon) && addon->HaveMenuHooks(cat))
{
AE_DSP_MENUHOOKS *addonhooks = addon->GetMenuHooks();
for (unsigned int i = 0; i < addonhooks->size(); ++i)
{
if (cat == AE_DSP_MENUHOOK_ALL || addonhooks->at(i).category == cat)
{
hooks.push_back(addonhooks->at(i));
bReturn = true;
}
}
}
return bReturn;
}
示例5: cb_remove_menu_hook
void CActiveAEDSPAddon::cb_remove_menu_hook(void *kodiInstance, AE_DSP_MENUHOOK *hook)
{
CActiveAEDSPAddon *client = static_cast<CActiveAEDSPAddon*>(kodiInstance);
if (!hook || !client)
{
CLog::Log(LOGERROR, "Audio DSP - %s - invalid handler data", __FUNCTION__);
return;
}
AE_DSP_MENUHOOKS *hooks = client->GetMenuHooks();
if (hooks)
{
for (unsigned int i = 0; i < hooks->size(); i++)
{
if (hooks->at(i).iHookId == hook->iHookId)
{
/* remove this hook */
hooks->erase(hooks->begin()+i);
break;
}
}
}
}
示例6: InitializeSettings
void CGUIDialogAudioDSPSettings::InitializeSettings()
{
CGUIDialogSettingsManualBase::InitializeSettings();
CSettingCategory *category = AddCategory(SETTING_AUDIO_CAT_MAIN, -1);
if (category == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings category 'audiodspmainsettings'");
return;
}
// get all necessary setting groups
CSettingGroup *groupAudioModeSel = AddGroup(category);
if (groupAudioModeSel == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings group 'groupAudioModeSel'");
return;
}
CSettingGroup *groupAudioVolumeSel = AddGroup(category);
if (groupAudioVolumeSel == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings group 'groupAudioVolumeSel'");
return;
}
CSettingGroup *groupAudioSubmenuSel = AddGroup(category);
if (groupAudioSubmenuSel == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings group 'groupAudioSubmenuSel'");
return;
}
CSettingGroup *groupSaveAsDefault = AddGroup(category);
if (groupSaveAsDefault == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings group 'groupSaveAsDefault'");
return;
}
bool usePopup = g_SkinInfo->HasSkinFile("DialogSlider.xml");
CVideoSettings &videoSettings = CMediaSettings::GetInstance().GetCurrentVideoSettings();
m_audioCaps.clear();
if (g_application.m_pPlayer->HasPlayer())
g_application.m_pPlayer->GetAudioCapabilities(m_audioCaps);
m_ActiveStreamId = CActiveAEDSP::GetInstance().GetActiveStreamId();
m_ActiveStreamProcess = CActiveAEDSP::GetInstance().GetDSPProcess(m_ActiveStreamId);
if (m_ActiveStreamId == (unsigned int)-1 || !m_ActiveStreamProcess)
{
m_iCategory = FindCategoryIndex(SETTING_AUDIO_CAT_MAIN);
Close(true);
return;
}
int modeUniqueId;
m_ActiveStreamProcess->GetMasterModeTypeInformation(m_streamTypeUsed, m_baseTypeUsed, modeUniqueId);
int modesAvailable = 0;
for (int i = 0; i < AE_DSP_ASTREAM_AUTO; i++)
{
m_MasterModes[i].clear();
m_ActiveStreamProcess->GetAvailableMasterModes((AE_DSP_STREAMTYPE)i, m_MasterModes[i]);
if (!m_MasterModes[i].empty()) modesAvailable++;
}
if (modesAvailable > 0)
{
/* about size() > 1, it is always the fallback (ignore of master processing) present. */
StaticIntegerSettingOptions modeEntries;
if (m_MasterModes[AE_DSP_ASTREAM_BASIC].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_BASIC), AE_DSP_ASTREAM_BASIC));
if (m_MasterModes[AE_DSP_ASTREAM_MUSIC].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_MUSIC), AE_DSP_ASTREAM_MUSIC));
if (m_MasterModes[AE_DSP_ASTREAM_MOVIE].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_MOVIE), AE_DSP_ASTREAM_MOVIE));
if (m_MasterModes[AE_DSP_ASTREAM_GAME].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_GAME), AE_DSP_ASTREAM_GAME));
if (m_MasterModes[AE_DSP_ASTREAM_APP].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_APP), AE_DSP_ASTREAM_APP));
if (m_MasterModes[AE_DSP_ASTREAM_MESSAGE].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_MESSAGE), AE_DSP_ASTREAM_MESSAGE));
if (m_MasterModes[AE_DSP_ASTREAM_PHONE].size() > 1)
modeEntries.push_back(std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_PHONE), AE_DSP_ASTREAM_PHONE));
if (modesAvailable > 1 && m_MasterModes[m_streamTypeUsed].size() > 1)
modeEntries.insert(modeEntries.begin(), std::pair<int, int>(CActiveAEDSP::GetInstance().GetStreamTypeName(AE_DSP_ASTREAM_AUTO), AE_DSP_ASTREAM_AUTO));
AddSpinner(groupAudioModeSel,
SETTING_AUDIO_MAIN_STREAMTYPE, 15021, 0,
(AE_DSP_STREAMTYPE)CMediaSettings::GetInstance().GetCurrentAudioSettings().m_MasterStreamTypeSel,
modeEntries);
}
bool AddonMasterModeSetupPresent = false;
m_ModeList.clear();
for (unsigned int i = 0; i < m_MasterModes[m_streamTypeUsed].size(); i++)
{
if (m_MasterModes[m_streamTypeUsed][i])
{
AE_DSP_ADDON addon;
int modeId = m_MasterModes[m_streamTypeUsed][i]->ModeID();
//.........这里部分代码省略.........