Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Olivier Crête
libnice
Commits
5bbed7e4
Commit
5bbed7e4
authored
Apr 15, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Add nice_agent_restart_stream() to restart a single stream
parent
28ab0b50
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
1 deletion
+50
-1
agent/agent.c
agent/agent.c
+26
-1
agent/agent.h
agent/agent.h
+22
-0
docs/reference/libnice/libnice-sections.txt
docs/reference/libnice/libnice-sections.txt
+1
-0
nice/libnice.sym
nice/libnice.sym
+1
-0
No files found.
agent/agent.c
View file @
5bbed7e4
...
...
@@ -3689,7 +3689,6 @@ nice_agent_get_remote_candidates (
return
ret
;
}
gboolean
nice_agent_restart
(
NiceAgent
*
agent
)
...
...
@@ -3713,6 +3712,32 @@ nice_agent_restart (
return
TRUE
;
}
gboolean
nice_agent_restart_stream
(
NiceAgent
*
agent
,
guint
stream_id
)
{
gboolean
res
=
FALSE
;
Stream
*
stream
;
agent_lock
();
stream
=
agent_find_stream
(
agent
,
stream_id
);
if
(
!
stream
)
{
g_warning
(
"Could not find stream %u"
,
stream_id
);
goto
done
;
}
/* step: reset local credentials for the stream and
* clean up the list of remote candidates */
stream_restart
(
agent
,
stream
,
agent
->
rng
);
res
=
TRUE
;
done:
agent_unlock_and_emit
(
agent
);
return
res
;
}
static
void
nice_agent_dispose
(
GObject
*
object
)
...
...
agent/agent.h
View file @
5bbed7e4
...
...
@@ -787,6 +787,28 @@ gboolean
nice_agent_restart
(
NiceAgent
*
agent
);
/**
* nice_agent_restart_stream:
* @agent: The #NiceAgent Object
* @stream_id: The ID of the stream
*
* Restarts a single stream as defined in RFC 5245. This function
* needs to be called both when initiating (ICE spec section 9.1.1.1.
* "ICE Restarts"), as well as when reacting (spec section 9.2.1.1.
* "Detecting ICE Restart") to a restart.
*
* Unlike nice_agent_restart(), this applies to a single stream. It also
* does not generate a new tie breaker.
*
* Returns: %TRUE on success %FALSE on error
*
* Since: 0.1.6
**/
gboolean
nice_agent_restart_stream
(
NiceAgent
*
agent
,
guint
stream_id
);
/**
* nice_agent_attach_recv:
...
...
docs/reference/libnice/libnice-sections.txt
View file @
5bbed7e4
...
...
@@ -36,6 +36,7 @@ nice_agent_set_selected_remote_candidate
nice_agent_set_stream_tos
nice_agent_set_software
nice_agent_restart
nice_agent_restart_stream
nice_agent_set_stream_name
nice_agent_get_stream_name
nice_agent_get_default_local_candidate
...
...
nice/libnice.sym
View file @
5bbed7e4
...
...
@@ -41,6 +41,7 @@ nice_agent_parse_remote_sdp
nice_agent_parse_remote_stream_sdp
nice_agent_remove_stream
nice_agent_restart
nice_agent_restart_stream
nice_agent_send
nice_agent_send_messages_nonblocking
nice_agent_set_port_range
...
...
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