Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
80334dc8
Commit
80334dc8
authored
Feb 01, 2013
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nice_agent_get_selected_pair API to NiceAgent
parent
4b835a81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
agent/agent.c
agent/agent.c
+26
-0
agent/agent.h
agent/agent.h
+21
-0
nice/libnice.sym
nice/libnice.sym
+1
-0
No files found.
agent/agent.c
View file @
80334dc8
...
...
@@ -2843,6 +2843,32 @@ nice_agent_set_selected_pair (
return
ret
;
}
NICEAPI_EXPORT
gboolean
nice_agent_get_selected_pair
(
NiceAgent
*
agent
,
guint
stream_id
,
guint
component_id
,
NiceCandidate
**
local
,
NiceCandidate
**
remote
)
{
Component
*
component
;
Stream
*
stream
;
gboolean
ret
=
FALSE
;
agent_lock
();
/* step: check that params specify an existing pair */
if
(
!
agent_find_component
(
agent
,
stream_id
,
component_id
,
&
stream
,
&
component
))
goto
done
;
if
(
component
->
selected_pair
.
local
&&
component
->
selected_pair
.
remote
)
{
*
local
=
component
->
selected_pair
.
local
;
*
remote
=
component
->
selected_pair
.
remote
;
ret
=
TRUE
;
}
done:
agent_unlock
();
return
ret
;
}
GSource
*
agent_timeout_add_with_context
(
NiceAgent
*
agent
,
guint
interval
,
GSourceFunc
function
,
gpointer
data
)
...
...
agent/agent.h
View file @
80334dc8
...
...
@@ -689,6 +689,27 @@ nice_agent_set_selected_pair (
const
gchar
*
lfoundation
,
const
gchar
*
rfoundation
);
/**
* nice_agent_get_selected_pair:
* @agent: The #NiceAgent Object
* @stream_id: The ID of the stream
* @component_id: The ID of the component
* @local: The local selected candidate
* @remote: The remote selected candidate
*
* Retreive the selected candidate pair for media transmission
* for a given stream's component.
*
* Returns: %TRUE on success, %FALSE if there is no selected candidate pair
*/
gboolean
nice_agent_get_selected_pair
(
NiceAgent
*
agent
,
guint
stream_id
,
guint
component_id
,
NiceCandidate
**
local
,
NiceCandidate
**
remote
);
/**
* nice_agent_set_selected_remote_candidate:
* @agent: The #NiceAgent Object
...
...
nice/libnice.sym
View file @
80334dc8
...
...
@@ -21,6 +21,7 @@ nice_agent_gather_candidates
nice_agent_get_local_candidates
nice_agent_get_local_credentials
nice_agent_get_remote_candidates
nice_agent_get_selected_pair
nice_agent_get_type
nice_agent_new
nice_agent_new_reliable
...
...
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