LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::MediaProcessors Class Reference

#include <common/MediaProcessors/MediaProcessors.h>

Inheritance diagram for Lima::MediaProcessors:
Lima::Singleton< MediaProcessors >

Public Member Functions

virtual ~MediaProcessors ()
std::shared_ptr< MediaProcessUnitPipeline > getPipelineForId (MediaId med, const std::string &id) const
 get the pipeline for the given id and media
std::shared_ptr< MediaAnalysisDumper > getAnalysisDumperForId (MediaId med, const std::string &type) const
 get the dumper for the given id and media
void initMedia (MediaId, Common::XMLConfigurationFiles::ModuleConfigurationStructure &procConf)
 (re)initialize the process units manager of a media.
void initPipelines (Common::XMLConfigurationFiles::GroupConfigurationStructure &confModule, const std::deque< std::string > &pipelines)
void releaseMedia (MediaId med)
 release the pipelines and the process units (and thus the models they loaded) of a media.
void getAvailableMedia (std::set< MediaId > &ids) const
void getAvailablePipelinesForMedia (MediaId id, std::set< std::string > &pipelines) const
const std::map< MediaId, MediaProcessUnit::Manager * > & managers () const
Public Member Functions inherited from Lima::Singleton< MediaProcessors >
 Singleton ()=default
virtual ~Singleton ()=default

Friends

class Singleton< MediaProcessors >

Additional Inherited Members

Static Public Member Functions inherited from Lima::Singleton< MediaProcessors >
static const MediaProcessors & single ()
 const singleton accessor
static const MediaProcessors * psingle ()
static MediaProcessors & changeable ()
 singleton accessor
static MediaProcessors * pchangeable ()

Detailed Description

Definition at line 33 of file MediaProcessors.h.

Constructor & Destructor Documentation

◆ ~MediaProcessors()

Lima::MediaProcessors::~MediaProcessors ( )
virtual

Definition at line 78 of file MediaProcessors.cpp.

Member Function Documentation

◆ getAnalysisDumperForId()

std::shared_ptr< MediaAnalysisDumper > Lima::MediaProcessors::getAnalysisDumperForId ( MediaId med,
const std::string & type ) const

get the dumper for the given id and media

Parameters
medmedia requested
typedumper id
Returns
ObjetAnalysisDumper*
Return values
0if can't get the corresponding dumper

Definition at line 311 of file MediaProcessors.cpp.

◆ getAvailableMedia()

void Lima::MediaProcessors::getAvailableMedia ( std::set< MediaId > & ids) const

Definition at line 334 of file MediaProcessors.cpp.

◆ getAvailablePipelinesForMedia()

void Lima::MediaProcessors::getAvailablePipelinesForMedia ( MediaId id,
std::set< std::string > & pipelines ) const

Definition at line 346 of file MediaProcessors.cpp.

◆ getPipelineForId()

std::shared_ptr< MediaProcessUnitPipeline > Lima::MediaProcessors::getPipelineForId ( MediaId med,
const std::string & id ) const

get the pipeline for the given id and media

Parameters
medmedia requested
idpipeline id
Returns
ProcessUnitPipeline*
Return values
0if can't get the corresponding pipeline

Definition at line 286 of file MediaProcessors.cpp.

◆ initMedia()

void Lima::MediaProcessors::initMedia ( MediaId med,
Common::XMLConfigurationFiles::ModuleConfigurationStructure & procConf )

(re)initialize the process units manager of a media.

A media already initialized has its process units (and the models they loaded) released first, then rebuilt from procConf: the pipelines it had are instantiated again by the next call to initPipelines, which must follow.

Definition at line 101 of file MediaProcessors.cpp.

◆ initPipelines()

void Lima::MediaProcessors::initPipelines ( Common::XMLConfigurationFiles::GroupConfigurationStructure & confModule,
const std::deque< std::string > & pipelines )

Definition at line 134 of file MediaProcessors.cpp.

◆ managers()

const std::map< MediaId, MediaProcessUnit::Manager * > & Lima::MediaProcessors::managers ( ) const

Definition at line 96 of file MediaProcessors.cpp.

◆ releaseMedia()

void Lima::MediaProcessors::releaseMedia ( MediaId med)

release the pipelines and the process units (and thus the models they loaded) of a media.

Its pipelines are no longer available until it is initialized again (initMedia then initPipelines).

Definition at line 277 of file MediaProcessors.cpp.

◆ Singleton< MediaProcessors >

friend class Singleton< MediaProcessors >
friend

Definition at line 33 of file MediaProcessors.h.


The documentation for this class was generated from the following files: