CopperSpice API  1.7.2
QMediaGaplessPlaybackControl Class Referenceabstract

Provides access to the gapless playback related control of a QMediaService. More...

Inheritance diagram for QMediaGaplessPlaybackControl:
QMediaControl QObject

Public Signals

void advancedToNextMedia ()
 
void crossfadeTimeChanged (qreal crossfadeTime)
 
void nextMediaChanged (const QMediaContent &media)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

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
 
- Public Methods inherited from QMediaControl
 ~QMediaControl ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

 QMediaGaplessPlaybackControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QMediaControl
 QMediaControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Related Functions

These are not member functions

#define QMediaGaplessPlaybackControl_iid   "com.copperspice.CS.mediaGaplessPlaybackControl/1.0"
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Properties inherited from QObject
 objectName
 

Detailed Description

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 "com.copperspice.CS.mediaGaplessPlaybackControl/1.0" as defined in QMediaGaplessPlaybackControl_iid.

See also
QMediaService::requestControl(), QMediaPlayer

Constructor & Destructor Documentation

QMediaGaplessPlaybackControl::~QMediaGaplessPlaybackControl ( )
virtual

Destroys a gapless playback control.

QMediaGaplessPlaybackControl::QMediaGaplessPlaybackControl ( QObject parent = nullptr)
explicitprotected

Constructs a new gapless playback control with the given parent.

Method Documentation

void QMediaGaplessPlaybackControl::advancedToNextMedia ( )
signal

Signals when the player advances to the next media, the content of next media will be cleared.

See also
nextMedia()
qreal QMediaGaplessPlaybackControl::crossfadeTime ( ) const
pure virtual

Returns current crossfade time in seconds.

See also
setCrossfadeTime().
void QMediaGaplessPlaybackControl::crossfadeTimeChanged ( qreal  crossfadeTime)
signal

Signals that the crossfadeTime has changed.

See also
crossfadeTime()
bool QMediaGaplessPlaybackControl::isCrossfadeSupported ( ) const
pure virtual

Indicates whether crossfading is supported or not. If crossfading is not supported, setCrossfadeTime() will be ignored and the crossfadeTime() method will always return 0.

QMediaContent QMediaGaplessPlaybackControl::nextMedia ( ) const
pure virtual

Returns the content of the next media

See also
setNextMedia()
void QMediaGaplessPlaybackControl::nextMediaChanged ( const QMediaContent media)
signal

Signals that the next media has changed, either explicitly via setNextMedia() or when the player clears the next media while advancing to it.

See also
nextMedia()
void QMediaGaplessPlaybackControl::setCrossfadeTime ( qreal  crossfadeTime)
pure virtual

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.

See also
crossfadeTime()
void QMediaGaplessPlaybackControl::setNextMedia ( const QMediaContent media)
pure virtual

Sets the next media for smooth transition.

See also
nextMedia()

Friends And Related Function Documentation

#define QMediaGaplessPlaybackControl_iid   "com.copperspice.CS.mediaGaplessPlaybackControl/1.0"
related

Defines the interface name of the QMediaGaplessPlaybackControl class to "com.copperspice.CS.mediaGaplessPlaybackControl/1.0".