Commit 277f6198 authored by Youness Alaoui's avatar Youness Alaoui

signal candidates-gathering-done for each stream that had a gather_candidates call

parent b96460c1
# component-status-changed
VOID:UINT,UINT,UINT
# candidate-gathering-done
VOID:VOID
# new-selected-pair
VOID:UINT,UINT,STRING,STRING
# new-candidate
VOID:UINT,UINT,STRING
# candidate-gathering-done
# initial-binding-request-received
VOID:UINT
......@@ -292,10 +292,10 @@ nice_agent_class_init (NiceAgentClass *klass)
0,
NULL,
NULL,
agent_marshal_VOID__VOID,
agent_marshal_VOID__UINT,
G_TYPE_NONE,
0,
G_TYPE_INVALID);
1,
G_TYPE_UINT, G_TYPE_INVALID);
/* signature: void cb(NiceAgent *agent, guint stream_id, guint component_id,
gchar *lfoundation, gchar* rfoundation, gpointer self) */
......@@ -577,7 +577,15 @@ void agent_gathering_done (NiceAgent *agent)
void agent_signal_gathering_done (NiceAgent *agent)
{
g_signal_emit (agent, signals[SIGNAL_CANDIDATE_GATHERING_DONE], 0);
GSList *i;
for (i = agent->streams; i; i = i->next) {
Stream *stream = i->data;
if (stream->gathering) {
g_signal_emit (agent, signals[SIGNAL_CANDIDATE_GATHERING_DONE], 0, stream->id);
stream->gathering = FALSE;
}
}
}
void agent_signal_initial_binding_request_received (NiceAgent *agent, Stream *stream)
......@@ -870,12 +878,12 @@ nice_agent_gather_candidates (
goto done;
}
nice_debug ("Agent %p : In %s mode, starting candidate gathering.", agent, agent->full_mode ? "ICE-FULL" : "ICE-LITE");
nice_debug ("Agent %p : In %s mode, starting candidate gathering.", agent,
agent->full_mode ? "ICE-FULL" : "ICE-LITE");
/* generate a local host candidate for each local address */
for (i = agent->local_addresses; i; i = i->next)
{
for (i = agent->local_addresses; i; i = i->next){
NiceAddress *addr = i->data;
NiceCandidate *host_candidate;
......@@ -931,6 +939,8 @@ nice_agent_gather_candidates (
}
}
stream->gathering = TRUE;
/* note: no async discoveries pending, signal that we are ready */
if (agent->discovery_unsched_items == 0) {
......
......@@ -82,6 +82,7 @@ struct _Stream
gchar local_password[NICE_STREAM_MAX_PWD];
gchar remote_ufrag[NICE_STREAM_MAX_UFRAG];
gchar remote_password[NICE_STREAM_MAX_PWD];
gboolean gathering;
};
Stream *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment