diff options
Diffstat (limited to 'gst/rtsp')
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 11 | ||||
-rw-r--r-- | gst/rtsp/gstrtspsrc.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index ba2c29a9c..a5fd4e656 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -915,9 +915,14 @@ gst_rtspsrc_do_stream_connection (GstRTSPSrc * src, GstRTSPStream * stream, else return; - /* save address, FIXME, check for multicast */ + /* save address */ g_free (stream->destination); stream->destination = g_strdup (conn->address); + + /* check for multicast */ + stream->is_multicast = + gst_sdp_address_is_multicast (conn->nettype, conn->addrtype, + conn->address); stream->ttl = conn->ttl; } @@ -4849,6 +4854,10 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src) GST_DEBUG_OBJECT (src, "doing setup of stream %p with %s", stream, stream->conninfo.location); + /* if we have a multicast connection, only suggest multicast from now on */ + if (stream->is_multicast) + protocols &= GST_RTSP_LOWER_TRANS_UDP_MCAST; + next_protocol: /* first selectable protocol */ while (protocol_masks[mask] && !(protocols & protocol_masks[mask])) diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h index a15ec8841..b1402c2aa 100644 --- a/gst/rtsp/gstrtspsrc.h +++ b/gst/rtsp/gstrtspsrc.h @@ -145,6 +145,7 @@ struct _GstRTSPStream { /* destination */ gchar *destination; + gboolean is_multicast; guint ttl; }; |