module-rtp: set higher priotity on sender socket

This commit is contained in:
Wim Taymans 2022-10-07 12:58:42 +02:00
parent ecc53cfcdb
commit 7fd16b8a77

View file

@ -30,7 +30,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <net/if.h>
#include <ctype.h>
@ -425,6 +425,15 @@ static int make_multicast_socket(struct sockaddr_storage *src, socklen_t src_len
if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &val, sizeof(val)) < 0)
pw_log_warn("setsockopt(IP_MULTICAST_TTL) failed: %m");
val = 6;
if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &val, sizeof(val)) < 0)
pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
val = IPTOS_LOWDELAY;
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof(val)) < 0)
pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
return fd;
error:
close(fd);