File: phonon-mediacontroller.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (96 lines) | stat: -rw-r--r-- 20,282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?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.MediaController 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="../pyqt4ref.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.MediaController Class Reference<br /><sup><sup>[<a href="phonon.html">phonon</a> module]</sup></sup></h1><p>The MediaController class controls optional features of a media file/device. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="phonon-mediacontroller.html#Feature-enum">Feature</a></b> { Angles, Chapters, Titles }</li><li><div class="fn" />class <b><a href="phonon-mediacontroller-features.html">Features</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="phonon-mediacontroller.html#MediaController">__init__</a></b> (<i>self</i>, MediaObject)</li><li><div class="fn" />bool <b><a href="phonon-mediacontroller.html#autoplayTitles">autoplayTitles</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="phonon-mediacontroller.html#availableAngles">availableAngles</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-Phonon.AudioChannelDescription <b><a href="phonon-mediacontroller.html#availableAudioChannels">availableAudioChannels</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="phonon-mediacontroller.html#availableChapters">availableChapters</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-Phonon.SubtitleDescription <b><a href="phonon-mediacontroller.html#availableSubtitles">availableSubtitles</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="phonon-mediacontroller.html#availableTitles">availableTitles</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="phonon-mediacontroller.html#currentAngle">currentAngle</a></b> (<i>self</i>)</li><li><div class="fn" />AudioChannelDescription <b><a href="phonon-mediacontroller.html#currentAudioChannel">currentAudioChannel</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="phonon-mediacontroller.html#currentChapter">currentChapter</a></b> (<i>self</i>)</li><li><div class="fn" />SubtitleDescription <b><a href="phonon-mediacontroller.html#currentSubtitle">currentSubtitle</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="phonon-mediacontroller.html#currentTitle">currentTitle</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#nextTitle">nextTitle</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#previousTitle">previousTitle</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#setAutoplayTitles">setAutoplayTitles</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#setCurrentAngle">setCurrentAngle</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#setCurrentAudioChannel">setCurrentAudioChannel</a></b> (<i>self</i>, AudioChannelDescription)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#setCurrentChapter">setCurrentChapter</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#setCurrentSubtitle">setCurrentSubtitle</a></b> (<i>self</i>, SubtitleDescription)</li><li><div class="fn" /><b><a href="phonon-mediacontroller.html#setCurrentTitle">setCurrentTitle</a></b> (<i>self</i>, int)</li><li><div class="fn" />Features <b><a href="phonon-mediacontroller.html#supportedFeatures">supportedFeatures</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#angleChanged">angleChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#availableAnglesChanged">availableAnglesChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#availableAudioChannelsChanged">availableAudioChannelsChanged</a></b> ()</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#availableChaptersChanged">availableChaptersChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#availableSubtitlesChanged">availableSubtitlesChanged</a></b> ()</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#availableTitlesChanged">availableTitlesChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#chapterChanged">chapterChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="phonon-mediacontroller.html#titleChanged">titleChanged</a></b> (int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The MediaController class controls optional features of a media file/device.</p>
<p>Some media sources have content that the <a href="phonon-mediaobject.html">MediaObject</a> does not provide control over, for instance, chapters in a DVD file. The functionality the media controller offers is dependent on the type of media source that is played back. Commonly, the media controller allows you to:</p>
<ul>
<li>Navigate between <b>chapters</b>.</li>
<li>Navigate between <b>titles</b>.</li>
<li>Select between <b>angles</b>.</li>
</ul>
<p>The <a href="phonon-mediacontroller.html#Feature-enum">Feature</a> enum explains these terms in more detail, and their context in playback of CD and DVD.</p>
<p>The media controller keeps a <a href="phonon-mediaobject.html">MediaObject</a>, of which <a href="phonon-mediaobject.html#currentSource">media source</a> is played back. You can still call the media object's functions, e.g., <a href="phonon-mediaobject.html#stop">stop()</a>; this is all handled correctly by the media controller. You have the option of letting the media controller play all titles of a source in sequence by setting the <a href="phonon-mediacontroller.html#autoplayTitles">autoplay titles</a> option.</p>
<p>To start a playback using a media object, you call <a href="phonon-mediaobject.html#play">play()</a> on the media object. To play a specific title, use <a href="phonon-mediacontroller.html#setCurrentTitle">setCurrentTitle</a>() and then call <a href="phonon-mediaobject.html#play">play()</a>.</p>
<p><b>Warning:</b> The Phonon.MediaController class is not yet supported by Qt backends.</p>
<p>See also <a href="phonon-module.html">Phonon Module</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Feature-enum" />MediaController.Feature</h3><p>The values of this enum are interpreted differently depending on the type of media source, e.g., DVD or CD. We give examples for these sources.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>Phonon.MediaController.Angles</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">In the VOB (DVD) format, it is possible to to give several video streams of the same scene, each of which displays the scene from a different angle. The DVD viewer can then change between these angles.</td></tr>
<tr><td valign="top"><tt>Phonon.MediaController.Chapters</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">In the VOB format, chapters are points in a single video stream that can be played and seeked to separately.</td></tr>
<tr><td valign="top"><tt>Phonon.MediaController.Titles</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">On a CD, a title is a separate sound track. On DVD, a title is a separate VOB file.</td></tr>
</table></p>
<p>The Features type is a typedef for <a href="qflags.html">QFlags</a>&lt;Feature&gt;. It stores an OR combination of Feature values.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="MediaController" />MediaController.__init__ (<i>self</i>, <a href="phonon-mediaobject.html">MediaObject</a>)</h3><p>The <i>Phonon.MediaObject</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new <a href="phonon-mediacontroller.html">MediaController</a> with the media object (<i>parent</i>) to be used by the media controller.</p>
<p>See also <a href="phonon-mediaobject.html">MediaObject</a> and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/~MediaController" />
<h3 class="fn"><a name="autoplayTitles" />bool MediaController.autoplayTitles (<i>self</i>)</h3><p>Returns true if titles will automatically be played when the media is played; otherwise returns false.</p>
<p>The media controller will play the titles of the media source in sequence when the media object's <a href="phonon-mediaobject.html#play">play()</a> function is called. If the autoplay option is disabled, the media object will play the <a href="phonon-mediacontroller.html#currentTitle">MediaController.currentTitle()</a>{current title} and then finish the playback.</p>
<p>See also <a href="phonon-mediacontroller.html#setAutoplayTitles">setAutoplayTitles</a>() and <a href="phonon-mediacontroller.html#currentTitle">currentTitle</a>().</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/availableAngles" />
<h3 class="fn"><a name="availableAngles" />int MediaController.availableAngles (<i>self</i>)</h3><p>Returns the available angles that is available for the current media source.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/availableAnglesChanged" />
<h3 class="fn"><a name="availableAudioChannels" />list-of-Phonon.AudioChannelDescription MediaController.availableAudioChannels (<i>self</i>)</h3><h3 class="fn"><a name="availableChapters" />int MediaController.availableChapters (<i>self</i>)</h3><p>Returns the number of chapters the current media source contains.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/availableChaptersChanged" />
<h3 class="fn"><a name="availableSubtitles" />list-of-Phonon.SubtitleDescription MediaController.availableSubtitles (<i>self</i>)</h3><h3 class="fn"><a name="availableTitles" />int MediaController.availableTitles (<i>self</i>)</h3><p>Returns the number of titles that the current media source contains.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/availableTitlesChanged" />
<h3 class="fn"><a name="currentAngle" />int MediaController.currentAngle (<i>self</i>)</h3><p>Returns the angle that is currently used.</p>
<p>See also <a href="phonon-mediacontroller.html#setCurrentAngle">setCurrentAngle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/currentChapter" />
<h3 class="fn"><a name="currentAudioChannel" /><a href="phonon-audiochanneldescription.html">AudioChannelDescription</a> MediaController.currentAudioChannel (<i>self</i>)</h3><h3 class="fn"><a name="currentChapter" />int MediaController.currentChapter (<i>self</i>)</h3><p>Returns the chapter that is currently being played back.</p>
<p>See also <a href="phonon-mediacontroller.html#setCurrentChapter">setCurrentChapter</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/currentTitle" />
<h3 class="fn"><a name="currentSubtitle" /><a href="phonon-subtitledescription.html">SubtitleDescription</a> MediaController.currentSubtitle (<i>self</i>)</h3><h3 class="fn"><a name="currentTitle" />int MediaController.currentTitle (<i>self</i>)</h3><p>Returns the title that is currently played back.</p>
<p>The current title is 0 (the first) by default.</p>
<p>See also <a href="phonon-mediacontroller.html#setCurrentTitle">setCurrentTitle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/nextTitle" />
<h3 class="fn"><a name="nextTitle" />MediaController.nextTitle (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void nextTitle()</tt>.</p><p>Skips to the next title.</p>
<p>If it was playing before the title change it will start playback on the next title if autoplayTitles is enabled.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/previousTitle" />
<h3 class="fn"><a name="previousTitle" />MediaController.previousTitle (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void previousTitle()</tt>.</p><p>Skips to the previous title.</p>
<p>If it was playing before the title change it will start playback on the previous title if autoplayTitles is enabled.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/setAutoplayTitles" />
<h3 class="fn"><a name="setAutoplayTitles" />MediaController.setAutoplayTitles (<i>self</i>, bool)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setAutoplayTitles(bool)</tt>.</p><p>Sets the titles to play automatically when the media is played if <i>enable</i> is true; otherwise disables this option.</p>
<p>The media controller will play the titles of the media source in sequence when the media object's <a href="phonon-mediaobject.html#play">play()</a> function is called. If the autoplay option is disabled, the media object will play the <a href="phonon-mediacontroller.html#currentTitle">MediaController.currentTitle()</a>{current title} and then finish the playback.</p>
<p>See also <a href="phonon-mediacontroller.html#autoplayTitles">autoplayTitles</a>() and <a href="phonon-mediacontroller.html#currentTitle">currentTitle</a>().</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/setCurrentAngle" />
<h3 class="fn"><a name="setCurrentAngle" />MediaController.setCurrentAngle (<i>self</i>, int)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCurrentAngle(int)</tt>.</p><p>Sets the current angle to the given <i>angleNumber</i> if the media file or device supports navigation by angle number.</p>
<p>See also <a href="phonon-mediacontroller.html#currentAngle">currentAngle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/setCurrentChapter" />
<h3 class="fn"><a name="setCurrentAudioChannel" />MediaController.setCurrentAudioChannel (<i>self</i>, <a href="phonon-audiochanneldescription.html">AudioChannelDescription</a>)</h3><h3 class="fn"><a name="setCurrentChapter" />MediaController.setCurrentChapter (<i>self</i>, int)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCurrentChapter(int)</tt>.</p><p>Sets the current chapter to the given <i>chapterNumber</i> if the media file or device supports navigation by chapter number.</p>
<p>See also <a href="phonon-mediacontroller.html#currentChapter">currentChapter</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/setCurrentTitle" />
<h3 class="fn"><a name="setCurrentSubtitle" />MediaController.setCurrentSubtitle (<i>self</i>, <a href="phonon-subtitledescription.html">SubtitleDescription</a>)</h3><h3 class="fn"><a name="setCurrentTitle" />MediaController.setCurrentTitle (<i>self</i>, int)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCurrentTitle(int)</tt>.</p><p>Skips to the given title <i>titleNumber</i>.</p>
<p>If it was playing before the title change it will start playback on the new title if autoplayTitles is enabled.</p>
<p>See also <a href="phonon-mediacontroller.html#currentTitle">currentTitle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/supportedFeatures" />
<h3 class="fn"><a name="supportedFeatures" /><a href="phonon-mediacontroller-features.html">Features</a> MediaController.supportedFeatures (<i>self</i>)</h3><a name="//apple_ref/cpp/instm/Phonon::MediaController/titleChanged" />
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="angleChanged" />void angleChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the current angle changes. The new angle number is given by <i>angleNumber</i>.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/autoplayTitles" />
<h3 class="fn"><a name="availableAnglesChanged" />void availableAnglesChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the number of available angles changes. The new number of available angles is given by <i>availableAngles</i>.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/availableChapters" />
<h3 class="fn"><a name="availableAudioChannelsChanged" />void availableAudioChannelsChanged ()</h3><p>This is the default overload of this signal.</p><h3 class="fn"><a name="availableChaptersChanged" />void availableChaptersChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the number of available chapters changes. The new number of available chapters is given by <i>availableChapters</i>.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/availableTitles" />
<h3 class="fn"><a name="availableSubtitlesChanged" />void availableSubtitlesChanged ()</h3><p>This is the default overload of this signal.</p><h3 class="fn"><a name="availableTitlesChanged" />void availableTitlesChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the number of available titles changes. The new number of available titles is given by <i>availableTitles</i>.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/chapterChanged" />
<h3 class="fn"><a name="chapterChanged" />void chapterChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the current chapter changes. The new chapter number is given by <i>chapterNumber</i>.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::MediaController/currentAngle" />
<h3 class="fn"><a name="titleChanged" />void titleChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the current title changes. The new title number is given by <i>titleNumber</i>.</p>
<p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.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> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>