1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#include "qmediagaplessplaybackcontrol.h"
41#include "qmediacontrol_p.h"
42
43/*!
44 \class QMediaGaplessPlaybackControl
45 \obsolete
46 \inmodule QtMultimedia
47
48
49 \ingroup multimedia_control
50
51 \brief The QMediaGaplessPlaybackControl class provides access to the gapless playback
52 related control of a QMediaService.
53
54 If a QMediaService supports gapless playback it will implement QMediaGaplessPlaybackControl.
55 This control provides a means to set the \l {setNextMedia()}{next media} or
56 \l {setCrossfadeTime()}{crossfade time} for smooth transitions between tracks.
57
58 The functionality provided by this control is exposed to application
59 code through the QMediaPlayer class.
60
61 The interface name of QMediaGaplessPlaybackControl is
62 \c org.qt-project.qt.mediagaplessplaybackcontrol/5.0 as defined in QMediaGaplessPlaybackControl_iid.
63
64 \sa QMediaService::requestControl(), QMediaPlayer
65*/
66
67/*!
68 \macro QMediaGaplessPlaybackControl_iid
69
70 \c org.qt-project.qt.mediagaplessplaybackcontrol/5.0
71
72 Defines the interface name of the QMediaGaplessPlaybackControl class.
73
74 \relates QMediaGaplessPlaybackControl
75*/
76
77/*!
78 Destroys a gapless playback control.
79*/
80QMediaGaplessPlaybackControl::~QMediaGaplessPlaybackControl()
81{
82}
83
84/*!
85 Constructs a new gapless playback control with the given \a parent.
86*/
87QMediaGaplessPlaybackControl::QMediaGaplessPlaybackControl(QObject *parent):
88 QMediaControl(*new QMediaControlPrivate, parent)
89{
90}
91
92/*!
93 \fn QMediaGaplessPlaybackControl::nextMedia() const
94
95 Returns the content of the next media
96*/
97
98/*!
99 \fn QMediaGaplessPlaybackControl::setNextMedia(const QMediaContent& media)
100
101 Sets the next \a media for smooth transition.
102*/
103
104/*!
105 \fn QMediaGaplessPlaybackControl::nextMediaChanged(const QMediaContent& media)
106
107 Signals that the next \a media has changed (either explicitly via \l setNextMedia() or when the
108 player clears the next media while advancing to it).
109
110 \sa nextMedia()
111*/
112
113/*!
114 \fn QMediaGaplessPlaybackControl::advancedToNextMedia()
115
116 Signals when the player advances to the next media (the content of next media will be cleared).
117
118 \sa nextMedia()
119*/
120
121/*!
122 \fn QMediaGaplessPlaybackControl::isCrossfadeSupported() const
123
124 Indicates whether crossfading is supported or not.
125 If crossfading is not supported, \l setCrossfadeTime() will be ignored and \l crossfadeTime() will
126 always return 0.
127
128*/
129
130/*!
131 \fn QMediaGaplessPlaybackControl::setCrossfadeTime(qreal crossfadeTime)
132
133 Sets the \a crossfadeTime in seconds for smooth transition.
134
135 Positive value means how much time it will take for the next media to transit from silent to
136 full volume and vice versa for current one. So both current and the next one will be playing
137 during this period of time.
138
139 A crossfade time of zero or negative will result in gapless playback (suitable for some
140 continuous media).
141
142*/
143
144/*!
145 \fn QMediaGaplessPlaybackControl::crossfadeTime() const
146
147 Returns current crossfade time in seconds.
148*/
149
150/*!
151 \fn QMediaGaplessPlaybackControl::crossfadeTimeChanged(qreal crossfadeTime)
152
153 Signals that the \a crossfadeTime has changed.
154
155 \sa crossfadeTime()
156*/
157
158

source code of qtmultimedia/src/multimedia/controls/qmediagaplessplaybackcontrol.cpp