[pulseaudio-discuss] Pull request: Autospawn fix

Lennart Poettering lennart at poettering.net
Thu Jan 14 05:56:58 PST 2010


On Thu, 14.01.10 05:32, Tanu Kaskinen (tanuk at iki.fi) wrote:

> > tcp4:, tcp6:, and unix: continue to mean "native protocol over the
> > resp lower level transport. And then we add dbus-tcp4:, dbus-tcp6:,
> > dbus-unix: and so on. And a client looking for a server to connect to
> > then goes through that list and picks the first entry that works for
> > it that speaks the right protocols.
> > 
> > Using just different prefix seems like a simpler, more compatible
> > extension to the current syntax.
> 
> Simpler, yes. More compatible, not much. The only cases that I can see
> the proposed syntax would break are socket paths that
> 
>  * start with "[" (ie. they are relative paths, which don't make any
> sense anyway, I think) or
>  * contain commas.

ipv6 addresses are usually written with in [], so that the colons can
be distuingished from the port seperator. Kinda sucks using colons in
more than one context here?

> > Does that make sense to you?
> 
> Well, the simplicity point is valid. But if the user wants to set the
> server manually, completely separate server strings for different
> pulseaudio protocols require him to always specify hosts twice, which is
> annoying and a bit error prone. Based on very little empirical data, I
> would guess that the most common case for manual server configuration is
> when just the server hostname is needed. I would like this to still
> work:
> 
> $ PULSE_SERVER=gurki pavucontrol

Yes, me too! 

So the way this should be interpreted is that the host name may be
connected to by all protocols supported. That means via ipv4/native as
well as ipv6/native (which is where we are currently at) in addition
to ipv4/dbus as well as ipv6/dbus.

If you look at src/pulsecore/parseaddr.h you'll find
pa_parsed_address_type_t. I'd like to extend that struct to:

    PA_PARSED_ADDRESS_NATIVE_UNIX,
    PA_PARSED_ADDRESS_NATIVE_TCP4,
    PA_PARSED_ADDRESS_NATIVE_TCP6,
    PA_PARSED_ADDRESS_NATIVE_TCP_AUTO,
    PA_PARSED_ADDRESS_DBUS_UNIX,
    PA_PARSED_ADDRESS_DBUS_TCP4,
    PA_PARSED_ADDRESS_DBUS_TCP6,
    PA_PARSED_ADDRESS_DBUS_TCP_AUTO,
    PA_PARSED_ADDRESS_TCP4,
    PA_PARSED_ADDRESS_TCP6,
    PA_PARSED_ADDRESS_DBUS_TCP_AUTO

And writing PULSE_SERVER=gurki would be translated to
PA_PARSED_ADDRESS_DBUS_TCP_AUTO which means that both the dbus and the
native client would use that address. 

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list