From kde-multimedia Tue Nov 20 12:47:48 2012 From: Bart Cerneels Date: Tue, 20 Nov 2012 12:47:48 +0000 To: kde-multimedia Subject: Re: Phonon Five: Plugs and Sockets Message-Id: X-MARC-Message: https://marc.info/?l=kde-multimedia&m=135341570514242 On Sun, Nov 18, 2012 at 2:39 PM, Harald Sitter wrote: > Having done some random work on the Phonon Five API these past couple of > days, I came to realize that we probably need two rather important classes > that were not mentioned at all up until now... > > MediaNodePrivate & MediaNode in Phonon 4 did not only enable the graph > building they were more importantly providing base classes for the pluggable > object (backend objects are managed/held by MediaNodePrivate) as well as the > API comprising frontend object (MediaNode). > > We most likely need exactly the same for Phonon Five. Most importantly > because we most likely want to have a solid base class to have all frontend > objects hold a backend object (short of using void *). > > So here's the simplest version... > > class AbstractionPlug > AbstractionSocket *qptr > QObject *m_backendObject > > class AbstractionSocket > AbstractionPlug *dptr > > With the Player class you then get: > > Player : public AbstractionSocket {}; > PlayerPrivate : public AbstractonPlug{}; > > If better names come to mind, please share ;) > > Note that the current MediaNode foo also holds object destruction tech which > may be necessary for Phonon Five too (except as the API is right now, > objects are no managed at all... so I left that out ;)). > > HS > Not having written any backend I can't comment on the need for these classes themselves. But I do like the names. Quite self-documenting. _______________________________________________ kde-multimedia mailing list kde-multimedia@kde.org https://mail.kde.org/mailman/listinfo/kde-multimedia