/* GStreamer
* Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) <2009> Jarkko Palviainen <jarkko.palviainen@sesca.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* be configured in the element that does the receive. */
#define DEFAULT_AUTO_MULTICAST TRUE
#define DEFAULT_TTL 64
+#define DEFAULT_TTL_MC 1
#define DEFAULT_LOOP TRUE
#define DEFAULT_QOS_DSCP -1
PROP_CLIENTS,
PROP_AUTO_MULTICAST,
PROP_TTL,
+ PROP_TTL_MC,
PROP_LOOP,
PROP_QOS_DSCP,
PROP_LAST
"Automatically join/leave the multicast groups, FALSE means user"
" has to do it himself", DEFAULT_AUTO_MULTICAST, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_TTL,
- g_param_spec_int ("ttl", "Multicast TTL",
- "Used for setting the multicast TTL parameter",
+ g_param_spec_int ("ttl", "Unicast TTL",
+ "Used for setting the unicast TTL parameter",
0, 255, DEFAULT_TTL, G_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class, PROP_TTL_MC,
+ g_param_spec_int ("ttl-mc", "Multicast TTL",
+ "Used for setting the multicast TTL parameter",
+ 0, 255, DEFAULT_TTL_MC, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_LOOP,
g_param_spec_boolean ("loop", "Multicast Loopback",
"Used for setting the multicast loop parameter. TRUE = enable,"
sink->externalfd = (sink->sockfd != -1);
sink->auto_multicast = DEFAULT_AUTO_MULTICAST;
sink->ttl = DEFAULT_TTL;
+ sink->ttl_mc = DEFAULT_TTL_MC;
sink->loop = DEFAULT_LOOP;
sink->qos_dscp = DEFAULT_QOS_DSCP;
}
case PROP_TTL:
udpsink->ttl = g_value_get_int (value);
break;
+ case PROP_TTL_MC:
+ udpsink->ttl_mc = g_value_get_int (value);
+ break;
case PROP_LOOP:
udpsink->loop = g_value_get_boolean (value);
break;
case PROP_TTL:
g_value_set_int (value, udpsink->ttl);
break;
+ case PROP_TTL_MC:
+ g_value_set_int (value, udpsink->ttl_mc);
+ break;
case PROP_LOOP:
g_value_set_boolean (value, udpsink->loop);
break;
}
if (gst_udp_set_loop (sink->sock, sink->loop) != 0)
goto loop_failed;
- if (gst_udp_set_ttl (sink->sock, sink->ttl, TRUE) != 0)
+ if (gst_udp_set_ttl (sink->sock, sink->ttl_mc, TRUE) != 0)
goto ttl_failed;
} else {
if (gst_udp_set_ttl (sink->sock, sink->ttl, FALSE) != 0)