#include "rtsp-sdp.h"
#include "rtsp-params.h"
+/* temporary multicast address until it's configurable somewhere */
+#define MCAST_ADDRESS "224.2.0.1"
+
static GMutex *tunnels_lock;
static GHashTable *tunnels;
/* we have a valid transport now, set the destination of the client. */
g_free (ct->destination);
if (ct->lower_transport == GST_RTSP_LOWER_TRANS_UDP_MCAST) {
- ct->destination = g_strdup ("224.2.0.1");
+ ct->destination = g_strdup (MCAST_ADDRESS);
} else {
url = gst_rtsp_connection_get_url (client->connection);
ct->destination = g_strdup (url->host);
gst_sdp_message_add_attribute (sdp, "control", "*");
info.server_proto = proto;
- info.server_ip = client->server_ip;
+ if (media->protocols & GST_RTSP_LOWER_TRANS_UDP_MCAST)
+ info.server_ip = MCAST_ADDRESS;
+ else
+ info.server_ip = client->server_ip;
/* create an SDP for the media object */
if (!gst_rtsp_sdp_from_media (sdp, &info, media))
#define DEFAULT_SHARED FALSE
#define DEFAULT_REUSABLE FALSE
#define DEFAULT_PROTOCOLS GST_RTSP_LOWER_TRANS_UDP | GST_RTSP_LOWER_TRANS_TCP
+//#define DEFAULT_PROTOCOLS GST_RTSP_LOWER_TRANS_UDP_MCAST
/* define to dump received RTCP packets */
#undef DUMP_STATS
gst_sdp_media_set_proto (smedia, "RTP/AVP");
/* for the c= line */
- gst_sdp_media_add_connection (smedia, "IN", info->server_proto, info->server_ip, 0, 0);
+ gst_sdp_media_add_connection (smedia, "IN", info->server_proto, info->server_ip, 16, 0);
/* get clock-rate, media type and params for the rtpmap attribute */
gst_structure_get_int (s, "clock-rate", &caps_rate);