Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4394

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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" />
<!-- phonon-api.qdoc -->
  <title>Qt 4.8: MediaSource Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="phonon.html">Phonon</a></li>
<li>MediaSource</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <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="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#qt-backends">Qt Backends</a></li>
</ul>
</div>
<h1 class="title">MediaSource Class Reference</h1>
<span class="small-subtitle">(Phonon::MediaSource)<br/></span>
<!-- $$$MediaSource-brief -->
<p>The MediaSource class provides multimedia data for media objects. <a href="#details">More...</a></p>
<!-- @@@MediaSource -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Phonon/MediaSource&gt;</span></pre><p>This class was introduced in Qt 4.4.</p>
<ul>
<li><a href="phonon-mediasource-members.html">List of all members, including inherited 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="phonon-mediasource.html#Type-enum">Type</a></b> { Invalid, LocalFile, Url, Disc, Stream, Empty }</td></tr>
</table>
<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="phonon-mediasource.html#MediaSource">MediaSource</a></b> ( const QString &amp; <i>fileName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#MediaSource-3">MediaSource</a></b> ( const QUrl &amp; <i>url</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#MediaSource-4">MediaSource</a></b> ( Phonon::DiscType <i>discType</i>, const QString &amp; <i>deviceName</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#MediaSource-6">MediaSource</a></b> ( QIODevice * <i>ioDevice</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#MediaSource-7">MediaSource</a></b> ( const MediaSource &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#dtor.MediaSource">~MediaSource</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#autoDelete">autoDelete</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#deviceName">deviceName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Phonon::DiscType </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#discType">discType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#fileName">fileName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#setAutoDelete">setAutoDelete</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#url">url</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> MediaSource &amp; </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#operator-eq">operator=</a></b> ( const MediaSource &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="phonon-mediasource.html#operator-eq-eq">operator==</a></b> ( const MediaSource &amp; <i>other</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$MediaSource-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The MediaSource class provides multimedia data for media objects.</p>
<p>The MediaSource class manages a source of multimedia content, such as a music or video file, of which data is given to a <a href="phonon-mediaobject.html">MediaObject</a>.</p>
<p>The media source knows how fetch its data from several sources, e.g&#x2e;, from files, a <a href="qiodevice.html">QIODevice</a>, or a CD. The possible source types are described by the <a href="phonon-mediasource.html#Type-enum">Type</a> enum. The type of the source is set by the media source itself, and is dependent on the constructor used to create it. Note that it is possible to provide data from any source by implementing a <a href="qiodevice.html">QIODevice</a>.</p>
<p>The class has several functions to acquire information about the source it manages, e.g&#x2e;, <a href="phonon-mediasource.html#fileName">fileName</a>() and <a href="phonon-mediasource.html#url">url</a>(). The return from these functions are dependent on the <a href="phonon-mediasource.html#type">type</a>() of the media source.</p>
<p>Normally, a programmer does not need to be concerned with media sources. It's constructors are implicit, so one can, for instance, send an URL or filename directly to the constructors of the <a href="phonon-mediaobject.html">MediaObject</a>.</p>
<pre class="cpp"> MediaObject m;
 <span class="type"><a href="qstring.html">QString</a></span> <a href="phonon-mediasource.html#fileName">fileName</a>(<span class="string">&quot;/home/foo/bar.ogg&quot;</span>);
 <span class="type"><a href="qurl.html">QUrl</a></span> <a href="phonon-mediasource.html#url">url</a>(<span class="string">&quot;http://www.example.com/stream.mp3&quot;</span>);
 <span class="type"><a href="qbuffer.html">QBuffer</a></span> <span class="operator">*</span>someBuffer;
 m<span class="operator">.</span>setCurrentSource(fileName);
 m<span class="operator">.</span>setCurrentSource(url);
 m<span class="operator">.</span>setCurrentSource(someBuffer);
 m<span class="operator">.</span>setCurrentSource(Phonon<span class="operator">::</span>Cd);</pre>
<p>A MediaSource object cannot be reused for another multimedia source. It is possible to play the same source again, and also stop and start a non-seekable media source, such as a radio stream, with the same MediaSource object.</p>
<a name="qt-backends"></a>
<h3>Qt Backends</h3>
<p>Currently, Qt's backends support files in local and remote locations. Support for other sources, such as CD/DVD, are planned for the future.</p>
</div>
<p><b>See also </b><a href="phonon-mediaobject.html">MediaObject</a> and <a href="phonon-module.html">Phonon Module</a>.</p>
<!-- @@@MediaSource -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Type$$$Invalid$$$LocalFile$$$Url$$$Disc$$$Stream$$$Empty -->
<h3 class="fn"><a name="Type-enum"></a>enum MediaSource::<span class="name">Type</span></h3>
<p>Identifies the type of media described by the <a href="phonon-mediasource.html">MediaSource</a> object.</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>Phonon::MediaSource::Invalid</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">The <a href="phonon-mediasource.html">MediaSource</a> object does not describe any valid source.</td></tr>
<tr><td class="topAlign"><tt>Phonon::MediaSource::LocalFile</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The <a href="phonon-mediasource.html">MediaSource</a> object describes a local file.</td></tr>
<tr><td class="topAlign"><tt>Phonon::MediaSource::Url</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The <a href="phonon-mediasource.html">MediaSource</a> object describes an URL, which can be either a local file or a file on the network.</td></tr>
<tr><td class="topAlign"><tt>Phonon::MediaSource::Disc</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The <a href="phonon-mediasource.html">MediaSource</a> object describes a disc, e.g&#x2e;, a CD.</td></tr>
<tr><td class="topAlign"><tt>Phonon::MediaSource::Stream</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The <a href="phonon-mediasource.html">MediaSource</a> object describes a data stream. This is the type used for <a href="qiodevice.html">QIODevice</a>s. Note that a stream opened with a <a href="qurl.html">QUrl</a>, will still be of the Url type.</td></tr>
<tr><td class="topAlign"><tt>Phonon::MediaSource::Empty</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The media source doesn't have a source.</td></tr>
</table>
<p><b>See also </b><a href="phonon-mediasource.html#type">MediaSource::type</a>().</p>
<!-- @@@Type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$MediaSource[overload1]$$$MediaSourceconstQString& -->
<h3 class="fn"><a name="MediaSource"></a>MediaSource::<span class="name">MediaSource</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>fileName</i> )</h3>
<p>Creates a <a href="phonon-mediasource.html">MediaSource</a> object for the file specified by <i>fileName</i>. You can also use this constructor with <a href="resources.html">Qt resources</a></p>
<!-- @@@MediaSource -->
<!-- $$$MediaSource$$$MediaSourceconstQUrl& -->
<h3 class="fn"><a name="MediaSource-3"></a>MediaSource::<span class="name">MediaSource</span> ( const <span class="type"><a href="qurl.html">QUrl</a></span> &amp; <i>url</i> )</h3>
<p>Creates a <a href="phonon-mediasource.html">MediaSource</a> object for a the URL specified by <i>url</i>.</p>
<p>If the multimedia content you would like to play back is on a remote network location, you should use this constructor; though, it also possible to specify an URL to a local file.</p>
<p><b>See also </b><a href="qurl.html">QUrl</a>.</p>
<!-- @@@MediaSource -->
<!-- $$$MediaSource$$$MediaSourcePhonon::DiscTypeconstQString& -->
<h3 class="fn"><a name="MediaSource-4"></a>MediaSource::<span class="name">MediaSource</span> ( <span class="type"><a href="phonon.html#DiscType-enum">Phonon::DiscType</a></span> <i>discType</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>deviceName</i> = QString() )</h3>
<p>Creates a <a href="phonon-mediasource.html">MediaSource</a> object for the type of disc specified by <i>discType</i> in the named device referred to by <i>deviceName</i>.</p>
<p><b>Note:</b> <i>deviceName</i> is a platform dependent device name. It can be useful to specify this if the computer has more than one CD drive. On KDE, it is recommended to use the Solid hardware discovery framework to retrieve the device name in a portable way.</p>
<!-- @@@MediaSource -->
<!-- $$$MediaSource$$$MediaSourceQIODevice* -->
<h3 class="fn"><a name="MediaSource-6"></a>MediaSource::<span class="name">MediaSource</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>ioDevice</i> )</h3>
<p>Creates a <a href="phonon-mediasource.html">MediaSource</a> object for the <a href="qiodevice.html">QIODevice</a> specified by <i>ioDevice</i>.</p>
<p>This constructor can be very handy in the combination of <a href="qbytearray.html">QByteArray</a> and <a href="qbuffer.html">QBuffer</a>.</p>
<p>If you need to fetch multimedia data from a source that is not supported by <a href="phonon-mediasource.html">MediaSource</a>, you should subclass <a href="qiodevice.html">QIODevice</a> and use this <a href="phonon-mediasource.html">MediaSource</a> constructor. It is important that you reimplement <a href="qiodevice.html#isSequential">QIODevice::isSequential</a>(), as it is used by <a href="phonon-mediasource.html">MediaSource</a> to determine if the media source is seekable.</p>
<p><i>ioDevice</i> is an arbitrary readable <a href="qiodevice.html">QIODevice</a> subclass. If the device is not opened <a href="phonon-mediasource.html">MediaSource</a> will open it as <a href="qiodevice.html#OpenModeFlag-enum">QIODevice::ReadOnly</a>.</p>
<p><b>Note:</b> Sequential devices can also be used, but <a href="phonon-mediaobject.html#isSeekable">MediaObject::isSeekable</a>() will return false as a result.</p>
<p><b>Warning:</b> On Windows, we only support <a href="qiodevice.html">QIODevice</a>s containing the <tt>avi</tt>, <tt>mp3</tt>, or <tt>mpg</tt> formats. Use the constructor that takes a file name to open files (the Qt backend does not use a <a href="qfile.html">QFile</a> internally).</p>
<p><b>See also </b><a href="phonon-mediasource.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@MediaSource -->
<!-- $$$MediaSource$$$MediaSourceconstMediaSource& -->
<h3 class="fn"><a name="MediaSource-7"></a>MediaSource::<span class="name">MediaSource</span> ( const <span class="type">MediaSource</span> &amp; <i>other</i> )</h3>
<p>Constructs a copy of the <i>other</i> media source.</p>
<p>This constructor is fast thanks to explicit sharing.</p>
<!-- @@@MediaSource -->
<!-- $$$~MediaSource[overload1]$$$~MediaSource -->
<h3 class="fn"><a name="dtor.MediaSource"></a>MediaSource::<span class="name">~MediaSource</span> ()</h3>
<p>Destroys the <a href="phonon-mediasource.html">MediaSource</a> object. You should never delete a <a href="phonon-mediasource.html">MediaSource</a> yourself, the <a href="phonon-mediaobject.html">MediaObject</a> will handle this.</p>
<!-- @@@~MediaSource -->
<!-- $$$autoDelete[overload1]$$$autoDelete -->
<h3 class="fn"><a name="autoDelete"></a><span class="type">bool</span> MediaSource::<span class="name">autoDelete</span> () const</h3>
<p>Returns the setting of the auto-delete option. The default is false.</p>
<p><b>See also </b><a href="phonon-mediasource.html#setAutoDelete">setAutoDelete</a>().</p>
<!-- @@@autoDelete -->
<!-- $$$deviceName[overload1]$$$deviceName -->
<h3 class="fn"><a name="deviceName"></a><span class="type"><a href="qstring.html">QString</a></span> MediaSource::<span class="name">deviceName</span> () const</h3>
<p>Returns the device name of the <a href="phonon-mediasource.html">MediaSource</a> if <a href="phonon-mediasource.html#type">type</a>() == Disc; otherwise returns QString().</p>
<p><b>See also </b><a href="phonon-mediasource.html#type">type</a>().</p>
<!-- @@@deviceName -->
<!-- $$$discType[overload1]$$$discType -->
<h3 class="fn"><a name="discType"></a><span class="type"><a href="phonon.html#DiscType-enum">Phonon::DiscType</a></span> MediaSource::<span class="name">discType</span> () const</h3>
<p>Returns the disc type of the <a href="phonon-mediasource.html">MediaSource</a> if <a href="phonon-mediasource.html#type">type</a>() == Disc; otherwise returns <a href="phonon.html#DiscType-enum">NoDisc</a>.</p>
<p><b>See also </b><a href="phonon-mediasource.html#type">type</a>().</p>
<!-- @@@discType -->
<!-- $$$fileName[overload1]$$$fileName -->
<h3 class="fn"><a name="fileName"></a><span class="type"><a href="qstring.html">QString</a></span> MediaSource::<span class="name">fileName</span> () const</h3>
<p>Returns the file name of the <a href="phonon-mediasource.html">MediaSource</a> if <a href="phonon-mediasource.html#type">type</a>() == <a href="phonon-mediasource.html#Type-enum">LocalFile</a>; otherwise, returns QString().</p>
<p><b>See also </b><a href="phonon-mediasource.html#type">type</a>().</p>
<!-- @@@fileName -->
<!-- $$$setAutoDelete[overload1]$$$setAutoDeletebool -->
<h3 class="fn"><a name="setAutoDelete"></a><span class="type">void</span> MediaSource::<span class="name">setAutoDelete</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, the media source will take ownership of the object passed in the <a href="phonon-mediasource.html">MediaSource</a>'s constructor object that was passed in the constructor; otherwise, the programmer is responsible for deletion of this object.</p>
<p>This setting is false by default. If you enable it, you should only access the stream or device as long as you keep the media source object around. As long as you keep the media source wrapping the stream or device, the object will not get deleted.</p>
<p><b>See also </b><a href="phonon-mediasource.html#autoDelete">autoDelete</a>().</p>
<!-- @@@setAutoDelete -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn"><a name="type"></a><span class="type"><a href="phonon-mediasource.html#Type-enum">Type</a></span> MediaSource::<span class="name">type</span> () const</h3>
<p>Returns the type of the <a href="phonon-mediasource.html">MediaSource</a> (depends on the constructor that was used).</p>
<p><b>See also </b><a href="phonon-mediasource.html#Type-enum">Type</a>.</p>
<!-- @@@type -->
<!-- $$$url[overload1]$$$url -->
<h3 class="fn"><a name="url"></a><span class="type"><a href="qurl.html">QUrl</a></span> MediaSource::<span class="name">url</span> () const</h3>
<p>Returns the URL of the <a href="phonon-mediasource.html">MediaSource</a> if <a href="phonon-mediasource.html#type">type</a>() == URL or <a href="phonon-mediasource.html#type">type</a>() == <a href="phonon-mediasource.html#Type-enum">LocalFile</a>; otherwise returns <a href="porting4.html#qurl">QUrl</a>().</p>
<p><b>See also </b><a href="phonon-mediasource.html#type">type</a>().</p>
<!-- @@@url -->
<!-- $$$operator=[overload1]$$$operator=constMediaSource& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">MediaSource</span> &amp; MediaSource::<span class="name">operator=</span> ( const <span class="type">MediaSource</span> &amp; <i>other</i> )</h3>
<p>Assigns the <i>other</i> media source to this media source and returns a reference to it.</p>
<p>This operation is fast thanks to explicit sharing.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constMediaSource& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> MediaSource::<span class="name">operator==</span> ( const <span class="type">MediaSource</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this media source is equal to the <i>other</i> media source; otherwise returns false.</p>
<!-- @@@operator== -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>