API proposal: Phonon BackendInfo

Bart Cerneels bart.cerneels at kde.org
Mon Sep 10 14:12:23 UTC 2012


On Sun, Sep 9, 2012 at 3:04 PM, Harald Sitter <sitter at kde.org> wrote:
> On Sun, Sep 9, 2012 at 2:14 PM, Matěj Laitl <matej at laitl.cz> wrote:
>>>     /** @returns \c true when this backend was provided by a platform plugin
>>>     */
>>>     bool isPlatformProvided() const;
>>
>> Perhaps this has sense to people who known how Phonon is implemented in Qt,
>> but I don't understand what "provided by platform plugin" means.
>
> Rationale being that if the backend is from the platform plugin
> libphonon does not actually know where it is loaded from. So that is
> in fact a convenience overload of path() (i.e. if the path is empty it
> is always a platform provided backend).
>
>>> #warning TODO: do we really want this here?
>>>     /** @returns \c true when the backend uses PulseAudio */
>>>     bool usesPulseAudio();
>>
>> While this seems very quirky, we really do want to show this in Amarok
>> Diagnostics as it affects too many things.
>
> This in formation is actually available via the PulseSupport class, so
> the only rationale for having it here is to have it all in one place.
> However at the same time it is entirely wrong to have it in a class
> called BackendInfo because it does not actually reflect backend
> support but whether PulseSupport is active. So from a puristic POV
> this ought not be here.
>
> HS

Couldn't the pulseaudio stuff be considered platform integration? I
would be happy enough with a string indication which platform phonon
and it's backends are using. example: "linux (pulseaudio)", "linux
(ALSA)", "Windows (DirectSound)", ... And yes, I do want the OS in
that string. Our diagnostics dialog is easy to copy paste by
inexperienced users and it's good confirmation that they are actually
using the platform they are talking about.
Since we are building for windows and apple OSX as well, don't want to
ifdef in the diagnostics dialog when it's not really needed, so
provide a platform independent function returning platform specific
info please.


More information about the Amarok-devel mailing list