Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
97187262
Commit
97187262
authored
Jul 27, 2012
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
ice.h
include/mediastreamer2/ice.h
+2
-1
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