Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
90678a34
Commit
90678a34
authored
Jan 16, 2017
by
Ghislain MARY
Browse files
Reflect real media directions in the current call params.
parent
6e898ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
coreapi/linphonecall.c
coreapi/linphonecall.c
+21
-15
No files found.
coreapi/linphonecall.c
View file @
90678a34
...
...
@@ -688,24 +688,30 @@ void linphone_call_update_biggest_desc(LinphoneCall *call, SalMediaDescription *
static
void
force_streams_dir_according_to_state
(
LinphoneCall
*
call
,
SalMediaDescription
*
md
){
int
i
;
switch
(
call
->
state
){
case
LinphoneCallPausing
:
case
LinphoneCallPaused
:
break
;
default:
return
;
break
;
}
for
(
i
=
0
;
i
<
SAL_MEDIA_DESCRIPTION_MAX_STREAMS
;
++
i
){
SalStreamDescription
*
sd
=
&
md
->
streams
[
i
];
if
(
sd
->
dir
!=
SalStreamInactive
)
{
sd
->
dir
=
SalStreamSendOnly
;
if
(
sd
->
type
==
SalVideo
){
if
(
lp_config_get_int
(
call
->
core
->
config
,
"sip"
,
"inactive_video_on_pause"
,
0
))
{
sd
->
dir
=
SalStreamInactive
;
switch
(
call
->
state
){
case
LinphoneCallPausing
:
case
LinphoneCallPaused
:
if
(
sd
->
dir
!=
SalStreamInactive
)
{
sd
->
dir
=
SalStreamSendOnly
;
if
(
sd
->
type
==
SalVideo
){
if
(
lp_config_get_int
(
call
->
core
->
config
,
"sip"
,
"inactive_video_on_pause"
,
0
))
{
sd
->
dir
=
SalStreamInactive
;
}
}
}
}
break
;
default:
break
;
}
/* Reflect the stream directions in the call params */
if
(
i
==
call
->
main_audio_stream_index
)
{
linphone_call_params_set_audio_direction
(
call
->
current_params
,
media_direction_from_sal_stream_dir
(
sd
->
dir
));
}
else
if
(
i
==
call
->
main_video_stream_index
)
{
linphone_call_params_set_video_direction
(
call
->
current_params
,
media_direction_from_sal_stream_dir
(
sd
->
dir
));
}
}
}
...
...
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