Skip to content
Snippets Groups Projects
Commit 3e87dad8 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

video_rtp_session: check videoLocal_, cleanup

Change-Id: I4eae6ca5a1725ca2a754b743954c3bc43603aaf0
parent c6d8b696
Branches
No related tags found
No related merge requests found
...@@ -520,7 +520,7 @@ VideoRtpSession::setNewBitrate(unsigned int newBR) ...@@ -520,7 +520,7 @@ VideoRtpSession::setNewBitrate(unsigned int newBR)
storeVideoBitrateInfo(); storeVideoBitrateInfo();
#if __ANDROID__ #if __ANDROID__
auto input_device = std::static_pointer_cast<VideoInput>(videoLocal_); if (auto input_device = std::dynamic_pointer_cast<VideoInput>(videoLocal_))
emitSignal<DRing::VideoSignal::SetBitrate>(input_device->getParams().name, (int)newBR); emitSignal<DRing::VideoSignal::SetBitrate>(input_device->getParams().name, (int)newBR);
#endif #endif
...@@ -555,9 +555,7 @@ VideoRtpSession::setupVideoBitrateInfo() { ...@@ -555,9 +555,7 @@ VideoRtpSession::setupVideoBitrateInfo() {
void void
VideoRtpSession::storeVideoBitrateInfo() { VideoRtpSession::storeVideoBitrateInfo() {
auto codecVideo = std::static_pointer_cast<jami::AccountVideoCodecInfo>(send_.codec); if (auto codecVideo = std::static_pointer_cast<jami::AccountVideoCodecInfo>(send_.codec)) {
if (codecVideo) {
codecVideo->setCodecSpecifications({ codecVideo->setCodecSpecifications({
{DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(videoBitrateInfo_.videoBitrateCurrent)}, {DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(videoBitrateInfo_.videoBitrateCurrent)},
{DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, std::to_string(videoBitrateInfo_.videoBitrateMin)}, {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, std::to_string(videoBitrateInfo_.videoBitrateMin)},
...@@ -566,6 +564,7 @@ VideoRtpSession::storeVideoBitrateInfo() { ...@@ -566,6 +564,7 @@ VideoRtpSession::storeVideoBitrateInfo() {
{DRing::Account::ConfProperties::CodecInfo::MIN_QUALITY, std::to_string(videoBitrateInfo_.videoQualityMin)}, {DRing::Account::ConfProperties::CodecInfo::MIN_QUALITY, std::to_string(videoBitrateInfo_.videoQualityMin)},
{DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY, std::to_string(videoBitrateInfo_.videoQualityMax)} {DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY, std::to_string(videoBitrateInfo_.videoQualityMax)}
}); });
}
if (histoQuality_.size() > MAX_SIZE_HISTO_QUALITY) if (histoQuality_.size() > MAX_SIZE_HISTO_QUALITY)
histoQuality_.pop_front(); histoQuality_.pop_front();
...@@ -576,7 +575,6 @@ VideoRtpSession::storeVideoBitrateInfo() { ...@@ -576,7 +575,6 @@ VideoRtpSession::storeVideoBitrateInfo() {
histoQuality_.push_back(videoBitrateInfo_.videoQualityCurrent); histoQuality_.push_back(videoBitrateInfo_.videoQualityCurrent);
histoBitrate_.push_back(videoBitrateInfo_.videoBitrateCurrent); histoBitrate_.push_back(videoBitrateInfo_.videoBitrateCurrent);
} }
}
void void
VideoRtpSession::processRtcpChecker() VideoRtpSession::processRtcpChecker()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment