QMediaGaplessPlaybackControl Class
The QMediaGaplessPlaybackControl class provides access to the gapless playback related control of a QMediaService. 更多...
头文件: | #include <QMediaGaplessPlaybackControl> |
qmake: | QT += multimedia |
基类: | QMediaControl |
公有函数
virtual | ~QMediaGaplessPlaybackControl() |
virtual qreal | crossfadeTime() const = 0 |
virtual bool | isCrossfadeSupported() const = 0 |
virtual QMediaContent | nextMedia() const = 0 |
virtual void | setCrossfadeTime(qreal crossfadeTime) = 0 |
virtual void | setNextMedia(const QMediaContent &media) = 0 |
- 32 个公有函数继承自 QObject
信号
void | advancedToNextMedia() |
void | crossfadeTimeChanged(qreal crossfadeTime) |
void | nextMediaChanged(const QMediaContent &media) |
- 2 个信号继承自 QObject
受保护的函数
QMediaGaplessPlaybackControl(QObject *parent = Q_NULLPTR) |
- 9 个受保护的函数继承自 QObject
Macros
其他继承的成员
详细描述
The QMediaGaplessPlaybackControl class provides access to the gapless playback related control of a QMediaService.
If a QMediaService supports gapless playback it will implement QMediaGaplessPlaybackControl. This control provides a means to set the next media or crossfade time for smooth transitions between tracks.
The functionality provided by this control is exposed to application code through the QMediaPlayer class.
The interface name of QMediaGaplessPlaybackControl is org.qt-project.qt.mediagaplessplaybackcontrol/5.0
as defined in QMediaGaplessPlaybackControl_iid.
参见 QMediaService::requestControl() and QMediaPlayer.
成员函数
[protected]
QMediaGaplessPlaybackControl::QMediaGaplessPlaybackControl(QObject *parent = Q_NULLPTR)
Constructs a new gapless playback control with the given parent.
[virtual]
QMediaGaplessPlaybackControl::~QMediaGaplessPlaybackControl()
Destroys a gapless playback control.
[signal]
void QMediaGaplessPlaybackControl::advancedToNextMedia()
Signals when the player advances to the next media (the content of next media will be cleared).
参见 nextMedia().
[pure virtual]
qreal QMediaGaplessPlaybackControl::crossfadeTime() const
Returns current crossfade time in seconds.
参见 setCrossfadeTime().
[signal]
void QMediaGaplessPlaybackControl::crossfadeTimeChanged(qreal crossfadeTime)
Signals that the crossfadeTime has changed.
参见 crossfadeTime().
[pure virtual]
bool QMediaGaplessPlaybackControl::isCrossfadeSupported() const
Indicates whether crossfading is supported or not. If crossfading is not supported, setCrossfadeTime() will be ignored and crossfadeTime() will always return 0.
[pure virtual]
QMediaContent QMediaGaplessPlaybackControl::nextMedia() const
Returns the content of the next media
参见 setNextMedia().
[signal]
void QMediaGaplessPlaybackControl::nextMediaChanged(const QMediaContent &media)
Signals that the next media has changed (either explicitly via setNextMedia() or when the player clears the next media while advancing to it).
参见 nextMedia().
[pure virtual]
void QMediaGaplessPlaybackControl::setCrossfadeTime(qreal crossfadeTime)
Sets the crossfadeTime in seconds for smooth transition.
Positive value means how much time it will take for the next media to transit from silent to full volume and vice versa for current one. So both current and the next one will be playing during this period of time.
A crossfade time of zero or negative will result in gapless playback (suitable for some continuous media).
参见 crossfadeTime().
[pure virtual]
void QMediaGaplessPlaybackControl::setNextMedia(const QMediaContent &media)
Sets the next media for smooth transition.
参见 nextMedia().
宏
QMediaGaplessPlaybackControl_iid
org.qt-project.qt.mediagaplessplaybackcontrol/5.0
Defines the interface name of the QMediaGaplessPlaybackControl class.