Ring Daemon 16.0.0
|
Public Member Functions | |
void | addMainParticipant (Conference &conf) |
void | addWaitingCall (const std::string &id) |
Add incoming callid to the waiting list. | |
void | bindCallToConference (Call &call, Conference &conf) |
template<class T > | |
std::shared_ptr< T > | findAccount (const std::function< bool(const std::shared_ptr< T > &)> &) |
int | getCurrentDeviceIndex (AudioDeviceType type) |
bool | hangupConference (Conference &conf) |
void | initAudioDriver () |
Initialization: Main Thread. | |
void | loadAccount (const YAML::Node &item, int &errorCount) |
ManagerPimpl (Manager &base) | |
bool | parseConfiguration () |
void | playATone (Tone::ToneId toneId) |
Multi Thread. | |
void | processIncomingCall (const std::string &accountId, Call &incomCall) |
void | processRemainingParticipants (Conference &conf) |
Process remaining participant given a conference and the current call ID. | |
void | removeWaitingCall (const std::string &id) |
Remove incoming callid to the waiting list. | |
std::filesystem::path | retrieveConfigPath () const |
Create config directory in home user and return configuration file path. | |
void | sendTextMessageToConference (const Conference &conf, const std::map< std::string, std::string > &messages, const std::string &from) const noexcept |
void | switchCall (const std::string &id) |
void | unsetCurrentCall () |
Static Public Member Functions | |
static void | stripSipPrefix (Call &incomCall) |
Public Attributes | |
std::shared_ptr< AudioLayer > | audiodriver_ {nullptr} |
Audio layer. | |
std::mutex | audioLayerMutex_ |
Mutex used to protect audio layer. | |
std::array< std::atomic_uint, 3 > | audioStreamUsers_ {} |
std::atomic_bool | autoAnswer_ {false} |
Manager & | base_ |
std::string | currentCall_ |
Current Call ID. | |
std::mutex | currentCallMutex_ |
Protected current call access. | |
std::shared_ptr< AudioFrame > | dtmfBuf_ |
Buffer to generate DTMF. | |
std::unique_ptr< DTMF > | dtmfKey_ |
std::atomic_bool | finished_ {false} |
std::map< git_smart_subtransport *, std::unique_ptr< P2PSubTransport > > | gitTransports_ {} |
std::mutex | gitTransportsMtx_ {} |
std::shared_ptr< dhtnet::IceTransportFactory > | ice_tf_ |
std::shared_ptr< asio::io_context > | ioContext_ |
std::thread | ioContextRunner_ |
std::filesystem::path | path_ |
Path of the ConfigFile. | |
std::unique_ptr< RingBufferPool > | ringbufferpool_ |
Instance of the RingBufferPool for the whole application. | |
ScheduledExecutor | scheduler_ {"manager"} |
Main scheduler. | |
std::map< std::string, std::weak_ptr< video::SinkClient > > | sinkMap_ |
std::mutex | sinksMutex_ |
Protected sinks access. | |
std::unique_ptr< SIPVoIPLink > | sipLink_ |
ToneControl | toneCtrl_ |
Application wide tone controller. | |
std::unique_ptr< AudioDeviceGuard > | toneDeviceGuard_ |
std::shared_ptr< dhtnet::upnp::UPnPContext > | upnpContext_ |
std::unique_ptr< VideoManager > | videoManager_ |
CallIDSet | waitingCalls_ |
Waiting Call Vectors. | |
std::mutex | waitingCallsMutex_ |
Protect waiting call list, access by many VoIP/audio threads. | |
Definition at line 256 of file manager.cpp.
|
explicit |
Definition at line 409 of file manager.cpp.
References jami::libav_utils::av_init().
void jami::Manager::ManagerPimpl::addMainParticipant | ( | Conference & | conf | ) |
Definition at line 1401 of file manager.cpp.
References jami::Conference::attachHost(), jami::Conference::getAccountId(), jami::Conference::getConfId(), and jami::Conference::getStateStr().
Add incoming callid to the waiting list.
id | std::string to add |
Definition at line 572 of file manager.cpp.
References jami::emitSignal().
void jami::Manager::ManagerPimpl::bindCallToConference | ( | Call & | call, |
Conference & | conf | ||
) |
Definition at line 642 of file manager.cpp.
References jami::emitSignal(), jami::Call::getAccountId(), jami::Call::getAudioStreams(), jami::Call::getCallId(), jami::Call::getStateStr(), jami::Call::isConferenceParticipant(), JAMI_DEBUG, and JAMI_WARNING.
std::shared_ptr< T > jami::Manager::ManagerPimpl::findAccount | ( | const std::function< bool(const std::shared_ptr< T > &)> & | ) |
int jami::Manager::ManagerPimpl::getCurrentDeviceIndex | ( | AudioDeviceType | type | ) |
Definition at line 468 of file manager.cpp.
References jami::CAPTURE, jami::emitSignal(), jami::PLAYBACK, and jami::RINGTONE.
bool jami::Manager::ManagerPimpl::hangupConference | ( | Conference & | conf | ) |
Definition at line 1411 of file manager.cpp.
References jami::Conference::detachHost(), jami::Conference::getAccount(), jami::Call::getAccountId(), jami::Conference::getConfId(), jami::Conference::getSubCalls(), and JAMI_DEBUG.
void jami::Manager::ManagerPimpl::initAudioDriver | ( | ) |
Initialization: Main Thread.
Definition at line 2480 of file manager.cpp.
References audiodriver_, jami::Manager::audioPreference, audioStreamUsers_, base_, jami::CAPTURE, jami::AudioPreference::createAudioLayer(), jami::emitSignal(), jami::PLAYBACK, and jami::RINGTONE.
Definition at line 591 of file manager.cpp.
References jami::ACCOUNT_TYPE_SIP, jami::emitSignal(), JAMI_ERROR, jami::yaml_utils::parseValue(), and jami::yaml_utils::parseValueOptional().
bool jami::Manager::ManagerPimpl::parseConfiguration | ( | ) |
Definition at line 424 of file manager.cpp.
References jami::emitSignal(), and JAMI_WARN.
void jami::Manager::ManagerPimpl::playATone | ( | Tone::ToneId | toneId | ) |
Multi Thread.
Definition at line 450 of file manager.cpp.
References jami::emitSignal(), JAMI_ERR, and jami::PLAYBACK.
void jami::Manager::ManagerPimpl::processIncomingCall | ( | const std::string & | accountId, |
Call & | incomCall | ||
) |
Definition at line 2508 of file manager.cpp.
References jami::ACCOUNT_TYPE_JAMI, jami::Manager::bindCallToConference(), jami::emitSignal(), JAMI_DEBUG, JAMI_ERR, JAMI_WARNING, jami::MediaAttribute::mediaAttributesToMediaMaps(), and jami::Call::RINGING.
void jami::Manager::ManagerPimpl::processRemainingParticipants | ( | Conference & | conf | ) |
Process remaining participant given a conference and the current call ID.
Mainly called when a participant is detached or call ended (hang up).
current | call id |
conference | pointer |
Definition at line 485 of file manager.cpp.
References jami::Conference::ACTIVE_ATTACHED, jami::RingBufferPool::DEFAULT_ID, jami::emitSignal(), jami::Call::getAccount(), jami::Call::getAudioStreams(), jami::Call::getCallId(), JAMI_DBG, JAMI_DEBUG, and JAMI_ERR.
Remove incoming callid to the waiting list.
id | std::string to remove |
Definition at line 582 of file manager.cpp.
References jami::emitSignal().
std::filesystem::path jami::Manager::ManagerPimpl::retrieveConfigPath | ( | ) | const |
Create config directory in home user and return configuration file path.
Initialization: Main Thread.
Definition at line 551 of file manager.cpp.
References jami::fileutils::get_config_dir().
|
noexcept |
Definition at line 616 of file manager.cpp.
References jami::emitSignal(), and JAMI_ERR.
Definition at line 2493 of file manager.cpp.
References jami::emitSignal().
Definition at line 564 of file manager.cpp.
References jami::emitSignal(), and JAMI_DBG.
void jami::Manager::ManagerPimpl::unsetCurrentCall | ( | ) |
Definition at line 558 of file manager.cpp.
std::shared_ptr<AudioLayer> jami::Manager::ManagerPimpl::audiodriver_ {nullptr} |
std::mutex jami::Manager::ManagerPimpl::audioLayerMutex_ |
Mutex used to protect audio layer.
Definition at line 362 of file manager.cpp.
std::array<std::atomic_uint, 3> jami::Manager::ManagerPimpl::audioStreamUsers_ {} |
Definition at line 346 of file manager.cpp.
Referenced by initAudioDriver().
std::atomic_bool jami::Manager::ManagerPimpl::autoAnswer_ {false} |
Definition at line 329 of file manager.cpp.
Manager& jami::Manager::ManagerPimpl::base_ |
Definition at line 319 of file manager.cpp.
Referenced by initAudioDriver().
std::string jami::Manager::ManagerPimpl::currentCall_ |
Current Call ID.
Definition at line 336 of file manager.cpp.
std::mutex jami::Manager::ManagerPimpl::currentCallMutex_ |
Protected current call access.
Definition at line 339 of file manager.cpp.
std::shared_ptr<AudioFrame> jami::Manager::ManagerPimpl::dtmfBuf_ |
Buffer to generate DTMF.
Definition at line 352 of file manager.cpp.
std::unique_ptr<DTMF> jami::Manager::ManagerPimpl::dtmfKey_ |
Definition at line 349 of file manager.cpp.
std::atomic_bool jami::Manager::ManagerPimpl::finished_ {false} |
Definition at line 389 of file manager.cpp.
std::map<git_smart_subtransport*, std::unique_ptr<P2PSubTransport> > jami::Manager::ManagerPimpl::gitTransports_ {} |
Definition at line 406 of file manager.cpp.
std::mutex jami::Manager::ManagerPimpl::gitTransportsMtx_ {} |
Definition at line 405 of file manager.cpp.
std::shared_ptr<dhtnet::IceTransportFactory> jami::Manager::ManagerPimpl::ice_tf_ |
Definition at line 392 of file manager.cpp.
std::shared_ptr<asio::io_context> jami::Manager::ManagerPimpl::ioContext_ |
Definition at line 321 of file manager.cpp.
std::thread jami::Manager::ManagerPimpl::ioContextRunner_ |
Definition at line 322 of file manager.cpp.
std::filesystem::path jami::Manager::ManagerPimpl::path_ |
Path of the ConfigFile.
Definition at line 377 of file manager.cpp.
std::unique_ptr<RingBufferPool> jami::Manager::ManagerPimpl::ringbufferpool_ |
Instance of the RingBufferPool for the whole application.
In order to send signal to other parts of the application, one must pass through the RingBufferMananger. Audio instances must be registered into the RingBufferMananger and bound together via the Manager.
Definition at line 387 of file manager.cpp.
ScheduledExecutor jami::Manager::ManagerPimpl::scheduler_ {"manager"} |
Main scheduler.
Definition at line 327 of file manager.cpp.
std::map<std::string, std::weak_ptr<video::SinkClient> > jami::Manager::ManagerPimpl::sinkMap_ |
Definition at line 395 of file manager.cpp.
std::mutex jami::Manager::ManagerPimpl::sinksMutex_ |
Protected sinks access.
Definition at line 342 of file manager.cpp.
std::unique_ptr<SIPVoIPLink> jami::Manager::ManagerPimpl::sipLink_ |
Definition at line 399 of file manager.cpp.
ToneControl jami::Manager::ManagerPimpl::toneCtrl_ |
Application wide tone controller.
Definition at line 332 of file manager.cpp.
std::unique_ptr<AudioDeviceGuard> jami::Manager::ManagerPimpl::toneDeviceGuard_ |
Definition at line 333 of file manager.cpp.
std::shared_ptr<dhtnet::upnp::UPnPContext> jami::Manager::ManagerPimpl::upnpContext_ |
Definition at line 324 of file manager.cpp.
std::unique_ptr<VideoManager> jami::Manager::ManagerPimpl::videoManager_ |
Definition at line 397 of file manager.cpp.
CallIDSet jami::Manager::ManagerPimpl::waitingCalls_ |
Waiting Call Vectors.
Definition at line 367 of file manager.cpp.
std::mutex jami::Manager::ManagerPimpl::waitingCallsMutex_ |
Protect waiting call list, access by many VoIP/audio threads.
Definition at line 372 of file manager.cpp.