summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2010-03-05 13:49:31 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2010-03-08 17:48:46 +0100
commit66709a7a68ed3230028ea27a7da52102ba48913c (patch)
tree7e72f1bc9a2114e7c5d143b3ede92e866c93ec9f /gst
parent83a0c73dc078bb61bfdf6b476f436230bf4cd1dd (diff)
rtspsrc: configure multicast correctly
Take the transport destination for multicast. Disable loop and autojoin for multicast on the udpsinks.
Diffstat (limited to 'gst')
-rw-r--r--gst/rtsp/gstrtspsrc.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index c99e381cc..d70bf4834 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -2398,16 +2398,19 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
if (transport->lower_transport == GST_RTSP_LOWER_TRANS_UDP_MCAST) {
rtp_port = transport->port.min;
rtcp_port = transport->port.max;
+ /* multicast destination */
+ destination = transport->destination;
} else {
rtp_port = transport->server_port.min;
rtcp_port = transport->server_port.max;
+ /* first take the source, then the endpoint to figure out where to send
+ * the RTCP. */
+ destination = transport->source;
+ if (destination == NULL)
+ destination = gst_rtsp_connection_get_ip (src->connection);
}
-
- /* first take the source, then the endpoint to figure out where to send
- * the RTCP. */
- destination = transport->source;
if (destination == NULL)
- destination = gst_rtsp_connection_get_ip (src->connection);
+ goto no_destination;
/* try to construct the fakesrc to the RTP port of the server to open up any
* NAT firewalls */
@@ -2421,6 +2424,8 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
if (stream->udpsink[0] == NULL)
goto no_sink_element;
+ g_object_set (G_OBJECT (stream->udpsink[0]), "auto-multicast", FALSE, NULL);
+ g_object_set (G_OBJECT (stream->udpsink[0]), "loop", FALSE, NULL);
/* no sync or async state changes needed */
g_object_set (G_OBJECT (stream->udpsink[0]), "sync", FALSE, "async", FALSE,
NULL);
@@ -2473,6 +2478,8 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
if (stream->udpsink[1] == NULL)
goto no_sink_element;
+ g_object_set (G_OBJECT (stream->udpsink[1]), "auto-multicast", FALSE, NULL);
+ g_object_set (G_OBJECT (stream->udpsink[1]), "loop", FALSE, NULL);
/* no sync needed */
g_object_set (G_OBJECT (stream->udpsink[1]), "sync", FALSE, NULL);
/* no async state changes needed */
@@ -2517,6 +2524,11 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
return TRUE;
/* ERRORS */
+no_destination:
+ {
+ GST_DEBUG_OBJECT (src, "no destination address specified");
+ return FALSE;
+ }
no_sink_element:
{
GST_DEBUG_OBJECT (src, "no UDP sink element found");