[farsight2/master] Implement sending property
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:24 PST 2008
---
transmitters/rawudp/fs-rawudp-stream-transmitter.c | 36 ++++++++++++++++++-
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/transmitters/rawudp/fs-rawudp-stream-transmitter.c b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
index 9339f23..79a0ddd 100644
--- a/transmitters/rawudp/fs-rawudp-stream-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
@@ -280,8 +280,40 @@ fs_rawudp_stream_transmitter_set_property (GObject *object,
switch (prop_id) {
case PROP_SENDING:
- self->priv->sending = g_value_get_boolean (value);
- /* COMPLETE ME .. we have to do something here */
+ {
+ gboolean old_sending = self->priv->sending;
+ self->priv->sending = g_value_get_boolean (value);
+
+ if (self->priv->sending != old_sending) {
+ if (self->priv->sending) {
+ if (self->priv->remote_rtp_candidate)
+ fs_rawudp_transmitter_udpstream_add_dest (
+ self->priv->udpstream,
+ self->priv->remote_rtp_candidate->ip,
+ self->priv->remote_rtp_candidate->port,
+ FALSE);
+ if (self->priv->remote_rtcp_candidate)
+ fs_rawudp_transmitter_udpstream_add_dest (
+ self->priv->udpstream,
+ self->priv->remote_rtcp_candidate->ip,
+ self->priv->remote_rtcp_candidate->port,
+ FALSE);
+ } else {
+ if (self->priv->remote_rtp_candidate)
+ fs_rawudp_transmitter_udpstream_remove_dest (
+ self->priv->udpstream,
+ self->priv->remote_rtp_candidate->ip,
+ self->priv->remote_rtp_candidate->port,
+ FALSE);
+ if (self->priv->remote_rtcp_candidate)
+ fs_rawudp_transmitter_udpstream_remove_dest (
+ self->priv->udpstream,
+ self->priv->remote_rtcp_candidate->ip,
+ self->priv->remote_rtcp_candidate->port,
+ FALSE);
+ }
+ }
+ }
break;
case PROP_PREFERED_LOCAL_CANDIDATES:
self->priv->prefered_local_candidates = g_value_dup_boxed (value);
--
1.5.6.5
More information about the farsight-commits
mailing list