mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
Merge commit 'e4979ab5cf'
This commit is contained in:
commit
8c0e3efbf8
3 changed files with 16 additions and 10 deletions
|
|
@ -955,12 +955,14 @@ int pa_bluetooth_transport_acquire(const pa_bluetooth_transport *t, const char *
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DBUS_TYPE_UNIX_FD
|
||||||
if (!dbus_message_get_args(r, &err, DBUS_TYPE_UNIX_FD, &ret, DBUS_TYPE_INVALID)) {
|
if (!dbus_message_get_args(r, &err, DBUS_TYPE_UNIX_FD, &ret, DBUS_TYPE_INVALID)) {
|
||||||
pa_log("Failed to parse org.bluez.MediaTransport.Acquire(): %s", err.message);
|
pa_log("Failed to parse org.bluez.MediaTransport.Acquire(): %s", err.message);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
dbus_error_free(&err);
|
dbus_error_free(&err);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
dbus_message_unref(r);
|
dbus_message_unref(r);
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,18 @@
|
||||||
#include <pulsecore/core-util.h>
|
#include <pulsecore/core-util.h>
|
||||||
|
|
||||||
/* UUID copied from bluez/audio/device.h */
|
/* UUID copied from bluez/audio/device.h */
|
||||||
#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805F9B34FB"
|
#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805f9b34fb"
|
||||||
|
|
||||||
#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB"
|
#define HSP_HS_UUID "00001108-0000-1000-8000-00805f9b34fb"
|
||||||
#define HSP_AG_UUID "00001112-0000-1000-8000-00805F9B34FB"
|
#define HSP_AG_UUID "00001112-0000-1000-8000-00805f9b34fb"
|
||||||
|
|
||||||
#define HFP_HS_UUID "0000111E-0000-1000-8000-00805F9B34FB"
|
#define HFP_HS_UUID "0000111e-0000-1000-8000-00805f9b34fb"
|
||||||
#define HFP_AG_UUID "0000111F-0000-1000-8000-00805F9B34FB"
|
#define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb"
|
||||||
|
|
||||||
#define ADVANCED_AUDIO_UUID "0000110D-0000-1000-8000-00805F9B34FB"
|
#define ADVANCED_AUDIO_UUID "0000110d-0000-1000-8000-00805f9b34fb"
|
||||||
|
|
||||||
#define A2DP_SOURCE_UUID "0000110A-0000-1000-8000-00805F9B34FB"
|
#define A2DP_SOURCE_UUID "0000110a-0000-1000-8000-00805f9b34fb"
|
||||||
#define A2DP_SINK_UUID "0000110B-0000-1000-8000-00805F9B34FB"
|
#define A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb"
|
||||||
|
|
||||||
typedef struct pa_bluetooth_uuid pa_bluetooth_uuid;
|
typedef struct pa_bluetooth_uuid pa_bluetooth_uuid;
|
||||||
typedef struct pa_bluetooth_device pa_bluetooth_device;
|
typedef struct pa_bluetooth_device pa_bluetooth_device;
|
||||||
|
|
|
||||||
|
|
@ -1005,7 +1005,8 @@ ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
|
||||||
|
|
||||||
priv->frame.codesize = sbc_get_codesize(sbc);
|
priv->frame.codesize = sbc_get_codesize(sbc);
|
||||||
priv->frame.length = framelen;
|
priv->frame.length = framelen;
|
||||||
}
|
} else if (priv->frame.bitpool != sbc->bitpool)
|
||||||
|
sbc->bitpool = priv->frame.bitpool;
|
||||||
|
|
||||||
if (!output)
|
if (!output)
|
||||||
return framelen;
|
return framelen;
|
||||||
|
|
@ -1076,6 +1077,9 @@ ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len,
|
||||||
|
|
||||||
sbc_encoder_init(&priv->enc_state, &priv->frame);
|
sbc_encoder_init(&priv->enc_state, &priv->frame);
|
||||||
priv->init = 1;
|
priv->init = 1;
|
||||||
|
} else if (priv->frame.bitpool != sbc->bitpool) {
|
||||||
|
priv->frame.length = sbc_get_frame_length(sbc);
|
||||||
|
priv->frame.bitpool = sbc->bitpool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* input must be large enough to encode a complete frame */
|
/* input must be large enough to encode a complete frame */
|
||||||
|
|
@ -1140,7 +1144,7 @@ size_t sbc_get_frame_length(sbc_t *sbc)
|
||||||
struct sbc_priv *priv;
|
struct sbc_priv *priv;
|
||||||
|
|
||||||
priv = sbc->priv;
|
priv = sbc->priv;
|
||||||
if (priv->init)
|
if (priv->init && priv->frame.bitpool == sbc->bitpool)
|
||||||
return priv->frame.length;
|
return priv->frame.length;
|
||||||
|
|
||||||
subbands = sbc->subbands ? 8 : 4;
|
subbands = sbc->subbands ? 8 : 4;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue