Re: [PATCH BlueZ 1/4] doc/media-api: Add RegisterApplication method

Pali Rohár
2019-10-08T10:33:38Z

On Tuesday 08 October 2019 13:28:53 Luiz Augusto von Dentz wrote:
> Hi Pali,
>
> On Mon, Oct 7, 2019 at 5:33 PM Pali Rohár <pali.rohar@gmail.com> wrote:
> >
> > On Sunday 06 October 2019 14:02:45 Pali Rohár wrote:
> > > On Sunday 06 October 2019 13:53:37 Luiz Augusto von Dentz wrote:
> > > > Hi Pali,
> > > >
> > > > On Sun, Oct 6, 2019 at 1:05 PM Pali Rohár <pali.rohar@gmail.com> wrote:
> > > > >
> > > > > On Thursday 03 October 2019 21:18:55 Pasi Kärkkäinen wrote:
> > > > > > Hi,
> > > > > >
> > > > > > On Thu, Aug 29, 2019 at 10:05:13PM +0200, Pali Rohár wrote:
> > > > > > > On Thursday 29 August 2019 15:57:34 Pasi Kärkkäinen wrote:
> > > > > > > > Pali: How does it look with porting the PA patches to use the new interfaces?
> > > > > > >
> > > > > > > Hello, I have not had a time yet to play with these pulseaudio patches
> > > > > > > and porting to the new interface. I guess that I could have more free
> > > > > > > time in the last week of next month.
> > > > > > >
> > > > > >
> > > > > > It seems BlueZ 5.51 has been released meanwhile (http://www.bluez.org/release-of-bluez-5-51/)
> > > > > > So now at least the new interfaces are in a released bluez version.
> > > > >
> > > > > Ok! Today I have looked at this new Bluez API, but seems that there is
> > > > > not only missing some examples or usages with libdbus-1, but also
> > > > > documentation. I have tried to find something how to register endpoints
> > > > > throw GetManagedObjects() via libdbus-1, but seems that there is no
> > > > > usage of it and also unusable documentation for it in libdbus-1. So
> > > > > currently I'm stuck how to use this exotic API in pulseaudio...
> > > >
> > > > It is just another D-Bus method, the only difference is that it
> > > > carries the entire object tree, btw I did add an example of how to
> > > > register Endpoints in python:
> > > >
> > > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-endpoint
> > >
> > > This example uses undocumented property "DelayReporting". What it is doing?
> >
> > Also this new Managed Objects API bring some inconsistency. Codec
> > switching API is available only when bluetoothd was started with
> > --experimental flag, but this new Object API is available also without
> > it. So it just complicated implementation.
> >
> > How could application (e.g. pulseaudio) check if A2DP codec switching is
> > available and based on this decide if via Managed Objects API export
> > more codecs or just only default SBC?
>
> The idea was that this API would be experimental as well but it seems
> it is not,

No, it is not experimental. Managed Objects API is available also when
bluetoothd is started without --experimental argument.

> they should go hand in hand with Endpoint objects to ensure
> they will be available as well so we might have to fix this in 5.52,
> too bad we didn't see this before 5.51 went out.

So... what should applications expects and how they should implement
above decision?

> > > > You can also have a look at how our gdbus internal library (uses
> > > > libdbus) utilize it:
> > > >
> > > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/gdbus/client.c#n1269
> > > >
> > >
> >
> > --
> > Pali Rohár
> > pali.rohar@gmail.com