netutils: Add IPv6 support to QoS DSCP

Added IPv6 support as already implemented in multiudpsink
(gst-plugins-good).
This commit is contained in:
Robert Rosengren 2018-11-13 13:39:43 +01:00 committed by Sebastian Dröge
parent e54261c7eb
commit 3faab6f017

View file

@ -60,6 +60,15 @@ gst_net_utils_set_socket_dscp (GSocket * socket, gint qos_dscp)
} else {
ret = TRUE;
}
#ifdef IPV6_TCLASS
if (g_socket_get_family (socket) == G_SOCKET_FAMILY_IPV6) {
if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) {
GST_ERROR ("could not set TCLASS: %s", g_strerror (errno));
} else {
ret = TRUE;
}
}
#endif
#endif
return ret;