Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the function args from pipeline object to name #365

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base/include/AbsControlModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class AbsControlModule : public Module {
~AbsControlModule();
bool init();
bool term();
std::string enrollModule(boost::shared_ptr<PipeLine> p, std::string role,
std::string enrollModule(std::string pName, std::string role,
boost::shared_ptr<Module> module);
std::pair<bool, boost::shared_ptr<Module>> getModuleofRole(PipeLine p,
std::pair<bool, boost::shared_ptr<Module>> getModuleofRole(std::string pName,
std::string role);
virtual void handleMp4MissingVideotrack(std::string previousVideoFile, std::string nextVideoFile) {}
virtual void handleMMQExport(Command cmd, bool priority = false) {}
Expand Down
10 changes: 5 additions & 5 deletions base/src/AbsControlModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ bool AbsControlModule::process(frame_container& frames)
return true;
}

std::string AbsControlModule::enrollModule(boost::shared_ptr<PipeLine> p, std::string role, boost::shared_ptr<Module> module)
std::string AbsControlModule::enrollModule(std::string pName, std::string role, boost::shared_ptr<Module> module)
{
std::string pipelineRole = mDetail->getPipelineRole(p->getName(), role);
std::string pipelineRole = mDetail->getPipelineRole(pName, role);
if (moduleRoles.find(pipelineRole) != moduleRoles.end())
{
std::string errMsg = "Enrollment Failed: This role <" + role + "> already registered with the Module <" + moduleRoles[pipelineRole]->getName() + "> in PipeLine <" + p->getName() + ">";
std::string errMsg = "Enrollment Failed: This role <" + role + "> already registered with the Module <" + moduleRoles[pipelineRole]->getName() + "> in PipeLine <" + pName + ">";
LOG_ERROR << errMsg;
throw AIPException(MODULE_ENROLLMENT_FAILED, errMsg);
}
moduleRoles[pipelineRole] = module;
return pipelineRole;
}

std::pair<bool, boost::shared_ptr<Module>> AbsControlModule::getModuleofRole(PipeLine p, std::string role)
std::pair<bool, boost::shared_ptr<Module>> AbsControlModule::getModuleofRole(std::string pName, std::string role)
{
std::string pipelineRole = mDetail->getPipelineRole(p.getName(), role);
std::string pipelineRole = mDetail->getPipelineRole(pName, role);
if (moduleRoles.find(pipelineRole) == moduleRoles.end())
{
return std::make_pair<bool, boost::shared_ptr<Module>>(false, nullptr);
Expand Down
Loading