[farsight2/master] Emit candidates for all components when gathering is done
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:26:14 PST 2008
---
transmitters/nice/fs-nice-stream-transmitter.c | 26 +++++++++++++----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index e0112fe..326ba15 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -617,6 +617,7 @@ void
fs_nice_stream_transmitter_gathering_done (FsNiceStreamTransmitter *self)
{
GSList *candidates, *item;
+ gint c;
FS_NICE_STREAM_TRANSMITTER_LOCK (self);
if (self->priv->gathered)
@@ -627,20 +628,23 @@ fs_nice_stream_transmitter_gathering_done (FsNiceStreamTransmitter *self)
self->priv->gathered = TRUE;
FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
- candidates = nice_agent_get_local_candidates (
- self->priv->transmitter->agent,
- self->priv->stream_id, component_id);
-
- for (item = candidates; item; item = g_slist_next (item))
+ for (c = 1; c < self->priv->transmitter->components; c++)
{
- NiceCandidate *candidate = item->data;
- FsCandidate *fscandidate;
+ candidates = nice_agent_get_local_candidates (
+ self->priv->transmitter->agent,
+ self->priv->stream_id, c);
- fscandidate = nice_candidate_to_fs_candidate (candidate);
- g_signal_emit_by_name (self, "new-local-candidate", fscandidate);
- fs_candidate_destroy (fscandidate);
- }
+ for (item = candidates; item; item = g_slist_next (item))
+ {
+ NiceCandidate *candidate = item->data;
+ FsCandidate *fscandidate;
+ fscandidate = nice_candidate_to_fs_candidate (
+ self->priv->transmitter->agent, candidate);
+ g_signal_emit_by_name (self, "new-local-candidate", fscandidate);
+ fs_candidate_destroy (fscandidate);
+ }
+ }
g_signal_emit_by_name (self, "local-candidates-prepared");
}
--
1.5.6.5
More information about the farsight-commits
mailing list