diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-08-24 19:45:39 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-08-25 23:11:22 +0200 |
commit | 0c00ef07b03ffe9c5e704a2834a04816f88b8d51 (patch) | |
tree | 487be58fdc58a56ff61086b8814ee64c0e67fb1b /src/multimediawidgets/qvideowidget.cpp | |
parent | 5ef8dd45acf2b9a1d0c8a6c49cad2258f2fad95e (diff) |
Clean up the QVideoSink API
The next couple of commits will simplify how we handle HW
accelerated rendering by also going through the RHI code
path for QVideoWidget. This implies that we can remove quite
a few properties from QVideoSink, as those were only required
for the old windowed code path.
This does for the moment disable all HW acceleration on
QVideoWidget. Support for that will be re-added in follow-up
changes.
Pick-to: 6.2
Change-Id: I1474f44ed7468eb263fbf4de75f75f9af16b7773
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/multimediawidgets/qvideowidget.cpp')
-rw-r--r-- | src/multimediawidgets/qvideowidget.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/multimediawidgets/qvideowidget.cpp b/src/multimediawidgets/qvideowidget.cpp index 90de31614..f2e0877ee 100644 --- a/src/multimediawidgets/qvideowidget.cpp +++ b/src/multimediawidgets/qvideowidget.cpp @@ -101,14 +101,8 @@ QVideoWidget::QVideoWidget(QWidget *parent) { d_ptr->q_ptr = this; d_ptr->videoSink = new QVideoSink(this); - d_ptr->videoSink->setTargetRect(rect()); - d_ptr->videoSink->setNativeWindowId(winId()); connect(d_ptr->videoSink, SIGNAL(newVideoFrame(const QVideoFrame &)), this, SLOT(_q_newFrame(const QVideoFrame &))); -// connect(d_ptr->videoSink, &QVideoSink::brightnessChanged, this, &QVideoWidget::brightnessChanged); -// connect(d_ptr->videoSink, &QVideoSink::contrastChanged, this, &QVideoWidget::contrastChanged); -// connect(d_ptr->videoSink, &QVideoSink::hueChanged, this, &QVideoWidget::hueChanged); -// connect(d_ptr->videoSink, &QVideoSink::saturationChanged, this, &QVideoWidget::saturationChanged); } /*! @@ -141,7 +135,6 @@ void QVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode) if (mode == d->aspectRatioMode) return; d->aspectRatioMode = mode; - d->videoSink->setAspectRatioMode(mode); emit aspectRatioModeChanged(mode); } @@ -171,7 +164,6 @@ void QVideoWidget::setFullScreen(bool fullScreen) showNormal(); } d->wasFullScreen = fullScreen; - d->videoSink->setFullScreen(fullScreen); } /*! @@ -210,14 +202,9 @@ bool QVideoWidget::event(QEvent *event) if (event->type() == QEvent::WindowStateChange) { if (windowState() & Qt::WindowFullScreen) { - d->videoSink->setFullScreen(true); - d->videoSink->setTargetRect(QRectF(0, 0, window()->width(), window()->height())); - if (!d->wasFullScreen) emit fullScreenChanged(d->wasFullScreen = true); } else { - d->videoSink->setFullScreen(false); - if (d->wasFullScreen) emit fullScreenChanged(d->wasFullScreen = false); } @@ -250,7 +237,6 @@ void QVideoWidget::hideEvent(QHideEvent *event) */ void QVideoWidget::resizeEvent(QResizeEvent *event) { - d_ptr->videoSink->setTargetRect(QRectF(0, 0, event->size().width(), event->size().height())); QWidget::resizeEvent(event); } |