/usr/share/qt5/doc/qtmultimedia/qmediaplayer.html is in qtmultimedia5-doc-html 5.2.1-0ubuntu5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qmediaplayer.cpp -->
<title>QMediaPlayer Class | QtMultimedia 5.2</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.2</li>
<li><a href="qtmultimedia-index.html">Qt Multimedia</a></li>
<li><a href="qtmultimedia-module.html">C++ Classes</a></li>
<li>QMediaPlayer</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QMediaPlayer Class</h1>
<!-- $$$QMediaPlayer-brief -->
<p>The QMediaPlayer class allows the playing of a media source. <a href="#details">More...</a></p>
<!-- @@@QMediaPlayer -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include <QMediaPlayer></span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += multimedia</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qmediaobject.html">QMediaObject</a>.</td></tr></table><ul>
<li><a href="qmediaplayer-members.html">List of all members, including inherited members</a></li>
<li><a href="qmediaplayer-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#Error-enum">Error</a></b> { NoError, ResourceError, FormatError, NetworkError, AccessDeniedError, ServiceMissingError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#Flag-enum">Flag</a></b> { LowLatency, StreamPlayback, VideoSurface }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#Flag-enum">Flags</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#MediaStatus-enum">MediaStatus</a></b> { UnknownMediaStatus, NoMedia, LoadingMedia, LoadedMedia, ..., InvalidMedia }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#State-enum">State</a></b> { StoppedState, PlayingState, PausedState }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qmediaplayer.html#audioAvailable-prop">audioAvailable</a></b> : const bool</li>
<li class="fn"><b><a href="qmediaplayer.html#bufferStatus-prop">bufferStatus</a></b> : const int</li>
<li class="fn"><b><a href="qmediaplayer.html#currentMedia-prop">currentMedia</a></b> : const QMediaContent</li>
<li class="fn"><b><a href="qmediaplayer.html#duration-prop">duration</a></b> : const qint64</li>
<li class="fn"><b><a href="qmediaplayer.html#error-prop">error</a></b> : const QString</li>
<li class="fn"><b><a href="qmediaplayer.html#media-prop">media</a></b> : QMediaContent</li>
<li class="fn"><b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a></b> : const MediaStatus</li>
<li class="fn"><b><a href="qmediaplayer.html#muted-prop">muted</a></b> : bool</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qmediaplayer.html#playbackRate-prop">playbackRate</a></b> : qreal</li>
<li class="fn"><b><a href="qmediaplayer.html#playlist-prop">playlist</a></b> : QMediaPlaylist *</li>
<li class="fn"><b><a href="qmediaplayer.html#position-prop">position</a></b> : qint64</li>
<li class="fn"><b><a href="qmediaplayer.html#seekable-prop">seekable</a></b> : const bool</li>
<li class="fn"><b><a href="qmediaplayer.html#state-prop">state</a></b> : const State</li>
<li class="fn"><b><a href="qmediaplayer.html#videoAvailable-prop">videoAvailable</a></b> : const bool</li>
<li class="fn"><b><a href="qmediaplayer.html#volume-prop">volume</a></b> : int</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">1 property inherited from <a href="qmediaobject.html#properties">QMediaObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#QMediaPlayer">QMediaPlayer</a></b>(QObject *<i> parent</i> = 0, Flags<i> flags</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#dtor.QMediaPlayer">~QMediaPlayer</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#bufferStatus-prop">bufferStatus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#currentMedia-prop">currentMedia</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkConfiguration </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#currentNetworkConfiguration">currentNetworkConfiguration</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#duration-prop">duration</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#error-prop">errorString</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioAvailable-prop">isAudioAvailable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#muted-prop">isMuted</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#seekable-prop">isSeekable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#videoAvailable-prop">isVideoAvailable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#media-prop">media</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> MediaStatus </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#mediaStream">mediaStream</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playbackRate-prop">playbackRate</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMediaPlaylist * </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playlist-prop">playlist</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#position-prop">position</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setVideoOutput">setVideoOutput</a></b>(QVideoWidget *<i> output</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setVideoOutput-2">setVideoOutput</a></b>(QGraphicsVideoItem *<i> output</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setVideoOutput-3">setVideoOutput</a></b>(QAbstractVideoSurface *<i> surface</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#state-prop">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#volume-prop">volume</a></b>() const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMultimedia::AvailabilityStatus </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#availability">availability</a></b>() const</td></tr>
</table>
<ul>
<li class="fn">10 public functions inherited from <a href="qmediaobject.html#public-functions">QMediaObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#pause">pause</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#play">play</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#media-prop">setMedia</a></b>(const QMediaContent &<i> media</i>, QIODevice *<i> stream</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#muted-prop">setMuted</a></b>(bool<i> muted</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#setNetworkConfigurations">setNetworkConfigurations</a></b>(const QList<QNetworkConfiguration> &<i> configurations</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playbackRate-prop">setPlaybackRate</a></b>(qreal<i> rate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playlist-prop">setPlaylist</a></b>(QMediaPlaylist *<i> playlist</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#position-prop">setPosition</a></b>(qint64<i> position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#volume-prop">setVolume</a></b>(int<i> volume</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#stop">stop</a></b>()</td></tr>
</table>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#audioAvailable-prop">audioAvailableChanged</a></b>(bool<i> available</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#bufferStatus-prop">bufferStatusChanged</a></b>(int<i> percentFilled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#currentMedia-prop">currentMediaChanged</a></b>(const QMediaContent &<i> media</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#duration-prop">durationChanged</a></b>(qint64<i> duration</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#error-2">error</a></b>(QMediaPlayer::Error<i> error</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#media-prop">mediaChanged</a></b>(const QMediaContent &<i> media</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatusChanged</a></b>(QMediaPlayer::MediaStatus<i> status</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#muted-prop">mutedChanged</a></b>(bool<i> muted</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#networkConfigurationChanged">networkConfigurationChanged</a></b>(const QNetworkConfiguration &<i> configuration</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#playbackRate-prop">playbackRateChanged</a></b>(qreal<i> rate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#position-prop">positionChanged</a></b>(qint64<i> position</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#seekable-prop">seekableChanged</a></b>(bool<i> seekable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#state-prop">stateChanged</a></b>(QMediaPlayer::State<i> state</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#videoAvailable-prop">videoAvailableChanged</a></b>(bool<i> videoAvailable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#volume-prop">volumeChanged</a></b>(int<i> volume</i>)</td></tr>
</table>
<ul>
<li class="fn">6 signals inherited from <a href="qmediaobject.html#signals">QMediaObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QMultimedia::SupportEstimate </td><td class="memItemRight bottomAlign"><b><a href="qmediaplayer.html#hasSupport">hasSupport</a></b>(const QString &<i> mimeType</i>, const QStringList &<i> codecs</i> = QStringList(), Flags<i> flags</i> = 0)</td></tr>
</table>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">2 protected functions inherited from <a href="qmediaobject.html#protected-functions">QMediaObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QMediaPlayer-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QMediaPlayer class allows the playing of a media source.</p>
<p>The QMediaPlayer class is a high level media playback class. It can be used to playback such content as songs, movies and internet radio. The content to playback is specified as a <a href="qmediacontent.html">QMediaContent</a> object, which can be thought of as a main or canonical URL with additional information attached. When provided with a <a href="qmediacontent.html">QMediaContent</a> playback may be able to commence.</p>
<pre class="cpp">player <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QMediaPlayer</span>;
connect(player<span class="operator">,</span> SIGNAL(positionChanged(<span class="type">qint64</span>))<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(positionChanged(<span class="type">qint64</span>)));
player<span class="operator">-</span><span class="operator">></span>setMedia(<span class="type">QUrl</span><span class="operator">::</span>fromLocalFile(<span class="string">"/Users/me/Music/coolsong.mp3"</span>));
player<span class="operator">-</span><span class="operator">></span>setVolume(<span class="number">50</span>);
player<span class="operator">-</span><span class="operator">></span>play();</pre>
<p>QVideoWidget can be used with QMediaPlayer for video rendering and <a href="qmediaplaylist.html">QMediaPlaylist</a> for accessing playlist functionality.</p>
<pre class="cpp">playlist <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmediaplaylist.html">QMediaPlaylist</a></span>;
playlist<span class="operator">-</span><span class="operator">></span>addMedia(<span class="type">QUrl</span>(<span class="string">"http://example.com/movie1.mp4"</span>));
playlist<span class="operator">-</span><span class="operator">></span>addMedia(<span class="type">QUrl</span>(<span class="string">"http://example.com/movie2.mp4"</span>));
playlist<span class="operator">-</span><span class="operator">></span>addMedia(<span class="type">QUrl</span>(<span class="string">"http://example.com/movie3.mp4"</span>));
playlist<span class="operator">-</span><span class="operator">></span>setCurrentIndex(<span class="number">1</span>);
player <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QMediaPlayer</span>;
player<span class="operator">-</span><span class="operator">></span>setPlaylist(playlist);
videoWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QVideoWidget</span>;
player<span class="operator">-</span><span class="operator">></span>setVideoOutput(videoWidget);
videoWidget<span class="operator">-</span><span class="operator">></span>show();
player<span class="operator">-</span><span class="operator">></span>play();</pre>
<p>Since QMediaPlayer is a <a href="qmediaobject.html">QMediaObject</a>, you can use several of the <a href="qmediaobject.html">QMediaObject</a> functions for things like:</p>
<ul>
<li>Accessing the currently playing media's metadata (<a href="qmediaobject.html#metaData">QMediaObject::metaData</a>() and <a href="qmediametadata.html">predefined meta-data keys</a>)</li>
<li>Checking to see if the media playback service is currently available (<a href="qmediaobject.html#availability">QMediaObject::availability</a>())</li>
</ul>
</div>
<p><b>See also </b><a href="qmediaobject.html">QMediaObject</a>, <a href="qmediaservice.html">QMediaService</a>, QVideoWidget, and <a href="qmediaplaylist.html">QMediaPlaylist</a>.</p>
<!-- @@@QMediaPlayer -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$ResourceError$$$FormatError$$$NetworkError$$$AccessDeniedError$$$ServiceMissingError$$$MediaIsPlaylist -->
<h3 class="fn"><a name="Error-enum"></a>enum QMediaPlayer::<span class="name">Error</span></h3>
<p>Defines a media player error condition.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::NoError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No error has occurred.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::ResourceError</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A media resource couldn't be resolved.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::FormatError</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The format of a media resource isn't (fully) supported. Playback may still be possible, but without an audio or video component.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::NetworkError</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">A network error occurred.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::AccessDeniedError</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">There are not the appropriate permissions to play a media resource.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::ServiceMissingError</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">A valid playback service was not found, playback cannot proceed.</td></tr>
</table>
<!-- @@@Error -->
<!-- $$$Flag$$$LowLatency$$$StreamPlayback$$$VideoSurface -->
<h3 class="flags"><a name="Flag-enum"></a>enum QMediaPlayer::<span class="name">Flag</span><br/>flags QMediaPlayer::<span class="name">Flags</span></h3>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::LowLatency</tt></td><td class="topAlign"><tt>0x01</tt></td><td class="topAlign">The player is expected to be used with simple audio formats, but playback should start without significant delay. Such playback service can be used for beeps, ringtones, etc.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::StreamPlayback</tt></td><td class="topAlign"><tt>0x02</tt></td><td class="topAlign">The player is expected to play QIODevice based streams. If passed to <a href="qmediaplayer.html">QMediaPlayer</a> constructor, the service supporting streams playback will be chosen.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::VideoSurface</tt></td><td class="topAlign"><tt>0x04</tt></td><td class="topAlign">The player is expected to be able to render to a <a href="qabstractvideosurface.html">QAbstractVideoSurface</a> <a href="qmediaplayer.html#setVideoOutput">output</a>.</td></tr>
</table>
<p>The Flags type is a typedef for <a href="">QFlags</a><Flag>. It stores an OR combination of Flag values.</p>
<!-- @@@Flag -->
<!-- $$$MediaStatus$$$UnknownMediaStatus$$$NoMedia$$$LoadingMedia$$$LoadedMedia$$$StalledMedia$$$BufferingMedia$$$BufferedMedia$$$EndOfMedia$$$InvalidMedia -->
<h3 class="fn"><a name="MediaStatus-enum"></a>enum QMediaPlayer::<span class="name">MediaStatus</span></h3>
<p>Defines the status of a media player's current media.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::UnknownMediaStatus</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The status of the media cannot be determined.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::NoMedia</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The is no current media. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::LoadingMedia</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The current media is being loaded. The player may be in any state.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::LoadedMedia</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The current media has been loaded. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::StalledMedia</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Playback of the current media has stalled due to insufficient buffering or some other temporary interruption. The player is in the <a href="qmediaplayer.html#State-enum">PlayingState</a> or <a href="qmediaplayer.html#State-enum">PausedState</a>.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::BufferingMedia</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The player is buffering data but has enough data buffered for playback to continue for the immediate future. The player is in the <a href="qmediaplayer.html#State-enum">PlayingState</a> or <a href="qmediaplayer.html#State-enum">PausedState</a>.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::BufferedMedia</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">The player has fully buffered the current media. The player is in the <a href="qmediaplayer.html#State-enum">PlayingState</a> or <a href="qmediaplayer.html#State-enum">PausedState</a>.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::EndOfMedia</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">Playback has reached the end of the current media. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::InvalidMedia</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">The current media cannot be played. The player is in the <a href="qmediaplayer.html#State-enum">StoppedState</a>.</td></tr>
</table>
<!-- @@@MediaStatus -->
<!-- $$$State$$$StoppedState$$$PlayingState$$$PausedState -->
<h3 class="fn"><a name="State-enum"></a>enum QMediaPlayer::<span class="name">State</span></h3>
<p>Defines the current state of a media player.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::StoppedState</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The media player is not playing content, playback will begin from the start of the current track.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::PlayingState</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The media player is currently playing content.</td></tr>
<tr><td class="topAlign"><tt>QMediaPlayer::PausedState</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The media player has paused playback, playback of the current track will resume from the position the player was paused at.</td></tr>
</table>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$audioAvailable-prop$$$isAudioAvailable$$$audioAvailableChangedbool -->
<h3 class="fn"><a name="audioAvailable-prop"></a><span class="name">audioAvailable</span> : const <span class="type">bool</span></h3>
<p>This property holds the audio availabilty status for the current media.</p>
<p>As the life time of <a href="qmediaplayer.html">QMediaPlayer</a> can be longer than the playback of one <a href="qmediacontent.html">QMediaContent</a>, this property may change over time, the audioAvailableChanged signal can be used to monitor it's status.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isAudioAvailable</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>audioAvailableChanged</b></span>(bool<i> available</i>)</td></tr>
</table>
<!-- @@@audioAvailable -->
<!-- $$$bufferStatus-prop$$$bufferStatus$$$bufferStatusChangedint -->
<h3 class="fn"><a name="bufferStatus-prop"></a><span class="name">bufferStatus</span> : const <span class="type">int</span></h3>
<p>This property holds the percentage of the temporary buffer filled before playback begins.</p>
<p>When the player object is buffering; this property holds the percentage of the temporary buffer that is filled. The buffer will need to reach 100% filled before playback can resume, at which time the <a href="qmediaplayer.html#MediaStatus-enum">MediaStatus</a> will be <a href="qmediaplayer.html#MediaStatus-enum">BufferedMedia</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>bufferStatus</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>bufferStatusChanged</b></span>(int<i> percentFilled</i>)</td></tr>
</table>
<p><b>See also </b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a>().</p>
<!-- @@@bufferStatus -->
<!-- $$$currentMedia-prop$$$currentMedia$$$currentMediaChangedconstQMediaContent& -->
<h3 class="fn"><a name="currentMedia-prop"></a><span class="name">currentMedia</span> : const <span class="type"><a href="qmediacontent.html">QMediaContent</a></span></h3>
<p>This property holds the current active media content being played by the player object. This value could be different from QMediaPlayer::media property if a playlist is used. In this case currentMedia indicates the current media content being processed by the player, while QMediaPlayer::media property contains the original playlist.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><span class="name"><b>currentMedia</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>currentMediaChanged</b></span>(const QMediaContent &<i> media</i>)</td></tr>
</table>
<p><b>See also </b><a href="qmediacontent.html">QMediaContent</a> and <a href="qmediaplayer.html#media-prop">media</a>().</p>
<!-- @@@currentMedia -->
<!-- $$$duration-prop$$$duration$$$durationChangedqint64 -->
<h3 class="fn"><a name="duration-prop"></a><span class="name">duration</span> : const <span class="type">qint64</span></h3>
<p>This property holds the duration of the current media.</p>
<p>The value is the total playback time in milliseconds of the current media. The value may change across the life time of the <a href="qmediaplayer.html">QMediaPlayer</a> object and may not be available when initial playback begins, connect to the durationChanged() signal to receive status notifications.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><span class="name"><b>duration</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>durationChanged</b></span>(qint64<i> duration</i>)</td></tr>
</table>
<!-- @@@duration -->
<!-- $$$error-prop$$$errorString -->
<h3 class="fn"><a name="error-prop"></a><span class="name">error</span> : const <span class="type">QString</span></h3>
<p>This property holds a string describing the last error condition.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>errorString</b></span>() const</td></tr>
</table>
<p><b>See also </b><a href="qmediaplayer.html#error">error</a>().</p>
<!-- @@@error -->
<!-- $$$media-prop$$$media$$$setMediaconstQMediaContent&QIODevice*$$$mediaChangedconstQMediaContent& -->
<h3 class="fn"><a name="media-prop"></a><span class="name">media</span> : <span class="type"><a href="qmediacontent.html">QMediaContent</a></span></h3>
<p>This property holds the active media source being used by the player object.</p>
<p>The player object will use the <a href="qmediacontent.html">QMediaContent</a> for selection of the content to be played.</p>
<p>By default this property has a null <a href="qmediacontent.html">QMediaContent</a>.</p>
<p>Setting this property to a null <a href="qmediacontent.html">QMediaContent</a> will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QMediaContent </td><td class="memItemRight bottomAlign"><span class="name"><b>media</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMedia</b></span>(const QMediaContent &<i> media</i>, QIODevice *<i> stream</i> = 0)</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mediaChanged</b></span>(const QMediaContent &<i> media</i>)</td></tr>
</table>
<p><b>See also </b><a href="qmediacontent.html">QMediaContent</a> and <a href="qmediaplayer.html#currentMedia-prop">currentMedia</a>().</p>
<!-- @@@media -->
<!-- $$$mediaStatus-prop$$$mediaStatus$$$mediaStatusChangedQMediaPlayer::MediaStatus -->
<h3 class="fn"><a name="mediaStatus-prop"></a><span class="name">mediaStatus</span> : const <span class="type"><a href="qmediaplayer.html#MediaStatus-enum">MediaStatus</a></span></h3>
<p>This property holds the status of the current media stream.</p>
<p>The stream status describes how the playback of the current stream is progressing.</p>
<p>By default this property is <a href="qmediaplayer.html#MediaStatus-enum">QMediaPlayer::NoMedia</a></p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> MediaStatus </td><td class="memItemRight bottomAlign"><span class="name"><b>mediaStatus</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mediaStatusChanged</b></span>(QMediaPlayer::MediaStatus<i> status</i>)</td></tr>
</table>
<p><b>See also </b><a href="qmediaplayer.html#state-prop">state</a>.</p>
<!-- @@@mediaStatus -->
<!-- $$$muted-prop$$$isMuted$$$setMutedbool$$$mutedChangedbool -->
<h3 class="fn"><a name="muted-prop"></a><span class="name">muted</span> : <span class="type">bool</span></h3>
<p>This property holds the muted state of the current media.</p>
<p>The value will be true if the playback volume is muted; otherwise false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isMuted</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMuted</b></span>(bool<i> muted</i>)</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>mutedChanged</b></span>(bool<i> muted</i>)</td></tr>
</table>
<!-- @@@muted -->
<!-- $$$playbackRate-prop$$$playbackRate$$$setPlaybackRateqreal$$$playbackRateChangedqreal -->
<h3 class="fn"><a name="playbackRate-prop"></a><span class="name">playbackRate</span> : <span class="type">qreal</span></h3>
<p>This property holds the playback rate of the current media.</p>
<p>This value is a multiplier applied to the media's standard play rate. By default this value is 1.0, indicating that the media is playing at the standard pace. Values higher than 1.0 will increase the rate of play. Values less than zero can be set and indicate the media will rewind at the multiplier of the standard pace.</p>
<p>Not all playback services support change of the playback rate. It is framework defined as to the status and quality of audio and video while fast forwarding or rewinding.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>playbackRate</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPlaybackRate</b></span>(qreal<i> rate</i>)</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>playbackRateChanged</b></span>(qreal<i> rate</i>)</td></tr>
</table>
<!-- @@@playbackRate -->
<!-- $$$playlist-prop$$$playlist$$$setPlaylistQMediaPlaylist* -->
<h3 class="fn"><a name="playlist-prop"></a><span class="name">playlist</span> : <span class="type"><a href="qmediaplaylist.html">QMediaPlaylist</a></span> *</h3>
<p>This property holds the media playlist being used by the player object.</p>
<p>The player object will use the current playlist item for selection of the content to be played.</p>
<p>By default this property is set to null.</p>
<p>If the media playlist is used as a source, <a href="qmediaplayer.html#currentMedia-prop">QMediaPlayer::currentMedia</a> is updated with a current playlist item. The current source should be selected with QMediaPlaylist::setCurrentIndex(int) instead of <a href="qmediaplayer.html#media-prop">QMediaPlayer::setMedia</a>(), otherwise the current playlist will be discarded.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QMediaPlaylist * </td><td class="memItemRight bottomAlign"><span class="name"><b>playlist</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPlaylist</b></span>(QMediaPlaylist *<i> playlist</i>)</td></tr>
</table>
<p><b>See also </b><a href="qmediacontent.html">QMediaContent</a>.</p>
<!-- @@@playlist -->
<!-- $$$position-prop$$$position$$$setPositionqint64$$$positionChangedqint64 -->
<h3 class="fn"><a name="position-prop"></a><span class="name">position</span> : <span class="type">qint64</span></h3>
<p>This property holds the playback position of the current media.</p>
<p>The value is the current playback position, expressed in milliseconds since the beginning of the media. Periodically changes in the position will be indicated with the signal positionChanged(), the interval between updates can be set with <a href="qmediaobject.html">QMediaObject</a>'s method <a href="qmediaobject.html#notifyInterval-prop">setNotifyInterval</a>().</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><span class="name"><b>position</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPosition</b></span>(qint64<i> position</i>)</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>positionChanged</b></span>(qint64<i> position</i>)</td></tr>
</table>
<!-- @@@position -->
<!-- $$$seekable-prop$$$isSeekable$$$seekableChangedbool -->
<h3 class="fn"><a name="seekable-prop"></a><span class="name">seekable</span> : const <span class="type">bool</span></h3>
<p>This property holds the seek-able status of the current media.</p>
<p>If seeking is supported this property will be true; false otherwise. The status of this property may change across the life time of the <a href="qmediaplayer.html">QMediaPlayer</a> object, use the seekableChanged signal to monitor changes.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isSeekable</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>seekableChanged</b></span>(bool<i> seekable</i>)</td></tr>
</table>
<!-- @@@seekable -->
<!-- $$$state-prop$$$state$$$stateChangedQMediaPlayer::State -->
<h3 class="fn"><a name="state-prop"></a><span class="name">state</span> : const <span class="type"><a href="qmediaplayer.html#State-enum">State</a></span></h3>
<p>This property holds the media player's playback state.</p>
<p>By default this property is QMediaPlayer::Stopped</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> State </td><td class="memItemRight bottomAlign"><span class="name"><b>state</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>stateChanged</b></span>(QMediaPlayer::State<i> state</i>)</td></tr>
</table>
<p><b>See also </b><a href="qmediaplayer.html#mediaStatus-prop">mediaStatus</a>(), <a href="qmediaplayer.html#play">play</a>(), <a href="qmediaplayer.html#pause">pause</a>(), and <a href="qmediaplayer.html#stop">stop</a>().</p>
<!-- @@@state -->
<!-- $$$videoAvailable-prop$$$isVideoAvailable$$$videoAvailableChangedbool -->
<h3 class="fn"><a name="videoAvailable-prop"></a><span class="name">videoAvailable</span> : const <span class="type">bool</span></h3>
<p>This property holds the video availability status for the current media.</p>
<p>If available, the QVideoWidget class can be used to view the video. As the life time of <a href="qmediaplayer.html">QMediaPlayer</a> can be longer than the playback of one <a href="qmediacontent.html">QMediaContent</a>, this property may change over time, the videoAvailableChanged signal can be used to monitor it's status.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isVideoAvailable</b></span>() const</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>videoAvailableChanged</b></span>(bool<i> videoAvailable</i>)</td></tr>
</table>
<p><b>See also </b>QVideoWidget and <a href="qmediacontent.html">QMediaContent</a>.</p>
<!-- @@@videoAvailable -->
<!-- $$$volume-prop$$$volume$$$setVolumeint$$$volumeChangedint -->
<h3 class="fn"><a name="volume-prop"></a><span class="name">volume</span> : <span class="type">int</span></h3>
<p>This property holds the current playback volume.</p>
<p>The playback volume is linear in effect and the value can range from 0 - 100, values outside this range will be clamped.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>volume</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVolume</b></span>(int<i> volume</i>)</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>volumeChanged</b></span>(int<i> volume</i>)</td></tr>
</table>
<!-- @@@volume -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QMediaPlayer[overload1]$$$QMediaPlayerQObject*Flags -->
<h3 class="fn"><a name="QMediaPlayer"></a>QMediaPlayer::<span class="name">QMediaPlayer</span>(<span class="type">QObject</span> *<i> parent</i> = 0, <span class="type"><a href="qmediaplayer.html#Flag-enum">Flags</a></span><i> flags</i> = 0)</h3>
<p>Construct a <a href="qmediaplayer.html">QMediaPlayer</a> instance parented to <i>parent</i> and with <i>flags</i>.</p>
<!-- @@@QMediaPlayer -->
<!-- $$$~QMediaPlayer[overload1]$$$~QMediaPlayer -->
<h3 class="fn"><a name="dtor.QMediaPlayer"></a>QMediaPlayer::<span class="name">~QMediaPlayer</span>()</h3>
<p>Destroys the player object.</p>
<!-- @@@~QMediaPlayer -->
<!-- $$$availability[overload1]$$$availability -->
<h3 class="fn"><a name="availability"></a><span class="type"><a href="qmultimedia.html#AvailabilityStatus-enum">QMultimedia::AvailabilityStatus</a></span> QMediaPlayer::<span class="name">availability</span>() const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qmediaobject.html#availability">QMediaObject::availability</a>().</p>
<!-- @@@availability -->
<!-- $$$currentNetworkConfiguration[overload1]$$$currentNetworkConfiguration -->
<h3 class="fn"><a name="currentNetworkConfiguration"></a><span class="type">QNetworkConfiguration</span> QMediaPlayer::<span class="name">currentNetworkConfiguration</span>() const</h3>
<p>Returns the current network access point in use. If a default contructed QNetworkConfiguration is returned this feature is not available or that none of the current supplied configurations are in use.</p>
<!-- @@@currentNetworkConfiguration -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn"><a name="error"></a><span class="type"><a href="qmediaplayer.html#Error-enum">Error</a></span> QMediaPlayer::<span class="name">error</span>() const</h3>
<p>Returns the current error state.</p>
<!-- @@@error -->
<!-- $$$error$$$errorQMediaPlayer::Error -->
<h3 class="fn"><a name="error-2"></a><span class="type">void</span> QMediaPlayer::<span class="name">error</span>(<span class="type"><a href="qmediaplayer.html#Error-enum">QMediaPlayer::Error</a></span><i> error</i>)<tt> [signal]</tt></h3>
<p>Signals that an <i>error</i> condition has occurred.</p>
<p><b>See also </b><a href="qmediaplayer.html#error-prop">errorString</a>().</p>
<!-- @@@error -->
<!-- $$$hasSupport[overload1]$$$hasSupportconstQString&constQStringList&Flags -->
<h3 class="fn"><a name="hasSupport"></a><span class="type"><a href="qmultimedia.html#SupportEstimate-enum">QMultimedia::SupportEstimate</a></span> QMediaPlayer::<span class="name">hasSupport</span>(const <span class="type">QString</span> &<i> mimeType</i>, const <span class="type">QStringList</span> &<i> codecs</i> = QStringList(), <span class="type"><a href="qmediaplayer.html#Flag-enum">Flags</a></span><i> flags</i> = 0)<tt> [static]</tt></h3>
<p>Returns the level of support a media player has for a <i>mimeType</i> and a set of <i>codecs</i>.</p>
<p>The <i>flags</i> argument allows additional requirements such as performance indicators to be specified.</p>
<!-- @@@hasSupport -->
<!-- $$$mediaStream[overload1]$$$mediaStream -->
<h3 class="fn"><a name="mediaStream"></a>const <span class="type">QIODevice</span> * QMediaPlayer::<span class="name">mediaStream</span>() const</h3>
<p>Returns the stream source of media data.</p>
<p>This is only valid if a stream was passed to <a href="qmediaplayer.html#media-prop">setMedia</a>().</p>
<p><b>See also </b><a href="qmediaplayer.html#media-prop">setMedia</a>().</p>
<!-- @@@mediaStream -->
<!-- $$$networkConfigurationChanged[overload1]$$$networkConfigurationChangedconstQNetworkConfiguration& -->
<h3 class="fn"><a name="networkConfigurationChanged"></a><span class="type">void</span> QMediaPlayer::<span class="name">networkConfigurationChanged</span>(const <span class="type">QNetworkConfiguration</span> &<i> configuration</i>)<tt> [signal]</tt></h3>
<p>Signal that the active in use network access point has been changed to <i>configuration</i> and all subsequent network access will use this <i>configuration</i>.</p>
<!-- @@@networkConfigurationChanged -->
<!-- $$$pause[overload1]$$$pause -->
<h3 class="fn"><a name="pause"></a><span class="type">void</span> QMediaPlayer::<span class="name">pause</span>()<tt> [slot]</tt></h3>
<p>Pause playing the current source.</p>
<!-- @@@pause -->
<!-- $$$play[overload1]$$$play -->
<h3 class="fn"><a name="play"></a><span class="type">void</span> QMediaPlayer::<span class="name">play</span>()<tt> [slot]</tt></h3>
<p>Start or resume playing the current source.</p>
<!-- @@@play -->
<!-- $$$setNetworkConfigurations[overload1]$$$setNetworkConfigurationsconstQList<QNetworkConfiguration>& -->
<h3 class="fn"><a name="setNetworkConfigurations"></a><span class="type">void</span> QMediaPlayer::<span class="name">setNetworkConfigurations</span>(const <span class="type">QList</span><<span class="type">QNetworkConfiguration</span>> &<i> configurations</i>)<tt> [slot]</tt></h3>
<p>Sets the network access points for remote media playback. <i>configurations</i> contains, in ascending preferential order, a list of configuration that can be used for network access.</p>
<p>This will invalidate the choice of previous configurations.</p>
<!-- @@@setNetworkConfigurations -->
<!-- $$$setVideoOutput[overload1]$$$setVideoOutputQVideoWidget* -->
<h3 class="fn"><a name="setVideoOutput"></a><span class="type">void</span> QMediaPlayer::<span class="name">setVideoOutput</span>(<span class="type">QVideoWidget</span> *<i> output</i>)</h3>
<p>Attach a QVideoWidget video <i>output</i> to the media player.</p>
<p>If the media player has already video output attached, it will be replaced with a new one.</p>
<!-- @@@setVideoOutput -->
<!-- $$$setVideoOutput$$$setVideoOutputQGraphicsVideoItem* -->
<h3 class="fn"><a name="setVideoOutput-2"></a><span class="type">void</span> QMediaPlayer::<span class="name">setVideoOutput</span>(<span class="type">QGraphicsVideoItem</span> *<i> output</i>)</h3>
<p>Attach a QGraphicsVideoItem video <i>output</i> to the media player.</p>
<p>If the media player has already video output attached, it will be replaced with a new one.</p>
<!-- @@@setVideoOutput -->
<!-- $$$setVideoOutput$$$setVideoOutputQAbstractVideoSurface* -->
<h3 class="fn"><a name="setVideoOutput-3"></a><span class="type">void</span> QMediaPlayer::<span class="name">setVideoOutput</span>(<span class="type"><a href="qabstractvideosurface.html">QAbstractVideoSurface</a></span> *<i> surface</i>)</h3>
<p>Sets a video <i>surface</i> as the video output of a media player.</p>
<p>If a video output has already been set on the media player the new surface will replace it.</p>
<!-- @@@setVideoOutput -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn"><a name="stop"></a><span class="type">void</span> QMediaPlayer::<span class="name">stop</span>()<tt> [slot]</tt></h3>
<p>Stop playing, and reset the play position to the beginning.</p>
<!-- @@@stop -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|