QMediaPlaylist Class ReferenceThe QMediaPlaylist class provides a list of media content to play. More... #include <QMediaPlaylist> This class is under development and is subject to change. Inherits QObject. Public Types
Properties
Public Functions
Public Slots
Signals
Additional Inherited Members
Detailed DescriptionThe QMediaPlaylist class provides a list of media content to play. QMediaPlaylist is intended to be used with other media objects, like QMediaPlayer or QMediaImageViewer. QMediaPlaylist allows to access the service intrinsic playlist functionality if available, otherwise it provides the the local memory playlist implementation. player = new QMediaPlayer; playlist = new QMediaPlaylist(player); playlist->append(QUrl("http://example.com/movie1.mp4")); playlist->append(QUrl("http://example.com/movie2.mp4")); playlist->append(QUrl("http://example.com/movie3.mp4")); playlist->setCurrentPosition(1); player->play(); Depending on playlist source implementation, most of playlist modifcation operations can be asynchronous. See also QMediaContent. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QMediaPlaylist::NoError | 0 | No errors. |
QMediaPlaylist::FormatError | 1 | Format error. |
QMediaPlaylist::FormatNotSupportedError | 2 | Format not supported. |
QMediaPlaylist::NetworkError | 3 | Network error. |
QMediaPlaylist::AccessDeniedError | 4 | Access denied error. |
The QMediaPlaylist::PlaybackMode describes the order items in playlist are played.
Constant | Value | Description |
---|---|---|
QMediaPlaylist::CurrentItemOnce | 0 | The current item is played only once. |
QMediaPlaylist::CurrentItemInLoop | 1 | The current item is played in the loop. |
QMediaPlaylist::Linear | 2 | Playback starts from the first to the last items and stops. next item is a null item when the last one is currently playing. |
QMediaPlaylist::Loop | 3 | Playback continues from the first item after the last one finished playing. |
QMediaPlaylist::Random | 4 | Play items in random order. |
This property holds current media content.
Access functions:
QMediaContent | currentMedia () const |
Notifier signal:
void | currentMediaChanged ( const QMediaContent & content ) |
This property holds current position.
Access functions:
int | currentPosition () const |
void | setCurrentPosition ( int playlistPosition ) |
Notifier signal:
void | playlistPositionChanged ( int position ) |
This property defines the order, items in playlist are played.
Access functions:
PlaybackMode | playbackMode () const |
void | setPlaybackMode ( PlaybackMode mode ) |
Notifier signal:
void | playbackModeChanged ( QMediaPlaylist::PlaybackMode mode ) |
See also QMediaPlaylist::PlaybackMode.
Create a new playlist object for with the given parent. If mediaObject is null or doesn't have an intrinsic playlist, internal local memory playlist source will be created.
Destroys the playlist.
Append the media content to the playlist.
Returns true if the operation is successfull, other wise return false.
Append multiple media content items to the playlist.
Returns true if the operation is successfull, other wise return false.
Remove all the items from the playlist.
Returns true if the operation is successfull, other wise return false.
Signal emitted when current media changes to content.
Returns the last error condition.
Returns the string describing the last error condition.
Insert the media content to the playlist at position pos.
Returns true if the operation is successful, otherwise false.
Insert multiple media content items to the playlist at position pos.
Returns true if the operation is successful, otherwise false.
Returns true if the playlist contains no items; otherwise returns false.
See also size().
Returns true if the playlist can be modified; otherwise returns false.
See also size().
Signal emitted when item to be inserted at start and ending at end.
Signal emitted when item to de deleted ar start and ending at end.
This signal is emitted after media has been changed in the playlist between start and end positions inclusive.
This signal is emitted after media has been inserted into the playlist. The new items are those between start and end inclusive.
This signal is emitted after media has been removed from the playlist. The removed items are those between start and end inclusive.
Load playlist from location. If format is specified, it is used, otherwise format is guessed from location name and data.
New items are appended to playlist.
Returns true if playlist was loaded succesfully, otherwise returns false.
Load playlist from QIODevice device. If format is specified, it is used, otherwise format is guessed from device data.
New items are appended to playlist.
Returns true if playlist was loaded succesfully, otherwise returns false.
Signal emitted if failed to load playlist.
Signal emitted when playlist finished loading.
Returns the media content at index position in the playlist.
Advance to the next media content in playlist.
Returns the position of item, which were current after calling next() steps times.
Returned value depends on the size of playlist, current position and playback mode.
See also QMediaPlaylist::playbackMode.
Signal emitted when playback mode changed to mode.
Signal emitted when playlist position changed to position.
Return to the previous media content in playlist.
Returns the position of item, which were current after calling previous() steps times.
See also QMediaPlaylist::playbackMode.
Remove the item from the playlist at position pos.
Returns true if the operation is successfull, other wise return false.
Remove the items from the playlist from position start to end inclusive.
Returns true if the operation is successfull, other wise return false.
Save playlist to location. If format is specified, it is used, otherwise format is guessed from location name.
Returns true if playlist was saved succesfully, otherwise returns false.
Save playlist to QIODevice device using format format.
Returns true if playlist was saved succesfully, otherwise returns false.
Shuffle items in the playlist.
Returns the number of items in the playlist.
See also isEmpty().
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 qtmobility-1.0-tp | |
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