summaryrefslogtreecommitdiffstats
path: root/src/multimedia/recording/qmediarecorder.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-05-19 21:15:31 +0200
committerLars Knoll <lars.knoll@qt.io>2021-05-21 09:53:05 +0000
commit84fc04caae9103aea0bbf0fe6d33143e2a28425f (patch)
treedbd40816c3d1153af560aef08d9222d993983cc9 /src/multimedia/recording/qmediarecorder.h
parentf3526fd7af8b9ca7e2929c21e5bd364fad0eaa3e (diff)
Clean up the videoOutput() API
The current API was rather messy, with multiple overloads. Change this and make the videoOutput a QObject * based property. To account for QVideoSink, add a videoSink()/setVideoSink() overload. This also helps identifying the correct sink in all cases. Add some code to protect against deletion of the videoOutput or videoSink from somewhere else. Adjust autotests and fix the qquickvideooutput autotests. With this change we are now passing all existing autotests again on Linux/gstreamer. Change-Id: I77b9863e88a7863abf27ab465fadd9c24f486502 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/multimedia/recording/qmediarecorder.h')
-rw-r--r--src/multimedia/recording/qmediarecorder.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/multimedia/recording/qmediarecorder.h b/src/multimedia/recording/qmediarecorder.h
index b6ea41c36..e887f58c5 100644
--- a/src/multimedia/recording/qmediarecorder.h
+++ b/src/multimedia/recording/qmediarecorder.h
@@ -58,7 +58,7 @@ class Q_MULTIMEDIA_EXPORT QMediaRecorder : public QMediaEncoderBase
Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
Q_PROPERTY(QMediaMetaData metaData READ metaData WRITE setMetaData NOTIFY metaDataChanged)
Q_PROPERTY(CaptureMode captureMode READ captureMode WRITE setCaptureMode NOTIFY captureModeChanged)
- Q_PROPERTY(QVariant videoOutput READ videoOutput WRITE setVideoOutput NOTIFY videoOutputChanged)
+ Q_PROPERTY(QObject *videoOutput READ videoOutput WRITE setVideoOutput NOTIFY videoOutputChanged)
Q_PROPERTY(QCamera camera READ camera)
public:
@@ -101,11 +101,11 @@ public:
QMediaCaptureSession *captureSession() const;
- void setVideoOutput(const QVariant &output);
- QVariant videoOutput() const;
-
void setVideoOutput(QObject *output);
- void setVideoOutput(QVideoSink *output);
+ QObject *videoOutput() const;
+
+ void setVideoSink(QVideoSink *output);
+ QVideoSink *videoSink() const;
public Q_SLOTS:
void record();