Fixespipewire/pipewire#502.
Also move media application creating from filter callback to initialization.
Application object path and endpoint paths only need to be registered once.
Signed-off-by: Huang-Huang Bao <eh5@sokka.cn>
Backends don't necessarily allow for opening the same device multiple
times, and it shouldn't be necessary.
Since source and sink are not necessarily both running at the same time,
refcount the transport acquire/release so that it knows to close the fd
only when no source/sink is running.
Let the transport manage the fd lifecycle, also closing it once it is
not needed.
Don't return the fd from acquire(), since each transport is associated
with a single socket fd.
oFono tries to use the best codec when setting up the audio connection, so
the codec to use is known during call to `acquire` function, after the
transport has been created.
To get the codec before creating the transport, an audio connection is
set-up and discarded during `ofono_audio_card_found()`. It should return
the best codec available, which should not change during the time the
remote is connected.
mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
Make the list of supported codecs available.
Register all supported codecs endpoints
Find the codec from the endpoint name
Put the codec on the transport for the sink to find.
As hsphfpd is a prototype and its API subject to change, this backend is
disable by default.
This skeleton connects to hsphfpd daemon and list the managed devices.
oFono's CardAdded signal from can occur after BlueZ's ServicesResolved
signal. In this case the device is created without SCO nodes.
This is fixed by not enforcing device creation on ServicesResolved signal.
The transport is already added in profile_new_connection(), unless
is_new is TRUE
Apart from being wrong, adding the same node twice in a list also causes
spa_list_foreach() to loop forever...
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
Remove the monitor API, we can use the device API for it. Make sure
we support creating devices (like alsa) from another device (udev).
Use new object.id to store the object id in the object properties. Use
the port.id/node.id etc to make relations to other objects.
2019-09-20 13:04:14 +02:00
Renamed from spa/plugins/bluez5/bluez5-monitor.c (Browse further)