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
0ebf88d0
Commit
0ebf88d0
authored
Jul 18, 2012
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accessor to get the default local candidate for an ICE check list.
parent
f63d4ac5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
ice.h
include/mediastreamer2/ice.h
+9
-1
ice.c
src/ice.c
+16
-1
No files found.
include/mediastreamer2/ice.h
View file @
0ebf88d0
...
...
@@ -357,13 +357,21 @@ MS2_PUBLIC const char * ice_check_list_remote_ufrag(IceCheckList *cl);
*/
MS2_PUBLIC
const
char
*
ice_check_list_remote_pwd
(
IceCheckList
*
cl
);
/**
* Get the default local candidate for an ICE check list.
*
* @param cl A pointer to a check list
* @return A pointer to the default local candidate for the check list if found, NULL otherwise
*/
MS2_PUBLIC
const
IceCandidate
*
ice_check_list_default_local_candidate
(
IceCheckList
*
cl
);
/**
* Get the candidate type as a string.
*
* @param candidate A pointer to a candidate
* @return A pointer to the candidate type as a string
*/
MS2_PUBLIC
const
char
*
ice_candidate_type
(
IceCandidate
*
candidate
);
MS2_PUBLIC
const
char
*
ice_candidate_type
(
const
IceCandidate
*
candidate
);
/**
* Add a local candidate to an ICE check list.
...
...
src/ice.c
View file @
0ebf88d0
...
...
@@ -306,7 +306,7 @@ void ice_check_list_destroy(IceCheckList *cl)
* CANDIDATE ACCESSORS *
*****************************************************************************/
const
char
*
ice_candidate_type
(
IceCandidate
*
candidate
)
const
char
*
ice_candidate_type
(
const
IceCandidate
*
candidate
)
{
return
candidate_type_values
[
candidate
->
type
];
}
...
...
@@ -366,6 +366,21 @@ const char * ice_check_list_remote_pwd(IceCheckList *cl)
else
return
cl
->
session
->
remote_pwd
;
}
static
int
ice_find_default_local_candidate
(
IceCandidate
*
candidate
,
void
*
dummy
)
{
return
!
((
candidate
->
componentID
==
1
)
&&
(
candidate
->
is_default
==
TRUE
));
}
const
IceCandidate
*
ice_check_list_default_local_candidate
(
IceCheckList
*
cl
)
{
IceCandidate
*
candidate
=
NULL
;
MSList
*
elem
=
ms_list_find_custom
(
cl
->
local_candidates
,
(
MSCompareFunc
)
ice_find_default_local_candidate
,
NULL
);
if
(
elem
!=
NULL
)
{
candidate
=
(
IceCandidate
*
)
elem
->
data
;
}
return
candidate
;
}
void
ice_check_list_set_remote_credentials
(
IceCheckList
*
cl
,
const
char
*
ufrag
,
const
char
*
pwd
)
{
ice_set_credentials
(
&
cl
->
remote_ufrag
,
&
cl
->
remote_pwd
,
ufrag
,
pwd
);
...
...
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