mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-05-18 02:59:27 +00:00
Merge branch 'ip_tos' into 'main'
media-pipeline: Set quality of service See merge request GNOME/calls!712
This commit is contained in:
commit
d748a483ca
|
@ -31,6 +31,7 @@
|
|||
#include "calls-srtp-utils.h"
|
||||
#include "calls-util.h"
|
||||
|
||||
#include <netinet/ip.h>
|
||||
#include <glib-unix.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gio/gio.h>
|
||||
|
@ -546,6 +547,13 @@ setup_socket_reuse (CallsSipMediaPipeline *self,
|
|||
"close-socket", FALSE,
|
||||
NULL);
|
||||
|
||||
if (!g_socket_set_option (rtp_sock, IPPROTO_IP, IP_TOS, IPTOS_RELIABILITY, error)) {
|
||||
if (error) {
|
||||
g_warning ("Could not set socket TOS option: %s", (*error)->message);
|
||||
g_clear_error (error);
|
||||
}
|
||||
}
|
||||
|
||||
/* set rtcp element ready and lock it's state so it doesn't get stopped */
|
||||
gst_element_set_locked_state (self->rtcp_src, TRUE);
|
||||
gst_element_set_state (self->rtcp_src, GST_STATE_READY);
|
||||
|
@ -558,13 +566,19 @@ setup_socket_reuse (CallsSipMediaPipeline *self,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* configure socket and don't close it, since it belongs to rtcp_src */
|
||||
g_object_set (self->rtcp_sink,
|
||||
"socket", rtcp_sock,
|
||||
"close-socket", FALSE,
|
||||
NULL);
|
||||
|
||||
if (!g_socket_set_option (rtcp_sock, IPPROTO_IP, IP_TOS, IPTOS_RELIABILITY, error)) {
|
||||
if (error) {
|
||||
g_warning ("Could not set socket TOS option: %s", (*error)->message);
|
||||
g_clear_error (error);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue