Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 466

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>Phonon.MediaNode Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">Phonon.MediaNode Class Reference<br /><sup><sup>[<a href="phonon.html">phonon</a> module]</sup></sup></h1><p>The MediaNode class is the base class for all nodes in a media
graph. <a href="#details">More...</a></p>

<p>Inherited by <a href="phonon-abstractaudiooutput.html">AbstractAudioOutput</a>, <a href="phonon-abstractvideooutput.html">AbstractVideoOutput</a>, <a href="phonon-effect.html">Effect</a> and <a href="phonon-mediaobject.html">MediaObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" />list-of-Phonon.Path <b><a href="phonon-medianode.html#inputPaths">inputPaths</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="phonon-medianode.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-Phonon.Path <b><a href="phonon-medianode.html#outputPaths">outputPaths</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The MediaNode class is the base class for all nodes in a media
graph.</p>
<p>In all phonon applications, one builds a media graph consisting
of MediaNodes. The graph will take multimedia content, e.g., from a
file, as input. After its nodes have processed the multimedia, the
graph will output the media again, e.g., to a sound card.</p>
<p>The multimedia content is streamed over <a href="phonon-path.html">Path</a>s between the nodes in the graph. You
can query the paths that are connected to a media node with
<a href="phonon-medianode.html#inputPaths">inputPaths</a>() and
<a href="phonon-medianode.html#outputPaths">outputPaths</a>().</p>
<p>You can check whether the node is implemented by the current
backend by calling <a href="phonon-medianode.html#isValid">isValid</a>(). This does not
guarantee that an instance of the class works as expected, but that
the backend has implemented functionality for the class.</p>
<p>Currently, Phonon has four media nodes: <a href="phonon-mediaobject.html">MediaObject</a>, <a href="phonon-audiooutput.html">AudioOutput</a>, <a href="phonon-videowidget.html">VideoWidget</a>, and <a href="phonon-effect.html">Effect</a>. Please refer to their class
descriptions for details about their usage, and to find out which
nodes can be connected to each other. See also <a href="phonon-overview.html#building-graphs">Building Graphs</a> in
Phonon's <a href="phonon-overview.html#phonon-overview">overview</a> document.</p>
<p>Two nodes are connected to each other using the <a href="phonon-path.html#createPath">Phonon.createPath</a>() or <a href="phonon-path.html#insertEffect">Path.insertEffect()</a> functions
(only <a href="phonon-effect.html">Phonon.Effect</a>s use <a href="phonon-path.html#insertEffect">insertEffect()</a>). We show a code
example below, in which we build a media graph for video playback
and then query its media nodes for their <a href="phonon-path.html">Path</a>s:</p>
<pre class="cpp">
     Phonon<span class="operator">.</span>MediaObject <span class="operator">*</span>mediaObject <span class="operator">=</span> <span class="keyword">new</span> Phonon<span class="operator">.</span>MediaObject;
     Phonon<span class="operator">.</span>AudioOutput <span class="operator">*</span>audioOutput <span class="operator">=</span> <span class="keyword">new</span> Phonon<span class="operator">.</span>AudioOutput;
     Phonon<span class="operator">.</span>VideoWidget <span class="operator">*</span>videoWidget <span class="operator">=</span> <span class="keyword">new</span> Phonon<span class="operator">.</span>VideoWidget;

     Phonon<span class="operator">.</span>createPath(mediaObject<span class="operator">,</span> audioOutput);
     Phonon<span class="operator">.</span>createPath(mediaObject<span class="operator">,</span> videoWidget);

     <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span>Phonon<span class="operator">.</span>Path<span class="operator">&gt;</span> inputPaths <span class="operator">=</span>
         audioOutput<span class="operator">-</span><span class="operator">&gt;</span>inputPaths();   <span class="comment">// inputPaths = [ mediaObject ]</span>
     <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span>Phonon<span class="operator">.</span>Path<span class="operator">&gt;</span> outputPaths <span class="operator">=</span>
         mediaObject<span class="operator">-</span><span class="operator">&gt;</span>outputPaths(); <span class="comment">// outputPaths = [ audioOutput, videoWidget ]</span>
</pre>
<p>When you create a Phonon application, you will likely build the
graph yourself. This makes <a href="phonon-medianode.html#isValid">isValid</a>() the most useful
function of this class. The other two functions help navigate the
graph, which you do not need to do as you created the nodes
yourself.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="inputPaths" />list-of-Phonon.Path MediaNode.inputPaths (<i>self</i>)</h3><p>Returns the paths that inputs multimedia to this media node.</p>
<p><b>See also</b> <a href="phonon-medianode.html#outputPaths">outputPaths</a>().</p>


<h3 class="fn"><a name="isValid" />bool MediaNode.isValid (<i>self</i>)</h3><p>Returns true if the backend provides an implementation of this
class; otherwise returns false.</p>
<p>This does not guarantee that instances of the class works as
expected, but that the backend has implemented the functionality
for this class. For instance, Qt's GStreamer backend will return
true for instances of the <a href="phonon-audiooutput.html">AudioOutput</a> class, even if there is a
problem with GStreamer and it could not play sound.</p>


<h3 class="fn"><a name="outputPaths" />list-of-Phonon.Path MediaNode.outputPaths (<i>self</i>)</h3><p>Returns the paths to which this media node outputs media.</p>
<p><b>See also</b> <a href="phonon-medianode.html#inputPaths">inputPaths</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>