bluetooth: Fix bluetooth.nrec property not updated
PropertyChanged signal of org.BlueZ.MediaTransport is processed in
pa_bluetooth_transport_parse_property() which updates t->nrec.
This is called by :
- First by filter_cb() of bluetooth-util.c
- Then by filter_cb() of module-bluetooth-device.c which retrieve value
of t->nrec before calling parse function, then it checks if t->nrec
has changed before updating bluetooth.nrec property.
As t->nrec has alreday been changed during first process, property
update is never performed.
This patch creates a new hook in pa_bluetooth_transport called
PA_BLUETOOTH_TRANSPORT_HOOK_NREC_CHANGED.
The hook is fired by bluetooth-util.c when the transport's NREC
property changes.
module-bluetooth-device.c won't listen the PropertyChanged signal of
MediaTransport anymore. Instead, it will use the hook in
pa_bluetooth_transport to get a notification when the NREC property
changes, and update the sink or source proplist accordingly.
const qualifier for returned pointer of
pa_bluetooth_discovery_get_transport() is removed.