Fwd: phonon5 and the descriptors

Myriam Schweingruber myriam at kde.org
Tue Oct 8 11:53:11 UTC 2013


FYI

Please everybody: keep both addresses when replying

---------- Forwarded message ----------
From: Matěj Laitl <matej at laitl.cz>
Date: Tue, Oct 8, 2013 at 12:15 PM
Subject: Re: phonon5 and the descriptors
To: "For discussion of multimedia (sound/video) issues under KDE"
<kde-multimedia at kde.org>


On 8. 10. 2013 Harald Sitter wrote:
> I am looking for some input regarding the future of objectdescriptions
> in phonon5.
>
> tldr: should objects describing a property/setting of phonon objects
> such as Subtitle/AudioOutputDevice/AudioChannel be QObjects; if not,
> should they be QSharedData considering they are comprised of
> implicitly shared qt objects (e.g. qstring) and do not ever get
> changed after creation.

I'd be most happy if these were plain old data (making them QObjects comes
with a couple of restrictions, for example thread affinity etc.), perhaps with
*private and hidden* implicit sharing, i.e.:

class ObjectDescription {
    (...)

    private:
        class ObjectDescriptionPrivate;

        QSharedDataPointer<ObjectDescriptionPrivate> d;
}

I think this approach is in the best align with expectations of most folks
developing with Qt. If there are no mutator methods, QSharedDataPointer
becomes equal to QExplicitlySharedDataPointer, but still I'd prefer the
former: I've found it somewhat uncomfortable to work with shared data that
doesn't automatically detach on mutator methods.

These are however in no way strong opinions.

        Matěj
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


-- 
Proud member of the Amarok and KDE Community
Protect your freedom and join the Fellowship of FSFE:
http://www.fsfe.org
Please don't send me proprietary file formats,
use ISO standard ODF instead (ISO/IEC 26300)


More information about the Amarok-devel mailing list