Hi Vlad, On Wed, Jul 10, 2024 at 4:13 AM Vlad Pruteanu <vlad.pruteanu@xxxxxxx> wrote: > > This series adds a new "select" method that can be called by > the user on the broadcast sink side, to select the stream for > which synchronization is desired. This is achieved by changing > the states flow so that transport are not set to pending automatically > anymore. Instead, the transport must first be selected by the user, > which will update it's state from idle to pending. Any pending > transport will be acquired by PipeWire. Hmm, perhaps it would have been better that PipeWire don't auto pick-up transport on pending state if there are broadcasters, or we could perhaps perhaps use a different state e.g. "broadcasting", since pending doesn't really apply for broadcasters as far as streaming is concerned. > Furthermore, this method will be used for setting the broadcast code > of a stream on the sink side. If the encryption flag is set, the > transport.select call in bluetoothctl will prompt the user to enter > the code The roles of bluetoothctl is mostly to demonstrate how client can implement the handling of D-Bus APIs, so we have to be careful not to assume it will be used to replace things like Pipewire/audio settings, so for instance the broadcast code shall be provided by the same entity attempting to do Transport.Acquire otherwise things may get a little too convoluted if we need different entities to set transport up before it is ready to be acquired. > Vlad Pruteanu (3): > transport: Add "select" method > client/player: Expose transport "select" method to the user > transport: Broadcast sink: wait for user to select transport > > client/player.c | 52 ++++++++++++++++++++++++++++++++++++++ > profiles/audio/transport.c | 29 ++++++++++++++++++--- > 2 files changed, 77 insertions(+), 4 deletions(-) > > -- > 2.40.1 > -- Luiz Augusto von Dentz