Detailed Description
The PPluginManager class is the manager for all Papillon plugins (singleton); thread-safe.
Its main role is to load/unload Papillon plugins and to instantiate Papillon objects managed by these plugins like Analytics components, Input or Output video streams, Image filters, etc.
Definition at line 44 of file PPluginManager.h.
#include <PPluginManager.h>
Member Enumeration Documentation
◆ EPluginFilter
Filters to get a sub-list of plugins.
Enumerator | |
---|---|
E_ANALYTICS | |
E_DESCRIBER | |
E_DETECTOR | |
E_FRAME_TO_FRAME_TRACKER | |
E_IMAGE_FILTER | |
E_INPUT_VIDEO_STREAM | |
E_OUTPUT_VIDEO_STREAM | |
E_ALL |
Definition at line 49 of file PPluginManager.h.
Constructor & Destructor Documentation
◆ ~PPluginManager()
|
virtual |
Destroys this object.
Member Function Documentation
◆ About()
|
static |
Returns general information about this plugin, including product name, product version, product global id and a brief description.
Loads the specified plugin, gets info, then unloads plugin. Returns PResult::OK if success, another result otherwise.
◆ Clear()
PResult PPluginManager::Clear | ( | ) |
Unloads all plugins.
◆ CreateAnalytics()
PResult PPluginManager::CreateAnalytics | ( | const PString & | productName, |
const PProperties & | parameters, | ||
PAnalytics & | analytics | ||
) | const |
Creates a PAnalytics instance from the plugin with the specified product name (this method is a factory).
Returns PResult::C_OK if success, another result otherwise.
◆ CreateDescriber()
PResult PPluginManager::CreateDescriber | ( | const PString & | productName, |
const PProperties & | parameters, | ||
PDescriber & | describer | ||
) | const |
Creates a PDescriber instance from the plugin with the specified product name (this method is a factory).
Returns PResult::C_OK if success, another result otherwise.
◆ CreateDetector()
PResult PPluginManager::CreateDetector | ( | const PString & | productName, |
const PProperties & | parameters, | ||
const PString & | parametersPrefix, | ||
PDetector & | detector | ||
) | const |
Creates a PDetector instance from the plugin with the specified product name (this method is a factory).
Returns PResult::C_OK if success, another result otherwise.
◆ CreateFrameToFrameTracker() [1/2]
PResult PPluginManager::CreateFrameToFrameTracker | ( | const PString & | productName, |
const PProperties & | parameters, | ||
PFrameToFrameTracker & | frameToFrameTracker | ||
) | const |
Creates a PFrameToFrameTracker from the specified product and parameters (this method is a factory).
This factory iterates over all loaded plugins to find the first one which matches the arguments.
Returns PResult::C_OK if success, another result otherwise.
◆ CreateFrameToFrameTracker() [2/2]
PResult PPluginManager::CreateFrameToFrameTracker | ( | const PString & | productName, |
const PString & | parameters, | ||
PFrameToFrameTracker & | frameToFrameTracker | ||
) | const |
Creates a PFrameToFrameTracker from the specified product and parameters (this method is a factory).
This factory iterates over all loaded plugins to find the first one which matches the arguments.
Returns PResult::C_OK if success, another result otherwise.
◆ CreateImageFilter()
PResult PPluginManager::CreateImageFilter | ( | const PString & | productName, |
const PProperties & | parameters, | ||
PImageFilter & | imageFilter | ||
) | const |
Creates a PImageFilter from the specified product and parameters (this method is a factory).
This factory iterates over all loaded plugins to find the first one which matches the arguments.
Returns PResult::C_OK if success, another result otherwise.
◆ GetBasicPath()
PString PPluginManager::GetBasicPath | ( | ) | const |
Gets the first registered path used to find plugins.
◆ GetInstance()
|
static |
Returns the only instance of this manager.
◆ GetListPluginNames()
PStringList PPluginManager::GetListPluginNames | ( | int32 | filter = E_ALL | ) | const |
Gets the list (or a sub-list) of plugin names.
By default, returns the full list of plugins. Example: to get the list of all currently loaded Analytics plugins, use: GetListPlugin(E_ANALYTICS).
◆ GetListPlugins()
Gets the list (or a sub-list) of plugins (PPlugin objects).
By default, returns the full list of plugins. Example: to get the list of all currently loaded Analytics plugins, use: GetListPlugin(E_ANALYTICS).
◆ GetPlugin()
Returns the first plugin handled by the plugin manager which has the specified product name.
Returns an empty plugin if not found.
◆ Load()
Loads the specified plugin.
Returns PResult::C_OK if success, another result otherwise.
◆ LoadAll()
Loads all available plugins from the specified list of paths.
(use ';' to separate paths).
WARNING: If you are using the debug (resp. release) version of this library, only debug (resp. release) version of plugins will be loaded.
Returns PResult::C_OK if success, another result otherwise.
◆ LogAvailablePlugins()
void PPluginManager::LogAvailablePlugins | ( | PLog::ELogLevel | level | ) | const |
Writes some log messages to describe all loaded plugins.
◆ OpenInputVideoStream()
PResult PPluginManager::OpenInputVideoStream | ( | const PUri & | uri, |
PInputVideoStream & | inputVideoStream | ||
) | const |
Creates a PInputVideoStream instance from given URI.
A specific decoder can be specified in the URI string as in "earth.mp4?decode_with=ffmpeg". If 'decode_with' query string is not given, one that can create the specified stream will be picked.
Returns PResult::C_OK if success, another result otherwise.
◆ OpenOutputVideoStream()
PResult PPluginManager::OpenOutputVideoStream | ( | const PUri & | uri, |
POutputVideoStream & | outputVideoStream | ||
) | const |
Creates a POutputVideoStream instance from given URI.
A specific encoder can be specified in the URI string as in "output.mp4?encode_with=ffmpeg". If 'encode_with' query string is not given, one that can create the specified stream will be picked.
Returns PResult::C_OK if success, another result otherwise.
◆ Size()
int32 PPluginManager::Size | ( | ) | const |
Returns the number of plugins currently loaded.
◆ ToBriefString()
PString PPluginManager::ToBriefString | ( | ) | const |
Returns a brief description of the state of this object as a string.
◆ Unload()
Unloads the specified plugin.
Returns PResult::C_OK if success, another result otherwise.