bluez5: Parse 'broadcasting' state

A new 'broadcasting' state is to be added in BlueZ. It is
functionally similar to 'pending', but for the Broadcast scenario.

Until now, on Broadcast sink side, the transports associated with a
scanned source would automatically be switched to pending. PipeWire
then acquired any transport that was pending.

This is to be changed, transports will now remain in 'idle' state
until the user calls transport.select on them from bluetoothctl.
This changes the state to 'broadcasting'. PipeWire will then acquire
these selected transports.

This way, the user can select to which sink he wishes to sync.
This commit is contained in:
Vlad Pruteanu 2024-07-22 16:18:39 +03:00
parent 819c73907e
commit 786c2445e9

View file

@ -720,7 +720,7 @@ static inline enum spa_bt_transport_state spa_bt_transport_state_from_string(con
{
if (strcasecmp("idle", value) == 0)
return SPA_BT_TRANSPORT_STATE_IDLE;
else if (strcasecmp("pending", value) == 0)
else if ((strcasecmp("pending", value) == 0) || (strcasecmp("broadcasting", value) == 0))
return SPA_BT_TRANSPORT_STATE_PENDING;
else if (strcasecmp("active", value) == 0)
return SPA_BT_TRANSPORT_STATE_ACTIVE;