diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-04-07 15:18:17 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-08 12:19:52 +0000 |
commit | 77acd3cb4a1974d88e795a3369d74eccfd730e4f (patch) | |
tree | 90c20769b3c2e3f8e37544f91bd476d7b84768ab /src/imports | |
parent | 1730f47fe18772f48b42b8e4dbec527889ae2ef3 (diff) |
Remove the notifyInterval() functionality
This was nothing else than a timer, something you can
just as well implement on top of Qt Multimedia if required.
Change-Id: I1ef362f1f4ad5a5f85e92bfbb1d73b7710271e5c
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/multimedia/Video.qml | 13 | ||||
-rw-r--r-- | src/imports/multimedia/plugins.qmltypes | 2 | ||||
-rw-r--r-- | src/imports/multimedia/qdeclarativeaudio.cpp | 45 | ||||
-rw-r--r-- | src/imports/multimedia/qdeclarativeaudio_p.h | 5 |
4 files changed, 0 insertions, 65 deletions
diff --git a/src/imports/multimedia/Video.qml b/src/imports/multimedia/Video.qml index 45e0ec7e8..929fdda98 100644 --- a/src/imports/multimedia/Video.qml +++ b/src/imports/multimedia/Video.qml @@ -388,19 +388,6 @@ Item { property alias autoPlay: player.autoPlay /*! - \qmlproperty int Video::notifyInterval - - The interval at which notifiable properties will update. - - The notifiable properties are \l position and \l bufferProgress. - - The interval is expressed in milliseconds, the default value is 1000. - - \since 5.9 - */ - property alias notifyInterval: player.notifyInterval - - /*! \qmlproperty int Video::loops This property holds the number of times the media is played. A value of \c 0 or \c 1 means diff --git a/src/imports/multimedia/plugins.qmltypes b/src/imports/multimedia/plugins.qmltypes index a386e73b0..6bd4664c5 100644 --- a/src/imports/multimedia/plugins.qmltypes +++ b/src/imports/multimedia/plugins.qmltypes @@ -462,7 +462,6 @@ Module { } Property { name: "availability"; type: "Availability"; isReadonly: true } Property { name: "audioRole"; revision: 1; type: "AudioRole" } - Property { name: "notifyInterval"; revision: 2; type: "int" } Property { name: "videoOutput"; revision: 15; type: "QVariant" } Signal { name: "playlistChanged"; revision: 1 } Signal { name: "loopCountChanged" } @@ -475,7 +474,6 @@ Module { Parameter { name: "error"; type: "QDeclarativeAudio::Error" } Parameter { name: "errorString"; type: "string" } } - Signal { name: "notifyIntervalChanged"; revision: 2 } Signal { name: "videoOutputChanged"; revision: 15 } Method { name: "play" } Method { name: "pause" } diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp index 1c83dfd83..7fe96666c 100644 --- a/src/imports/multimedia/qdeclarativeaudio.cpp +++ b/src/imports/multimedia/qdeclarativeaudio.cpp @@ -108,7 +108,6 @@ QDeclarativeAudio::QDeclarativeAudio(QObject *parent) , m_status(QMediaPlayer::NoMedia) , m_error(QMediaPlayer::ServiceMissingError) , m_player(nullptr) - , m_notifyInterval(1000) { } @@ -233,34 +232,6 @@ void QDeclarativeAudio::setAudioRole(QDeclarativeAudio::AudioRole audioRole) } /*! - \qmlproperty int QtMultimedia::Audio::notifyInterval - - The interval at which notifiable properties will update. - - The notifiable properties are \l position and \l bufferProgress. - - The interval is expressed in milliseconds, the default value is 1000. - - \since 5.9 -*/ -int QDeclarativeAudio::notifyInterval() const -{ - return m_complete ? m_player->notifyInterval() : m_notifyInterval; -} - -void QDeclarativeAudio::setNotifyInterval(int value) -{ - if (notifyInterval() == value) - return; - if (m_complete) { - m_player->setNotifyInterval(value); - return; - } - m_notifyInterval = value; - emit notifyIntervalChanged(); -} - -/*! \qmlmethod list<int> QtMultimedia::Audio::supportedAudioRoles() Returns a list of supported audio roles. @@ -824,8 +795,6 @@ void QDeclarativeAudio::classBegin() this, SIGNAL(hasVideoChanged())); connect(m_player, SIGNAL(audioRoleChanged(QAudio::Role)), this, SIGNAL(audioRoleChanged())); - connect(m_player, SIGNAL(notifyIntervalChanged(int)), - this, SIGNAL(notifyIntervalChanged())); m_error = !m_player->isAvailable() ? QMediaPlayer::ServiceMissingError : QMediaPlayer::NoError; @@ -845,8 +814,6 @@ void QDeclarativeAudio::componentComplete() m_player->setPlaybackRate(m_playbackRate); if (m_audioRole != UnknownRole) m_player->setAudioRole(QAudio::Role(m_audioRole)); - if (m_notifyInterval != m_player->notifyInterval()) - m_player->setNotifyInterval(m_notifyInterval); if (!m_source.isEmpty() && (m_autoLoad || m_autoPlay)) { m_player->setMedia(m_source, nullptr); @@ -1162,18 +1129,6 @@ void QDeclarativeAudio::_q_mediaChanged(const QUrl &) */ /*! - \qmlproperty int QtMultimedia::MediaPlayer::notifyInterval - - The interval at which notifiable properties will update. - - The notifiable properties are \l position and \l bufferProgress. - - The interval is expressed in milliseconds, the default value is 1000. - - \since 5.9 -*/ - -/*! \qmlmethod QtMultimedia::MediaPlayer::play() Starts playback of the media. diff --git a/src/imports/multimedia/qdeclarativeaudio_p.h b/src/imports/multimedia/qdeclarativeaudio_p.h index da6db0885..085d7e60a 100644 --- a/src/imports/multimedia/qdeclarativeaudio_p.h +++ b/src/imports/multimedia/qdeclarativeaudio_p.h @@ -87,7 +87,6 @@ class QDeclarativeAudio : public QObject, public QQmlParserStatus Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) Q_PROPERTY(QDeclarativeMediaMetaData *metaData READ metaData CONSTANT) Q_PROPERTY(AudioRole audioRole READ audioRole WRITE setAudioRole NOTIFY audioRoleChanged REVISION 1) - Q_PROPERTY(int notifyInterval READ notifyInterval WRITE setNotifyInterval NOTIFY notifyIntervalChanged REVISION 2) Q_PROPERTY(QVariant videoOutput READ videoOutput WRITE setVideoOutput NOTIFY videoOutputChanged REVISION 15) Q_ENUMS(Status) Q_ENUMS(Error) @@ -198,8 +197,6 @@ public: bool autoPlay() const; void setAutoPlay(bool autoplay); - int notifyInterval() const; - void setNotifyInterval(int); public Q_SLOTS: void play(); @@ -241,7 +238,6 @@ Q_SIGNALS: void errorChanged(); void error(QDeclarativeAudio::Error error, const QString &errorString); - Q_REVISION(2) void notifyIntervalChanged(); Q_REVISION(15) void videoOutputChanged(); private Q_SLOTS: @@ -273,7 +269,6 @@ private: QScopedPointer<QDeclarativeMediaMetaData> m_metaData; QMediaPlayer *m_player; - int m_notifyInterval; QVariant m_videoOutput; friend class QDeclarativeMediaBaseAnimation; |