[farsight2/master] Implement select_candidate_pair
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:26:13 PST 2008
---
transmitters/nice/fs-nice-stream-transmitter.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index 39bc82d..035d36b 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -397,8 +397,30 @@ fs_nice_stream_transmitter_select_candidate_pair (
const gchar *remote_foundation,
GError **error)
{
- return FALSE;
+ FsNiceStreamTransmitter *self =
+ FS_NICE_STREAM_TRANSMITTER (streamtransmitter);
+ gint c;
+ gboolean res = TRUE;
+
+ if (!self->priv->created)
+ {
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
+ "Can not call this function before gathering local candidates");
+ return FALSE;
+ }
+
+ for (c = 1; c <= self->priv->transmitter->components; c++)
+ if (!nice_agent_set_selected_pair (self->priv->transmitter->agent,
+ self->priv->stream_id, c, local_foundation, remote_foundation))
+ res = FALSE;
+
+ if (!res)
+ g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL,
+ "Unknown error while selecting pairs");
+
+ return res;
}
+
static gboolean
fs_nice_stream_transmitter_gather_local_candidates (
FsStreamTransmitter *streamtransmitter,
--
1.5.6.5
More information about the farsight-commits
mailing list