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

信号

void advancedToNextMedia ()
void crossfadeTimeChanged (qreal crossfadeTime )
void nextMediaChanged (const QMediaContent & media )

静态公共成员

const QMetaObject staticMetaObject

保护函数

QMediaGaplessPlaybackControl (QObject * parent = nullptr)

QMediaGaplessPlaybackControl_iid

额外继承成员

详细描述

The QMediaGaplessPlaybackControl class provides access to the gapless playback related control of a QMediaService .

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 类。

接口名称对于 QMediaGaplessPlaybackControl is org.qt-project.qt.mediagaplessplaybackcontrol/5.0 作为定义在 QMediaGaplessPlaybackControl_iid .

另请参阅 QMediaService::requestControl () 和 QMediaPlayer .

成员函数文档编制

[protected] QMediaGaplessPlaybackControl:: QMediaGaplessPlaybackControl ( QObject * parent = nullptr)

Constructs a new gapless playback control with the given parent .

[虚拟] 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 )

信号 crossfadeTime 已改变。

另请参阅 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 )

设置 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

定义接口名为 QMediaGaplessPlaybackControl 类。