[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    Phonon Five: Plugs and Sockets
From:       Harald Sitter <sitter () kde ! org>
Date:       2012-11-18 13:39:57
Message-ID: CAEc+18GTMsH5o7weH=keqVLLx6vtybugYMXmQF-_RJgBQZ0V_Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

Having done some random work on the Phonon Five API these past couple of da=
ys, I came to realize that we probably need two rather important classes th=
at were not mentioned at all up until now...<div><br></div><div>MediaNodePr=
ivate &amp; MediaNode in Phonon 4 did not only enable the graph building th=
ey were more importantly providing base classes for the pluggable object (b=
ackend objects are managed/held by MediaNodePrivate) as well as the API com=
prising frontend object (MediaNode).</div>

<div><br></div><div>We most likely need exactly the same for Phonon Five. M=
ost importantly because we most likely want to have a solid base class to h=
ave all frontend objects hold a backend object (short of using void *).</di=
v>

<div><br></div><div>So here&#39;s the simplest version...</div><div><br></d=
iv><div>class AbstractionPlug</div><div>=C2=A0 AbstractionSocket *qptr</div=
><div>=C2=A0 QObject *m_backendObject</div><div><br></div><div>class Abstra=
ctionSocket</div>

<div>=C2=A0 AbstractionPlug *dptr</div><div><br></div><div>With the Player =
class you then get:</div><div><br></div><div>Player : public AbstractionSoc=
ket {};</div><div>PlayerPrivate : public AbstractonPlug{};</div><div><br></=
div>

<div>If better names come to mind, please share ;)</div><div><br></div><div=
>Note that the current MediaNode foo also holds object destruction tech whi=
ch may be necessary for Phonon Five too (except as the API is right now, ob=
jects are no managed at all... so I left that out ;)).</div>

<div><br></div><div>HS</div>


_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic