mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Fix sending black video.
This commit is contained in:
parent
fad42c88e8
commit
2264815d8f
3 changed files with 15 additions and 16 deletions
|
|
@ -429,7 +429,8 @@ bool CallModel::transferToAnother (const QString &peerAddress) {
|
|||
void CallModel::acceptVideoRequest () {
|
||||
if(mCall) {
|
||||
shared_ptr<linphone::CallParams> params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
|
||||
params->enableVideo(true);
|
||||
params->enableVideo(CoreManager::getInstance()->getSettingsModel()->getVideoEnabled());
|
||||
params->setVideoDirection(linphone::MediaDirection::SendRecv);// Force for symmetric case
|
||||
mCall->acceptUpdate(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -438,7 +439,6 @@ void CallModel::rejectVideoRequest () {
|
|||
if(mCall) {
|
||||
shared_ptr<linphone::CallParams> params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
|
||||
params->enableVideo(false);
|
||||
|
||||
mCall->acceptUpdate(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -595,7 +595,8 @@ void CallModel::accept (bool withVideo) {
|
|||
shared_ptr<linphone::Core> core = coreManager->getCore();
|
||||
if(mCall) {
|
||||
shared_ptr<linphone::CallParams> params = core->createCallParams(mCall);
|
||||
params->enableVideo(withVideo);
|
||||
params->enableVideo(withVideo && CoreManager::getInstance()->getSettingsModel()->getVideoEnabled());
|
||||
params->setVideoDirection(withVideo ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly);
|
||||
setRecordFile(params);
|
||||
auto localAddress = mCall->getCallLog()->getLocalAddress();
|
||||
for(auto account : coreManager->getAccountList()){
|
||||
|
|
@ -792,10 +793,6 @@ bool CallModel::getCameraEnabled () const{
|
|||
|
||||
void CallModel::setCameraEnabled (bool status){
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
if (!CoreManager::getInstance()->getSettingsModel()->getVideoEnabled()) {
|
||||
qWarning() << QStringLiteral("Unable to update video call property. (Video not enabled.)");
|
||||
return;
|
||||
}
|
||||
if(mCall) {
|
||||
switch (mCall->getState()) {
|
||||
case linphone::Call::State::Connected:
|
||||
|
|
@ -808,9 +805,8 @@ void CallModel::setCameraEnabled (bool status){
|
|||
}
|
||||
if (status == getCameraEnabled())
|
||||
return;
|
||||
|
||||
shared_ptr<linphone::CallParams> params = core->createCallParams(mCall);
|
||||
params->enableVideo(true);
|
||||
params->enableVideo(CoreManager::getInstance()->getSettingsModel()->getVideoEnabled());
|
||||
params->setVideoDirection(status ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly);
|
||||
mCall->update(params);
|
||||
}
|
||||
|
|
@ -879,10 +875,6 @@ bool CallModel::getVideoEnabled () const {
|
|||
|
||||
void CallModel::setVideoEnabled (bool status) {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
if (!CoreManager::getInstance()->getSettingsModel()->getVideoEnabled()) {
|
||||
qWarning() << QStringLiteral("Unable to update video call property. (Video not enabled.)");
|
||||
return;
|
||||
}
|
||||
if(mCall) {
|
||||
switch (mCall->getState()) {
|
||||
case linphone::Call::State::Connected:
|
||||
|
|
@ -898,8 +890,8 @@ void CallModel::setVideoEnabled (bool status) {
|
|||
return;
|
||||
|
||||
shared_ptr<linphone::CallParams> params = core->createCallParams(mCall);
|
||||
params->enableVideo(status);
|
||||
|
||||
params->enableVideo(status && CoreManager::getInstance()->getSettingsModel()->getVideoEnabled());
|
||||
params->setVideoDirection(status ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly);
|
||||
mCall->update(params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -443,6 +443,12 @@ void CoreManager::migrate () {
|
|||
config->setString("misc", "version_check_url_root", Constants::VersionCheckReleaseUrl);
|
||||
qInfo() << "Migrating Video Policy for version 7.";
|
||||
}
|
||||
if (rcVersion < 8) {
|
||||
// Revert automatically_accept_direction=2 from version 7 or set default to 3
|
||||
if (config->getInt("video", "automatically_accept_direction",2) == 2)
|
||||
config->setInt("video", "automatically_accept_direction", 3);
|
||||
qInfo() << "Migrating Video Policy for version 8.";
|
||||
}
|
||||
|
||||
config->setInt(SettingsModel::UiSection, Constants::RcVersionName, Constants::RcVersionCurrent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,12 +175,13 @@ public:
|
|||
static constexpr char VcardScheme[] = EXECUTABLE_NAME "-desktop:/";
|
||||
static constexpr int CbsCallInterval = 20;
|
||||
static constexpr char RcVersionName[] = "rc_version";
|
||||
static constexpr int RcVersionCurrent = 7; // 2 = Conference URI
|
||||
static constexpr int RcVersionCurrent = 8; // 2 = Conference URI
|
||||
// 3 = CPIM on basic chat rooms
|
||||
// 4 = RTP bundle mode
|
||||
// 5 = Video Conference URI
|
||||
// 6 = Publish expires
|
||||
// 7 = Lime algo + Video Policy + Routes + Log upload URL
|
||||
// 8 = Revert automatically_accept_direction=2 from RcVersionCurrent 7.
|
||||
//--------------------------------------------------------------------------------
|
||||
// CISCO
|
||||
//--------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue