summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/mmf_medianode.h
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-06 23:22:32 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-09-09 15:30:19 (GMT)
commitc4fb0864e229ff33e4b454c74116573a9ea79054 (patch)
tree15b70bac51904b01c1885c103bb69a6d95551b6c /src/3rdparty/phonon/mmf/mmf_medianode.h
parent7d2d15bbc9d598daf94800b576aff19a68119ed1 (diff)
downloadQt-c4fb0864e229ff33e4b454c74116573a9ea79054.zip
Qt-c4fb0864e229ff33e4b454c74116573a9ea79054.tar.gz
Qt-c4fb0864e229ff33e4b454c74116573a9ea79054.tar.bz2
Make the MediaObject propagation generic for all kinds of nodes.
Previously the MediaObject propagation was only done for effects, but now it's for all kinds of nodes. This is needed for AudioOutput.
Diffstat (limited to 'src/3rdparty/phonon/mmf/mmf_medianode.h')
-rw-r--r--src/3rdparty/phonon/mmf/mmf_medianode.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/3rdparty/phonon/mmf/mmf_medianode.h b/src/3rdparty/phonon/mmf/mmf_medianode.h
index 17917aa..4616ff1 100644
--- a/src/3rdparty/phonon/mmf/mmf_medianode.h
+++ b/src/3rdparty/phonon/mmf/mmf_medianode.h
@@ -38,6 +38,8 @@ namespace Phonon
{
namespace MMF
{
+class MediaObject;
+
/**
* @short Base class for all nodes in the MMF backend.
*
@@ -51,7 +53,8 @@ namespace MMF
*
* MediaNode provides spectatability into the chain, and also allows the
* connection code to be written in a polymorphic manner, instead of putting it
- * all in the Backend class.
+ * all in the Backend class. Due to that MMF has no concept of chaining, the
+ * order of the nodes in the graph has no meaning.
*/
class MediaNode : public QObject
{
@@ -66,9 +69,27 @@ public:
MediaNode *source() const;
MediaNode *target() const;
+protected:
+ /**
+ * When connectMediaNode() is called and a MediaObject is part of
+ * the its graph, this function will be called for each MediaNode in the
+ * graph for which it hasn't been called yet.
+ *
+ * The caller guarantees that @p mo is always non-null.
+ */
+ virtual bool activateOnMediaObject(MediaObject *mo) = 0;
+
private:
- MediaNode *m_source;
- MediaNode *m_target;
+ /**
+ * Finds a MediaObject anywhere in the graph @p target is apart of, and
+ * calls activateOnMediaObject() for all MediaNodes in the graph for which
+ * it hasn't been applied to already.
+ */
+ bool applyNodesOnMediaObject(MediaNode *target);
+
+ MediaNode * m_source;
+ MediaNode * m_target;
+ bool m_isApplied;
};
}
}