MediaSource Class Reference
|
Constant | Value | Description |
---|---|---|
Phonon::MediaSource::Invalid | -1 | The MediaSource object does not describe any valid source. |
Phonon::MediaSource::LocalFile | 0 | The MediaSource object describes a local file. |
Phonon::MediaSource::Url | 1 | The MediaSource object describes a URL, which can be either a local file or a file on the network. |
Phonon::MediaSource::Disc | 2 | The MediaSource object describes a disc, e.g., a CD. |
Phonon::MediaSource::Stream | 3 | The MediaSource object describes a data stream. This is also the type used for QIODevices. |
See also MediaSource::type().
Creates a MediaSource object for the file specified by fileName. You can also use this constructor with Qt resources
Creates a MediaSource object for a the URL specified by url.
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.
See also QUrl.
Creates a MediaSource object for the type of disc specified by discType in the named device referred to by deviceName.
Note: deviceName 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.
Creates a MediaSource object for the QIODevice specified by ioDevice.
This constructor can be very handy in the combination of QByteArray and QBuffer.
ioDevice is an arbitrary readable QIODevice subclass. If the device is not opened MediaSource will open it as QIODevice::ReadOnly.
Note: Sequential devices can also be used, but MediaObject::isSeekable() will return false as a result.
See also setAutoDelete().
Constructs a copy of the other media source.
This constructor is fast thanks to explicit sharing.
Destroys the MediaSource object.
Returns the setting of the auto-delete option. The default is false.
See also setAutoDelete().
Returns the device name of the MediaSource if type() == Disc; otherwise returns QString().
See also type().
Returns the disc type of the MediaSource if type() == Disc; otherwise returns NoDisc.
See also type().
Returns the file name of the MediaSource if type() == LocalFile; otherwise, returns QString().
See also type().
If enable is true, the media source will take ownership of the object passed in the MediaSource's constructor object that was passed in the constructor; otherwise, the programmer is responsible for deletion of this object.
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.
See also autoDelete().
Returns the type of the MediaSource (depends on the constructor that was used).
See also Type.
Returns the URL of the MediaSource if type() == URL or type() == LocalFile; otherwise returns QUrl().
See also type().
Assigns the other media source to this media source and returns a reference to it.
This operation is fast thanks to explicit sharing.
Returns true if this media source is equal to the other media source; otherwise returns false.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com