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
b69d0fae
Commit
b69d0fae
authored
Jul 20, 2012
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accessor functions.
parent
aa635443
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
ice.h
include/mediastreamer2/ice.h
+16
-0
ice.c
src/ice.c
+17
-0
No files found.
include/mediastreamer2/ice.h
View file @
b69d0fae
...
...
@@ -269,6 +269,14 @@ MS2_PUBLIC const char * ice_session_remote_ufrag(const IceSession *session);
*/
MS2_PUBLIC
const
char
*
ice_session_remote_pwd
(
const
IceSession
*
session
);
/**
* Gte the role of the agent for an ICE session.
*
* @param session A pointer to a session
* @return The role of the agent for the session
*/
MS2_PUBLIC
IceRole
ice_session_role
(
IceSession
*
session
);
/**
* Set the role of the agent for an ICE session.
*
...
...
@@ -384,6 +392,14 @@ MS2_PUBLIC void ice_check_list_set_remote_credentials(IceCheckList *cl, const ch
*/
MS2_PUBLIC
const
IceCandidate
*
ice_check_list_default_local_candidate
(
const
IceCheckList
*
cl
);
/**
* Get the nominated valid local candidate for an ICE check list.
*
* @param cl A pointer to a check list
* @return A pointer to the nominated valid local candidate for the check list if found, NULL otherwise
*/
MS2_PUBLIC
const
IceCandidate
*
ice_check_list_nominated_valid_local_candidate
(
const
IceCheckList
*
cl
);
/**
* Get the candidate type as a string.
*
...
...
src/ice.c
View file @
b69d0fae
...
...
@@ -388,6 +388,18 @@ const IceCandidate * ice_check_list_default_local_candidate(const IceCheckList *
return
candidate
;
}
const
IceCandidate
*
ice_check_list_nominated_valid_local_candidate
(
const
IceCheckList
*
cl
)
{
IceCandidate
*
candidate
=
NULL
;
uint16_t
componentID
=
1
;
MSList
*
elem
=
ms_list_find_custom
(
cl
->
valid_list
,
(
MSCompareFunc
)
ice_find_nominated_valid_pair_from_componentID
,
&
componentID
);
if
(
elem
!=
NULL
)
{
IceValidCandidatePair
*
valid_pair
=
(
IceValidCandidatePair
*
)
elem
->
data
;
candidate
=
valid_pair
->
valid
->
local
;
}
return
candidate
;
}
static
void
ice_check_list_queue_triggered_check
(
IceCheckList
*
cl
,
IceCandidatePair
*
pair
)
{
MSList
*
elem
=
ms_list_find
(
cl
->
triggered_checks_queue
,
pair
);
...
...
@@ -462,6 +474,11 @@ static void ice_session_compute_pair_priorities(IceSession *session)
ms_list_for_each
(
session
->
streams
,
(
void
(
*
)(
void
*
))
ice_check_list_compute_pair_priorities
);
}
IceRole
ice_session_role
(
IceSession
*
session
)
{
return
session
->
role
;
}
void
ice_session_set_role
(
IceSession
*
session
,
IceRole
role
)
{
if
(
session
->
role
!=
role
)
{
...
...
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