mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
bluez: Bump up priority for sockets in AVDTP elements
This is based on the code in PulseAudio.
This commit is contained in:
parent
f644b924d4
commit
b8e2550362
1 changed files with 9 additions and 0 deletions
|
@ -29,6 +29,9 @@
|
|||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include "a2dp-codecs.h"
|
||||
|
||||
|
@ -634,6 +637,7 @@ gst_avdtp_connection_conf_recv_stream_fd (GstAvdtpConnection * conn)
|
|||
GIOStatus status;
|
||||
GIOFlags flags;
|
||||
int fd;
|
||||
int priority;
|
||||
|
||||
/* Proceed if stream was already acquired */
|
||||
if (conn->stream == NULL) {
|
||||
|
@ -666,6 +670,11 @@ gst_avdtp_connection_conf_recv_stream_fd (GstAvdtpConnection * conn)
|
|||
if (status != G_IO_STATUS_NORMAL)
|
||||
GST_WARNING ("Error while setting server socket to block");
|
||||
|
||||
priority = 6;
|
||||
if (setsockopt (fd, SOL_SOCKET, SO_PRIORITY, (const void *) &priority,
|
||||
sizeof (priority)) < 0)
|
||||
GST_WARNING ("Unable to set socket to low delay");
|
||||
|
||||
memset (data->buffer, 0, sizeof (data->buffer));
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue