本文整理汇总了C++中AE_DSP_MENUHOOKS类的典型用法代码示例。如果您正苦于以下问题:C++ AE_DSP_MENUHOOKS类的具体用法?C++ AE_DSP_MENUHOOKS怎么用?C++ AE_DSP_MENUHOOKS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AE_DSP_MENUHOOKS类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: GetAudioDSPAddon
void CAddonCallbacksADSP::ADSPAddMenuHook(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)
{
AE_DSP_MENUHOOK hookInt;
hookInt.iHookId = hook->iHookId;
hookInt.iLocalizedStringId = hook->iLocalizedStringId;
hookInt.category = hook->category;
hookInt.iRelevantModeId = hook->iRelevantModeId;
hookInt.bNeedPlayback = hook->bNeedPlayback;
/* add this new hook */
hooks->push_back(hookInt);
}
}
示例4: bReturn
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: cb_add_menu_hook
void CActiveAEDSPAddon::cb_add_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)
{
AE_DSP_MENUHOOK hookInt;
hookInt.iHookId = hook->iHookId;
hookInt.iLocalizedStringId = hook->iLocalizedStringId;
hookInt.category = hook->category;
hookInt.iRelevantModeId = hook->iRelevantModeId;
hookInt.bNeedPlayback = hook->bNeedPlayback;
/* add this new hook */
hooks->push_back(hookInt);
}
}
示例7: AddCategory
//.........这里部分代码省略.........
AddButton(groupAudioSubmenuSel, SETTING_AUDIO_MAIN_BUTTON_INFO, 15027, 0, false, true, -1);
///-----------------------
AddButton(groupSaveAsDefault, SETTING_AUDIO_MAIN_MAKE_DEFAULT, 12376, 0);
m_Menus.clear();
/**
* Audio Master mode settings Dialog init
*/
{
CSettingCategory *categoryMaster = AddCategory(SETTING_AUDIO_CAT_MASTER, -1);
if (categoryMaster == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings category 'audiodspmastersettings'");
return;
}
CSettingGroup *groupMasterMode = AddGroup(categoryMaster);
if (groupMasterMode == NULL)
{
CLog::Log(LOGERROR, "CGUIDialogAudioDSPSettings: unable to setup settings group 'groupMasterMode'");
return;
}
for (unsigned int i = 0; i < m_MasterModes[m_streamTypeUsed].size(); i++)
{
if (m_MasterModes[m_streamTypeUsed][i]->HasSettingsDialog())
{
AE_DSP_ADDON addon;
if (CActiveAEDSP::GetInstance().GetAudioDSPAddon(m_MasterModes[m_streamTypeUsed][i]->AddonID(), addon))
{
AE_DSP_MENUHOOKS hooks;
if (CActiveAEDSP::GetInstance().GetMenuHooks(m_MasterModes[m_streamTypeUsed][i]->AddonID(), AE_DSP_MENUHOOK_MASTER_PROCESS, hooks))
{
for (unsigned int j = 0; j < hooks.size(); j++)
{
if (hooks[j].iRelevantModeId != m_MasterModes[m_streamTypeUsed][i]->AddonModeNumber())
continue;
MenuHookMember menu;
menu.addonId = m_MasterModes[m_streamTypeUsed][i]->AddonID();
menu.hook.category = hooks[j].category;
menu.hook.iHookId = hooks[j].iHookId;
menu.hook.iLocalizedStringId = hooks[j].iLocalizedStringId;
menu.hook.iRelevantModeId = hooks[j].iRelevantModeId;
m_Menus.push_back(menu);
std::string setting = StringUtils::Format("%s%i", SETTING_AUDIO_MASTER_SETTINGS_MENUS, (int)m_Menus.size()-1);
AddButton(groupMasterMode, setting, 15041, 0);
break;
}
}
}
}
}
}
/**
* Audio post processing settings Dialog init
*/
{
CSettingCategory *category = AddCategory(SETTING_AUDIO_CAT_POST_PROCESS, -1);
if (category == NULL)
{