From 9102709e6f8a0b9c390e8636589c3d80f9b1810a Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 11 Aug 2014 15:53:51 -0400 Subject: Add support for send-rtcp-mux on fs-rtp-session and nice transmitter In fs_nice_transmitter_set_send_component_mux(), the component IDs, which start from 1, are used as nicesinks array indexes and nicesinks[0] is always NULL. --- gst/fsrtpconference/fs-rtp-stream.c | 43 ++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'gst') diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c index 36088198..ebe30f16 100644 --- a/gst/fsrtpconference/fs-rtp-stream.c +++ b/gst/fsrtpconference/fs-rtp-stream.c @@ -76,7 +76,8 @@ enum PROP_PARTICIPANT, PROP_SESSION, PROP_RTP_HEADER_EXTENSIONS, - PROP_DECRYPTION_PARAMETERS + PROP_DECRYPTION_PARAMETERS, + PROP_SEND_RTCP_MUX }; struct _FsRtpStreamPrivate @@ -85,6 +86,7 @@ struct _FsRtpStreamPrivate FsStreamTransmitter *stream_transmitter; FsStreamDirection direction; + gboolean send_rtcp_mux; stream_new_remote_codecs_cb new_remote_codecs_cb; stream_known_source_packet_receive_cb known_source_packet_received_cb; @@ -231,6 +233,14 @@ fs_rtp_stream_class_init (FsRtpStreamClass *klass) " would like to use", FS_TYPE_RTP_HEADER_EXTENSION_LIST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, + PROP_SEND_RTCP_MUX, + g_param_spec_boolean ("send-rtcp-mux", + "Send RTCP muxed with on the same RTP connection", + "Send RTCP muxed with on the same RTP connection", + FALSE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void @@ -454,6 +464,17 @@ fs_rtp_stream_get_property (GObject *object, g_value_set_boxed (value, self->priv->decryption_parameters); FS_RTP_SESSION_UNLOCK (session); break; + case PROP_SEND_RTCP_MUX: + FS_RTP_SESSION_LOCK (session); + if (self->priv->stream_transmitter == NULL || + g_object_class_find_property ( + G_OBJECT_GET_CLASS (self->priv->stream_transmitter), + "send-component-mux") != NULL) + g_value_set_boolean (value, self->priv->send_rtcp_mux); + else + g_value_set_boolean (value, FALSE); + FS_RTP_SESSION_UNLOCK (session); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -541,6 +562,23 @@ fs_rtp_stream_set_property (GObject *object, } } break; + case PROP_SEND_RTCP_MUX: + { + FsRtpSession *session = fs_rtp_stream_get_session (self, NULL); + + if (session) { + FS_RTP_SESSION_LOCK (session); + self->priv->send_rtcp_mux = g_value_get_boolean (value); + if (self->priv->stream_transmitter != NULL && + g_object_class_find_property ( + G_OBJECT_GET_CLASS (self->priv->stream_transmitter), + "send-component-mux") != NULL) + g_object_set (self->priv->stream_transmitter, + "send-component-mux", self->priv->send_rtcp_mux, NULL); + FS_RTP_SESSION_UNLOCK (session); + } + } + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1178,6 +1216,9 @@ fs_rtp_stream_set_transmitter (FsStream *stream, self->priv->sending_changed_locked_cb (self, self->priv->direction & FS_DIRECTION_SEND, self->priv->user_data_for_cb); + if (g_object_class_find_property (G_OBJECT_GET_CLASS (st), + "send-component-mux") != NULL) + g_object_set (st, "send-component-mux", self->priv->send_rtcp_mux, NULL); FS_RTP_SESSION_UNLOCK (session); if (!fs_stream_transmitter_gather_local_candidates (st, error)) -- cgit v1.2.1