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
mediastreamer2
Commits
97187262
Commit
97187262
authored
Jul 27, 2012
by
Ghislain MARY
Browse files
Specify if an ICE remote candidate is the default one when adding it.
parent
4ddad2d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
include/mediastreamer2/ice.h
include/mediastreamer2/ice.h
+2
-1
src/ice.c
src/ice.c
+3
-2
No files found.
include/mediastreamer2/ice.h
View file @
97187262
...
...
@@ -463,10 +463,11 @@ MS2_PUBLIC IceCandidate * ice_add_local_candidate(IceCheckList *cl, const char *
* @param componentID The component ID of the remote candidate (usually 1 for RTP and 2 for RTCP)
* @param priority The priority of the remote candidate
* @param foundation The foundation of the remote candidate
* @param is_default Boolean value telling whether the remote candidate is a default candidate or not
*
* This function is to be called once the remote candidate list has been received via SDP.
*/
MS2_PUBLIC
IceCandidate
*
ice_add_remote_candidate
(
IceCheckList
*
cl
,
const
char
*
type
,
const
char
*
ip
,
int
port
,
uint16_t
componentID
,
uint32_t
priority
,
const
char
*
const
foundation
);
MS2_PUBLIC
IceCandidate
*
ice_add_remote_candidate
(
IceCheckList
*
cl
,
const
char
*
type
,
const
char
*
ip
,
int
port
,
uint16_t
componentID
,
uint32_t
priority
,
const
char
*
const
foundation
,
bool_t
is_default
);
/**
* Add a losing pair to an ICE check list.
...
...
src/ice.c
View file @
97187262
...
...
@@ -952,7 +952,7 @@ static IceCandidate * ice_learn_peer_reflexive_candidate(IceCheckList *cl, const
/* Add peer reflexive candidate to the remote candidates list. */
memset
(
foundation
,
'\0'
,
sizeof
(
foundation
));
ice_generate_arbitrary_foundation
(
foundation
,
sizeof
(
foundation
),
cl
->
remote_candidates
);
candidate
=
ice_add_remote_candidate
(
cl
,
"prflx"
,
taddr
->
ip
,
taddr
->
port
,
componentID
,
msg
->
priority
.
priority
,
foundation
);
candidate
=
ice_add_remote_candidate
(
cl
,
"prflx"
,
taddr
->
ip
,
taddr
->
port
,
componentID
,
msg
->
priority
.
priority
,
foundation
,
FALSE
);
}
return
candidate
;
}
...
...
@@ -1426,7 +1426,7 @@ IceCandidate * ice_add_local_candidate(IceCheckList* cl, const char* type, const
return
candidate
;
}
IceCandidate
*
ice_add_remote_candidate
(
IceCheckList
*
cl
,
const
char
*
type
,
const
char
*
ip
,
int
port
,
uint16_t
componentID
,
uint32_t
priority
,
const
char
*
const
foundation
)
IceCandidate
*
ice_add_remote_candidate
(
IceCheckList
*
cl
,
const
char
*
type
,
const
char
*
ip
,
int
port
,
uint16_t
componentID
,
uint32_t
priority
,
const
char
*
const
foundation
,
bool_t
is_default
)
{
IceCandidate
*
candidate
=
ice_add_candidate
(
&
cl
->
remote_candidates
,
type
,
ip
,
port
,
componentID
);
if
(
candidate
==
NULL
)
return
NULL
;
...
...
@@ -1435,6 +1435,7 @@ IceCandidate * ice_add_remote_candidate(IceCheckList *cl, const char *type, cons
if
(
priority
==
0
)
ice_compute_candidate_priority
(
candidate
);
else
candidate
->
priority
=
priority
;
strncpy
(
candidate
->
foundation
,
foundation
,
sizeof
(
candidate
->
foundation
)
-
1
);
candidate
->
is_default
=
is_default
;
return
candidate
;
}
...
...
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