|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 |
|
43 #include <qmediaplaylistsourcecontrol.h> |
|
44 #include <qmediacontrol_p.h> |
|
45 |
|
46 QT_BEGIN_NAMESPACE |
|
47 |
|
48 /*! |
|
49 \class QMediaPlaylistSourceControl |
|
50 \ingroup multimedia |
|
51 |
|
52 \preliminary |
|
53 \brief The QMediaPlaylistSourceControl class provides access to the playlist playback |
|
54 functionality of a QMediaService. |
|
55 |
|
56 This control allows QMediaPlaylist to be passed directly to the service |
|
57 instead of playing media sources one by one. This control should be |
|
58 implemented if backend benefits from knowing the next media source to be |
|
59 played, for example for preloading, cross fading or gap-less playback. |
|
60 |
|
61 If QMediaPlaylistSourceControl is provided, the backend must listen for |
|
62 current playlist item changes to load corresponding media source and |
|
63 advance the playlist with QMediaPlaylist::next() when playback of the |
|
64 current media is finished. |
|
65 |
|
66 The interface name of QMediaPlaylistSourceControl is \c com.nokia.Qt.QMediaPlaylistSourceControl/1.0 as |
|
67 defined in QMediaPlaylistSourceControl_iid. |
|
68 |
|
69 \sa QMediaService::requestControl(), QMediaPlayer |
|
70 */ |
|
71 |
|
72 /*! |
|
73 \macro QMediaPlaylistSourceControl_iid |
|
74 |
|
75 \c com.nokia.Qt.QMediaPlaylistSourceControl/1.0 |
|
76 |
|
77 Defines the interface name of the QMediaPlaylistSourceControl class. |
|
78 |
|
79 \relates QMediaPlaylistSourceControl |
|
80 */ |
|
81 |
|
82 /*! |
|
83 Create a new playlist source control object with the given \a parent. |
|
84 */ |
|
85 QMediaPlaylistSourceControl::QMediaPlaylistSourceControl(QObject *parent): |
|
86 QMediaControl(*new QMediaControlPrivate, parent) |
|
87 { |
|
88 } |
|
89 |
|
90 /*! |
|
91 Destroys the playlist control. |
|
92 */ |
|
93 QMediaPlaylistSourceControl::~QMediaPlaylistSourceControl() |
|
94 { |
|
95 } |
|
96 |
|
97 |
|
98 /*! |
|
99 \fn QMediaPlaylistSourceControl::playlist() const |
|
100 |
|
101 Returns the current playlist. |
|
102 Should return a null pointer if no playlist is assigned. |
|
103 */ |
|
104 |
|
105 /*! |
|
106 \fn QMediaPlaylistSourceControl::setPlaylist(QMediaPlaylist *playlist) |
|
107 |
|
108 Set the playlist of this media player to \a playlist. |
|
109 If a null pointer is passed, the playlist source should be disabled. |
|
110 |
|
111 The current media should be replaced with the current item of the media playlist. |
|
112 */ |
|
113 |
|
114 |
|
115 /*! |
|
116 \fn QMediaPlaylistSourceControl::playlistChanged(QMediaPlaylist* playlist) |
|
117 |
|
118 Signal emited when the playlist has changed to \a playlist. |
|
119 */ |
|
120 |
|
121 #include "moc_qmediaplaylistsourcecontrol.cpp" |
|
122 QT_END_NAMESPACE |
|
123 |