Skip to content

Commit

Permalink
changed the function args from pipeline object to name (#365)
Browse files Browse the repository at this point in the history
Co-authored-by: Kushal Jain <[email protected]>
  • Loading branch information
ankushj8 and kushaljain-apra authored Jul 25, 2024
1 parent 62d7a07 commit 19190c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit 19190c3

Please sign in to comment.