Skip to content
Snippets Groups Projects
Commit 32c0c8d7 authored by Adrien Béraud's avatar Adrien Béraud Committed by Philippe Gorley
Browse files

video_rtp_session: don't start sender if unable to open camera


Change-Id: Ib25362e474af6cecee59c4d3738473bfafcd766f
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent be8c5391
Branches
No related tags found
No related merge requests found
......@@ -98,14 +98,18 @@ void VideoRtpSession::startSender()
if (newParams.valid() &&
newParams.wait_for(NEWPARAMS_TIMEOUT) == std::future_status::ready)
localVideoParams_ = newParams.get();
else
else {
RING_ERR("No valid new video parameters.");
return;
}
} catch (const std::exception& e) {
RING_ERR("Exception during retrieving video parameters: %s",
e.what());
return;
}
} else {
RING_WARN("Can't lock video input");
return;
}
}
......@@ -124,10 +128,10 @@ void VideoRtpSession::startSender()
send_.enabled = false;
}
auto codecVideo = std::static_pointer_cast<ring::AccountVideoCodecInfo>(send_.codec);
auto isAutoQualityEnabledStr = codecVideo->getCodecSpecifications()[DRing::Account::ConfProperties::CodecInfo::AUTO_QUALITY_ENABLED];
if ((not rtcpCheckerThread_.isRunning()) && (isAutoQualityEnabledStr.compare(TRUE_STR) == 0))
auto autoQuality = codecVideo->isAutoQualityEnabled;
if (autoQuality and not rtcpCheckerThread_.isRunning())
rtcpCheckerThread_.start();
else if ((rtcpCheckerThread_.isRunning()) && (isAutoQualityEnabledStr.compare(FALSE_STR) == 0))
else if (not autoQuality and rtcpCheckerThread_.isRunning())
rtcpCheckerThread_.join();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment