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
59ed757f
Commit
59ed757f
authored
Feb 03, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/call/CallModel): accept incoming video call
parent
30774f23
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+20
-11
No files found.
linphone-desktop/src/components/call/CallModel.cpp
View file @
59ed757f
...
...
@@ -62,9 +62,7 @@ CallModel::CallModel (shared_ptr<linphone::Call> linphone_call) {
m_paused_by_user
=
false
;
break
;
case
linphone
:
:
CallStateUpdatedByRemote
:
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
case
linphone
:
:
CallStateUpdatedByRemote
:
if
(
!
m_linphone_call
->
getCurrentParams
()
->
videoEnabled
()
&&
m_linphone_call
->
getRemoteParams
()
->
videoEnabled
()
...
...
@@ -72,7 +70,6 @@ CallModel::CallModel (shared_ptr<linphone::Call> linphone_call) {
CoreManager
::
getInstance
()
->
getCore
()
->
deferCallUpdate
(
m_linphone_call
);
emit
videoRequested
();
}
}
break
;
...
...
@@ -99,11 +96,21 @@ void CallModel::setRecordFile (shared_ptr<linphone::CallParams> &call_params) {
// -----------------------------------------------------------------------------
void
CallModel
::
accept
()
{
CoreManager
::
getInstance
()
->
getCore
()
->
acceptCall
(
m_linphone_call
);
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
m_linphone_call
);
params
->
enableVideo
(
false
);
setRecordFile
(
params
);
core
->
acceptCallWithParams
(
m_linphone_call
,
params
);
}
void
CallModel
::
acceptWithVideo
()
{
// TODO
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
m_linphone_call
);
params
->
enableVideo
(
true
);
setRecordFile
(
params
);
core
->
acceptCallWithParams
(
m_linphone_call
,
params
);
}
void
CallModel
::
terminate
()
{
...
...
@@ -115,10 +122,11 @@ void CallModel::transfer () {
}
void
CallModel
::
acceptVideoRequest
()
{
shared_ptr
<
linphone
::
CallParams
>
params
=
CoreManager
::
getInstance
()
->
getCore
()
->
createCallParams
(
m_linphone_call
);
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
m_linphone_call
);
params
->
enableVideo
(
true
);
CoreManager
::
getInstance
()
->
getCore
()
->
acceptCallUpdate
(
m_linphone_call
,
params
);
core
->
acceptCallUpdate
(
m_linphone_call
,
params
);
}
void
CallModel
::
rejectVideoRequest
()
{
...
...
@@ -274,10 +282,11 @@ void CallModel::setVideoEnabled (bool status) {
if
(
status
==
getVideoEnabled
())
return
;
shared_ptr
<
linphone
::
CallParams
>
params
=
CoreManager
::
getInstance
()
->
getCore
()
->
createCallParams
(
m_linphone_call
);
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
m_linphone_call
);
params
->
enableVideo
(
status
);
CoreManager
::
getInstance
()
->
getCore
()
->
updateCall
(
m_linphone_call
,
params
);
core
->
updateCall
(
m_linphone_call
,
params
);
}
bool
CallModel
::
getUpdating
()
const
{
...
...
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