diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/audio/qaudioprobe.cpp | 21 | ||||
-rw-r--r-- | src/multimedia/audio/qaudioprobe.h | 1 | ||||
-rw-r--r-- | src/multimedia/controls/qmediaaudioprobecontrol.cpp | 7 | ||||
-rw-r--r-- | src/multimedia/controls/qmediaaudioprobecontrol.h | 1 | ||||
-rw-r--r-- | src/multimedia/controls/qmediavideoprobecontrol.cpp | 6 | ||||
-rw-r--r-- | src/multimedia/controls/qmediavideoprobecontrol.h | 1 | ||||
-rw-r--r-- | src/multimedia/video/qvideoprobe.cpp | 20 | ||||
-rw-r--r-- | src/multimedia/video/qvideoprobe.h | 1 |
8 files changed, 56 insertions, 2 deletions
diff --git a/src/multimedia/audio/qaudioprobe.cpp b/src/multimedia/audio/qaudioprobe.cpp index 9a71b65d6..d23b0d10e 100644 --- a/src/multimedia/audio/qaudioprobe.cpp +++ b/src/multimedia/audio/qaudioprobe.cpp @@ -98,8 +98,10 @@ QAudioProbe::~QAudioProbe() { if (d->source) { // Disconnect - if (d->probee) + if (d->probee) { disconnect(d->probee.data(), SIGNAL(audioBufferProbed(QAudioBuffer)), this, SIGNAL(audioBufferProbed(QAudioBuffer))); + disconnect(d->probee.data(), SIGNAL(flush()), this, SIGNAL(flush())); + } d->source.data()->service()->releaseControl(d->probee.data()); } } @@ -127,6 +129,7 @@ bool QAudioProbe::setSource(QMediaObject *source) if (d->source) { Q_ASSERT(d->probee); disconnect(d->probee.data(), SIGNAL(audioBufferProbed(QAudioBuffer)), this, SIGNAL(audioBufferProbed(QAudioBuffer))); + disconnect(d->probee.data(), SIGNAL(flush()), this, SIGNAL(flush())); d->source.data()->service()->releaseControl(d->probee.data()); d->source.clear(); d->probee.clear(); @@ -140,6 +143,7 @@ bool QAudioProbe::setSource(QMediaObject *source) if (d->probee) { connect(d->probee.data(), SIGNAL(audioBufferProbed(QAudioBuffer)), this, SIGNAL(audioBufferProbed(QAudioBuffer))); + connect(d->probee.data(), SIGNAL(flush()), this, SIGNAL(flush())); d->source = source; } } @@ -187,4 +191,19 @@ bool QAudioProbe::isActive() const return d->probee != 0; } +/*! + \fn QAudioProbe::audioBufferProbed(const QAudioBuffer &buffer) + + This signal should be emitted when an audio buffer is processed in the + media service. +*/ + + +/*! + \fn QAudioProbe::flush() + + This signal should be emitted when it is required to release all buffers. + Application must release all outstanding references to audio buffers. +*/ + QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudioprobe.h b/src/multimedia/audio/qaudioprobe.h index 6012284e0..777dd79b9 100644 --- a/src/multimedia/audio/qaudioprobe.h +++ b/src/multimedia/audio/qaudioprobe.h @@ -69,6 +69,7 @@ public: Q_SIGNALS: void audioBufferProbed(const QAudioBuffer &audioBuffer); + void flush(); private: QAudioProbePrivate *d; diff --git a/src/multimedia/controls/qmediaaudioprobecontrol.cpp b/src/multimedia/controls/qmediaaudioprobecontrol.cpp index dc32cbab4..3068fd30c 100644 --- a/src/multimedia/controls/qmediaaudioprobecontrol.cpp +++ b/src/multimedia/controls/qmediaaudioprobecontrol.cpp @@ -92,6 +92,13 @@ QMediaAudioProbeControl::~QMediaAudioProbeControl() media service. */ + +/*! + \fn QMediaAudioProbeControl::flush() + + This signal should be emitted when it is required to release all frames. +*/ + #include "moc_qmediaaudioprobecontrol.cpp" QT_END_NAMESPACE diff --git a/src/multimedia/controls/qmediaaudioprobecontrol.h b/src/multimedia/controls/qmediaaudioprobecontrol.h index fd78002ac..f5359b9ad 100644 --- a/src/multimedia/controls/qmediaaudioprobecontrol.h +++ b/src/multimedia/controls/qmediaaudioprobecontrol.h @@ -59,6 +59,7 @@ public: signals: void audioBufferProbed(const QAudioBuffer &buffer); + void flush(); protected: explicit QMediaAudioProbeControl(QObject *parent = 0); diff --git a/src/multimedia/controls/qmediavideoprobecontrol.cpp b/src/multimedia/controls/qmediavideoprobecontrol.cpp index f42e17abf..9a723c0a9 100644 --- a/src/multimedia/controls/qmediavideoprobecontrol.cpp +++ b/src/multimedia/controls/qmediavideoprobecontrol.cpp @@ -92,6 +92,12 @@ QMediaVideoProbeControl::~QMediaVideoProbeControl() media service. */ +/*! + \fn QMediaVideoProbeControl::flush() + + This signal should be emitted when it is required to release all frames. +*/ + #include "moc_qmediavideoprobecontrol.cpp" QT_END_NAMESPACE diff --git a/src/multimedia/controls/qmediavideoprobecontrol.h b/src/multimedia/controls/qmediavideoprobecontrol.h index 40e64d38f..d2031ca4e 100644 --- a/src/multimedia/controls/qmediavideoprobecontrol.h +++ b/src/multimedia/controls/qmediavideoprobecontrol.h @@ -61,6 +61,7 @@ public: signals: void videoFrameProbed(const QVideoFrame &frame); + void flush(); protected: explicit QMediaVideoProbeControl(QObject *parent = 0); diff --git a/src/multimedia/video/qvideoprobe.cpp b/src/multimedia/video/qvideoprobe.cpp index d9d0d6587..49d78c4a6 100644 --- a/src/multimedia/video/qvideoprobe.cpp +++ b/src/multimedia/video/qvideoprobe.cpp @@ -103,8 +103,10 @@ QVideoProbe::~QVideoProbe() { if (d->source) { // Disconnect - if (d->probee) + if (d->probee) { disconnect(d->probee.data(), SIGNAL(videoFrameProbed(QVideoFrame)), this, SIGNAL(videoFrameProbed(QVideoFrame))); + disconnect(d->probee.data(), SIGNAL(flush()), this, SIGNAL(flush())); + } d->source.data()->service()->releaseControl(d->probee.data()); } } @@ -132,6 +134,7 @@ bool QVideoProbe::setSource(QMediaObject *source) if (d->source) { Q_ASSERT(d->probee); disconnect(d->probee.data(), SIGNAL(videoFrameProbed(QVideoFrame)), this, SIGNAL(videoFrameProbed(QVideoFrame))); + disconnect(d->probee.data(), SIGNAL(flush()), this, SIGNAL(flush())); d->source.data()->service()->releaseControl(d->probee.data()); d->source.clear(); d->probee.clear(); @@ -145,6 +148,7 @@ bool QVideoProbe::setSource(QMediaObject *source) if (d->probee) { connect(d->probee.data(), SIGNAL(videoFrameProbed(QVideoFrame)), this, SIGNAL(videoFrameProbed(QVideoFrame))); + connect(d->probee.data(), SIGNAL(flush()), this, SIGNAL(flush())); d->source = source; } } @@ -190,4 +194,18 @@ bool QVideoProbe::isActive() const return d->probee != 0; } +/*! + \fn QVideoProbe::videoFrameProbed(const QVideoFrame &frame) + + This signal should be emitted when a video frame is processed in the + media service. +*/ + +/*! + \fn QVideoProbe::flush() + + This signal should be emitted when it is required to release all frames. + Application must release all outstanding references to video frames. +*/ + QT_END_NAMESPACE diff --git a/src/multimedia/video/qvideoprobe.h b/src/multimedia/video/qvideoprobe.h index bfc3e051e..e4ba0f8dc 100644 --- a/src/multimedia/video/qvideoprobe.h +++ b/src/multimedia/video/qvideoprobe.h @@ -69,6 +69,7 @@ public: Q_SIGNALS: void videoFrameProbed(const QVideoFrame &videoFrame); + void flush(); private: QVideoProbePrivate *d; |