Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
80f964b2
Commit
80f964b2
authored
Jun 12, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(src/components/call/CallModel): avoid video actions if the app was built without video support
parent
667aa7e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+6
-1
CallsListModel.cpp
linphone-desktop/src/components/calls/CallsListModel.cpp
+7
-2
No files found.
linphone-desktop/src/components/call/CallModel.cpp
View file @
80f964b2
...
...
@@ -435,6 +435,12 @@ bool CallModel::getVideoEnabled () const {
}
void
CallModel
::
setVideoEnabled
(
bool
status
)
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
if
(
!
core
->
videoSupported
())
{
qWarning
()
<<
QStringLiteral
(
"Unable to update video call property. (Video not supported.)"
);
return
;
}
switch
(
mCall
->
getState
())
{
case
linphone
:
:
CallStateConnected
:
case
linphone
:
:
CallStateStreamsRunning
:
...
...
@@ -445,7 +451,6 @@ void CallModel::setVideoEnabled (bool status) {
if
(
status
==
getVideoEnabled
())
return
;
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
mCall
);
params
->
enableVideo
(
status
);
...
...
linphone-desktop/src/components/calls/CallsListModel.cpp
View file @
80f964b2
...
...
@@ -93,8 +93,8 @@ void CallsListModel::askForTransfer (CallModel *callModel) {
void
CallsListModel
::
launchAudioCall
(
const
QString
&
sipUri
)
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipUri
));
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipUri
));
if
(
!
address
)
return
;
...
...
@@ -107,8 +107,13 @@ void CallsListModel::launchAudioCall (const QString &sipUri) const {
void
CallsListModel
::
launchVideoCall
(
const
QString
&
sipUri
)
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipUri
));
if
(
!
core
->
videoSupported
())
{
qWarning
()
<<
QStringLiteral
(
"Unable to launch video call. (Video not supported.) Launching audio call..."
);
launchAudioCall
(
sipUri
);
return
;
}
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
appStringToCoreString
(
sipUri
));
if
(
!
address
)
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment