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
74edc292
Commit
74edc292
authored
Mar 13, 2013
by
Yann Diorcet
Browse files
Add rtp config for disabling upnp for rtp streams
parent
ca095446
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
coreapi/linphonecall.c
coreapi/linphonecall.c
+11
-7
coreapi/linphonecore.c
coreapi/linphonecore.c
+1
-0
coreapi/private.h
coreapi/private.h
+1
-0
No files found.
coreapi/linphonecall.c
View file @
74edc292
...
...
@@ -484,7 +484,9 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr
}
#ifdef BUILD_UPNP
if
(
linphone_core_get_firewall_policy
(
call
->
core
)
==
LinphonePolicyUseUpnp
)
{
call
->
upnp_session
=
linphone_upnp_session_new
(
call
);
if
(
!
lc
->
rtp_conf
.
disable_upnp
)
{
call
->
upnp_session
=
linphone_upnp_session_new
(
call
);
}
}
#endif //BUILD_UPNP
call
->
camera_active
=
params
->
has_video
;
...
...
@@ -558,12 +560,14 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
break
;
case
LinphonePolicyUseUpnp
:
#ifdef BUILD_UPNP
call
->
upnp_session
=
linphone_upnp_session_new
(
call
);
if
(
call
->
upnp_session
!=
NULL
)
{
linphone_call_init_media_streams
(
call
);
if
(
linphone_core_update_upnp_from_remote_media_description
(
call
,
sal_call_get_remote_media_description
(
op
))
<
0
)
{
/* uPnP port mappings failed, proceed with the call anyway. */
linphone_call_delete_upnp_session
(
call
);
if
(
!
lc
->
rtp_conf
.
disable_upnp
)
{
call
->
upnp_session
=
linphone_upnp_session_new
(
call
);
if
(
call
->
upnp_session
!=
NULL
)
{
linphone_call_init_media_streams
(
call
);
if
(
linphone_core_update_upnp_from_remote_media_description
(
call
,
sal_call_get_remote_media_description
(
op
))
<
0
)
{
/* uPnP port mappings failed, proceed with the call anyway. */
linphone_call_delete_upnp_session
(
call
);
}
}
}
#endif //BUILD_UPNP
...
...
coreapi/linphonecore.c
View file @
74edc292
...
...
@@ -751,6 +751,7 @@ static void rtp_config_read(LinphoneCore *lc)
linphone_core_enable_audio_adaptive_jittcomp
(
lc
,
adaptive_jitt_comp_enabled
);
adaptive_jitt_comp_enabled
=
lp_config_get_int
(
lc
->
config
,
"rtp"
,
"video_adaptive_jitt_comp_enabled"
,
TRUE
);
linphone_core_enable_video_adaptive_jittcomp
(
lc
,
adaptive_jitt_comp_enabled
);
lc
->
rtp_conf
.
disable_upnp
=
lp_config_get_int
(
lc
->
config
,
"rtp"
,
"disable_upnp"
,
FALSE
);
}
static
PayloadType
*
find_payload
(
RtpProfile
*
prof
,
const
char
*
mime_type
,
int
clock_rate
,
int
channels
,
const
char
*
recv_fmtp
){
...
...
coreapi/private.h
View file @
74edc292
...
...
@@ -459,6 +459,7 @@ typedef struct rtp_config
int
audio_jitt_comp
;
/*jitter compensation*/
int
video_jitt_comp
;
/*jitter compensation*/
int
nortp_timeout
;
int
disable_upnp
;
bool_t
rtp_no_xmit_on_audio_mute
;
/* stop rtp xmit when audio muted */
bool_t
audio_adaptive_jitt_comp_enabled
;
...
...
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