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