manager.cpp: cleanup

Change-Id: Ied16cc4536b4abe4740bfa76beb6e2fb1210439e
This commit is contained in:
ovari123
2025-01-21 16:47:39 -04:00
committed by ovari123@zoho.com
parent 9b3b9df344
commit d825759a1b

View File

@ -294,8 +294,8 @@ struct Manager::ManagerPimpl
int getCurrentDeviceIndex(AudioDeviceType type);
/**
* Process remaining participant given a conference and the current call id.
* Mainly called when a participant is detached or hagned up
* Process remaining participant given a conference and the current call ID.
* Mainly called when a participant is detached or call ended (hang up).
* @param current call id
* @param conference pointer
*/
@ -393,7 +393,7 @@ struct Manager::ManagerPimpl
CallIDSet waitingCalls_;
/**
* Protect waiting call list, access by many voip/audio threads
* Protect waiting call list, access by many VoIP/audio threads
*/
std::mutex waitingCallsMutex_;
@ -489,7 +489,7 @@ Manager::ManagerPimpl::playATone(Tone::ToneId toneId)
std::lock_guard lock(audioLayerMutex_);
if (not audiodriver_) {
JAMI_ERR("Audio layer not initialized");
JAMI_ERR("Uninitialized audio layer");
return;
}
@ -599,7 +599,7 @@ void
Manager::ManagerPimpl::switchCall(const std::string& id)
{
std::lock_guard m(currentCallMutex_);
JAMI_DBG("----- Switch current call id to '%s' -----", not id.empty() ? id.c_str() : "none");
JAMI_DBG("----- Switch current call ID to '%s' -----", not id.empty() ? id.c_str() : "none");
currentCall_ = id;
}
@ -716,7 +716,7 @@ Manager::instance()
// This will give a warning that can be ignored the first time instance()
// is called… subsequent warnings are more serious
if (not Manager::initialized)
JAMI_DBG("Not initialized");
JAMI_DBG("Uninitialized");
return instance;
}
@ -954,9 +954,9 @@ Manager::monitor(bool continuous)
{
Logger::setMonitorLog(true);
JAMI_DBG("############## START MONITORING ##############");
JAMI_DBG("Using PJSIP version %s for %s", pj_get_version(), PJ_OS_NAME);
JAMI_DBG("Using GnuTLS version %s", gnutls_check_version(nullptr));
JAMI_DBG("Using OpenDHT version %s", dht::version());
JAMI_DBG("Using PJSIP version: %s for %s", pj_get_version(), PJ_OS_NAME);
JAMI_DBG("Using GnuTLS version: %s", gnutls_check_version(nullptr));
JAMI_DBG("Using OpenDHT version: %s", dht::version());
#ifdef __linux__
#if defined(__ANDROID__)
@ -1543,7 +1543,7 @@ Manager::createConfFromParticipantList(const std::string& accountId,
return;
}
// we must at least have 2 participant for a conference
// we must have at least 2 participant for a conference
if (participantList.size() <= 1) {
JAMI_ERR("Participant number must be greater than or equal to 2");
return;
@ -1651,13 +1651,13 @@ Manager::joinConference(const std::string& accountId,
auto conf = account->getConference(confId1);
if (not conf) {
JAMI_ERR("Not a valid conference ID: %s", confId1.c_str());
JAMI_ERR("Invalid conference ID: %s", confId1.c_str());
return false;
}
auto conf2 = account2->getConference(confId2);
if (not conf2) {
JAMI_ERR("Not a valid conference ID: %s", confId2.c_str());
JAMI_ERR("Invalid conference ID: %s", confId2.c_str());
return false;
}
@ -1706,7 +1706,7 @@ Manager::addAudio(Call& call)
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (!pimpl_->audiodriver_) {
JAMI_ERROR("Audio driver not initialized");
JAMI_ERROR("Uninitialized audio driver");
return;
}
pimpl_->audiodriver_->flushUrgent();
@ -2207,7 +2207,7 @@ Manager::setAudioDevice(int index, AudioDeviceType type)
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (not pimpl_->audiodriver_) {
JAMI_ERR("Audio driver not initialized");
JAMI_ERR("Uninitialized audio driver");
return;
}
if (pimpl_->getCurrentDeviceIndex(type) == index) {
@ -2232,7 +2232,7 @@ Manager::getAudioOutputDeviceList()
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (not pimpl_->audiodriver_) {
JAMI_ERR("Audio layer not initialized");
JAMI_ERR("Uninitialized audio layer");
return {};
}
@ -2248,7 +2248,7 @@ Manager::getAudioInputDeviceList()
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (not pimpl_->audiodriver_) {
JAMI_ERR("Audio layer not initialized");
JAMI_ERR("Uninitialized audio layer");
return {};
}
@ -2263,7 +2263,7 @@ Manager::getCurrentAudioDevicesIndex()
{
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (not pimpl_->audiodriver_) {
JAMI_ERR("Audio layer not initialized");
JAMI_ERR("Uninitialized audio layer");
return {};
}
@ -2448,7 +2448,7 @@ Manager::getAudioInputDeviceIndex(const std::string& name)
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (not pimpl_->audiodriver_) {
JAMI_ERR("Audio layer not initialized");
JAMI_ERR("Uninitialized audio layer");
return 0;
}
@ -2461,7 +2461,7 @@ Manager::getAudioOutputDeviceIndex(const std::string& name)
std::lock_guard lock(pimpl_->audioLayerMutex_);
if (not pimpl_->audiodriver_) {
JAMI_ERR("Audio layer not initialized");
JAMI_ERR("Uninitialized audio layer");
return 0;
}
@ -2678,7 +2678,7 @@ Manager::audioFormatUsed(AudioFormat format)
void
Manager::setAccountsOrder(const std::string& order)
{
JAMI_DBG("Set accounts order : %s", order.c_str());
JAMI_DBG("Set accounts order: %s", order.c_str());
// Set the new config
preferences.setAccountOrder(order);
@ -3083,7 +3083,7 @@ Manager::newOutgoingCall(std::string_view toUrl,
}
if (not account->isUsable()) {
JAMI_WARN("Account %s is not usable", accountId.c_str());
JAMI_WARN("Account %s is unusable", accountId.c_str());
return {};
}
@ -3153,7 +3153,7 @@ Manager::createSinkClients(
}
}
// remove any non used video sink
// remove unused video sinks
for (auto it = sinksMap.begin(); it != sinksMap.end();) {
if (sinkIdsList.find(it->first) == sinkIdsList.end()) {
for (auto& videoStream : videoStreams)