|
Ring Daemon
|
This class provides the interface between loaded MediaHandlers and call's audio/video streams. More...
#include <callservicesmanager.h>

Public Member Functions | |
| CallServicesManager (PluginManager &pluginManager) | |
| Constructor registers MediaHandler API services to the PluginManager instance. | |
| void | clearAVSubject (const std::string &callId) |
| Clears all stream subjects related to the callId. | |
| void | clearCallHandlerMaps (const std::string &callId) |
| Removes call from mediaHandlerToggled_ mapping. | |
| void | createAVSubject (const StreamData &data, AVSubjectSPtr subject) |
| Stores a AV stream subject with StreamData properties. | |
| std::map< std::string, std::string > | getCallMediaHandlerDetails (const std::string &mediaHandlerIdStr) |
| Returns details Map from MediaHandler implementation. | |
| std::vector< std::string > | getCallMediaHandlers () |
| List all MediaHandlers available. | |
| std::vector< std::string > | getCallMediaHandlerStatus (const std::string &callId) |
| Returns a list of active MediaHandlers for a given call. | |
| NON_COPYABLE (CallServicesManager) | |
| bool | setPreference (const std::string &key, const std::string &value, const std::string &rootPath) |
| Sets a preference that may be changed while MediaHandler is active. | |
| void | toggleCallMediaHandler (const std::string &mediaHandlerId, const std::string &callId, const bool toggle) |
| (De)Activates a given MediaHandler to a given call. | |
| ~CallServicesManager () | |
This class provides the interface between loaded MediaHandlers and call's audio/video streams.
Besides it: (1) stores pointers to all loaded MediaHandlers; (2) stores pointers to available streams subjects, and; (3) lists MediaHandler state with respect to each call. In other words, for a given call, we store if a MediaHandler is active or not.
Definition at line 42 of file callservicesmanager.h.
| jami::CallServicesManager::CallServicesManager | ( | PluginManager & | pluginManager | ) |
Constructor registers MediaHandler API services to the PluginManager instance.
These services will store MediaHandler pointers or clean them from the Plugin System once a plugin is loaded or unloaded.
| pluginManager |
Definition at line 30 of file callservicesmanager.cpp.
References jami::emitSignal().

| jami::CallServicesManager::~CallServicesManager | ( | ) |
Definition at line 35 of file callservicesmanager.cpp.
Clears all stream subjects related to the callId.
| callId |
Definition at line 84 of file callservicesmanager.cpp.
Removes call from mediaHandlerToggled_ mapping.
| callId |
Definition at line 228 of file callservicesmanager.cpp.
| void jami::CallServicesManager::createAVSubject | ( | const StreamData & | data, |
| AVSubjectSPtr | subject | ||
| ) |
Stores a AV stream subject with StreamData properties.
During the storage process, if a MediaHandler is supposed to be activated for the call to which the subject is related, the activation function is called.
| data | |
| subject |
Definition at line 43 of file callservicesmanager.cpp.
References DIR_SEPARATOR_CH, StreamData::direction, jami::emitSignal(), jami::PluginPreferencesUtils::getAlwaysPreference(), StreamData::id, StreamData::source, toggleCallMediaHandler(), and StreamData::type.

| std::map< std::string, std::string > jami::CallServicesManager::getCallMediaHandlerDetails | ( | const std::string & | mediaHandlerIdStr | ) |
Returns details Map from MediaHandler implementation.
| mediaHandlerIdStr |
Definition at line 159 of file callservicesmanager.cpp.
References jami::emitSignal().

| std::vector< std::string > jami::CallServicesManager::getCallMediaHandlers | ( | ) |
List all MediaHandlers available.
Definition at line 136 of file callservicesmanager.cpp.
References jami::emitSignal().

| std::vector< std::string > jami::CallServicesManager::getCallMediaHandlerStatus | ( | const std::string & | callId | ) |
Returns a list of active MediaHandlers for a given call.
| callId |
Definition at line 201 of file callservicesmanager.cpp.
References jami::emitSignal().

| jami::CallServicesManager::NON_COPYABLE | ( | CallServicesManager | ) |
| bool jami::CallServicesManager::setPreference | ( | const std::string & | key, |
| const std::string & | value, | ||
| const std::string & | rootPath | ||
| ) |
Sets a preference that may be changed while MediaHandler is active.
| key | |
| value | |
| rootPath |
Definition at line 213 of file callservicesmanager.cpp.
References jami::emitSignal().
Referenced by jami::JamiPluginManager::setPluginPreference().

| void jami::CallServicesManager::toggleCallMediaHandler | ( | const std::string & | mediaHandlerId, |
| const std::string & | callId, | ||
| const bool | toggle | ||
| ) |
(De)Activates a given MediaHandler to a given call.
If the MediaHandler receives video frames from a hardware decoder, we need to restart the sender to unlink our encoder and decoder. When we deactivate a MediaHandler, we try to relink the encoder and decoder by restarting the sender.
| mediaHandlerId | |
| callId | |
| toggle | notify with new subjects if true, detach if false. |
Definition at line 147 of file callservicesmanager.cpp.
References jami::emitSignal(), JAMI_ERR, and toggleCallMediaHandler().
Referenced by createAVSubject(), and toggleCallMediaHandler().
