diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-03-19 16:19:59 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-06 08:10:04 +0000 |
commit | 257c45c5627bac6b5ba6826201c1fb5f7ea8967d (patch) | |
tree | ba37c2a1301199b8bd2df26a51f4e4343b97647c /src/multimediawidgets | |
parent | 521bb5c66888a06a2dce3b4a79496076ef9455da (diff) |
Further refactor the video sink implementation on macOS/iOS.
Make sure we can deliver both SW buffers, textures and render onto
native surfaces.
As we need different implementations for the player and capture
pipelines, AVFVideoSink is now acting as a proxy to the class
doing the actual rendering.
Fold the windowed mode handling into the AVFVideoRenderer class and use
it when rendering windowed or fullscreen.
This also required some changes in AVFMediaPlayer to ensure that we always
have a AVPlayerLayer available because loading content happends asynchronously,
but we need the layer directly.
With this playback works both onto QVideoWidget and the QML VideoItem, although
there are some R<->B issues when rendering using software.
Change-Id: Ie6fe901f35989c5076eedaea4edf3b8c4d3f35f4
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimediawidgets')
-rw-r--r-- | src/multimediawidgets/qvideowidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimediawidgets/qvideowidget.cpp b/src/multimediawidgets/qvideowidget.cpp index 0cf449faf..3ca846899 100644 --- a/src/multimediawidgets/qvideowidget.cpp +++ b/src/multimediawidgets/qvideowidget.cpp @@ -108,7 +108,7 @@ QVideoWidget::QVideoWidget(QWidget *parent) { d_ptr->q_ptr = this; d_ptr->videoSink = new QVideoSink(this); - d_ptr->videoSink->setGraphicsType(QVideoSink::NativeWindow); +// d_ptr->videoSink->setGraphicsType(QVideoSink::NativeWindow); d_ptr->videoSink->setTargetRect(rect()); d_ptr->videoSink->setNativeWindowId(winId()); |