diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-03-23 13:31:22 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-06 08:11:45 +0000 |
commit | d6e52bea2da1d31bce91d1a175f9b9e84b8e37f5 (patch) | |
tree | 90e41da7f8a6abdd069da5e7fcd410d8accb8843 /src/multimedia/doc | |
parent | 9aaec39aef634a9f2d972f35484a566bdd01ecd6 (diff) |
Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormat
Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/multimedia/doc')
3 files changed, 8 insertions, 8 deletions
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/camera.cpp b/src/multimedia/doc/snippets/multimedia-snippets/camera.cpp index 85b2072dd..7f72e2e21 100644 --- a/src/multimedia/doc/snippets/multimedia-snippets/camera.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/camera.cpp @@ -87,10 +87,10 @@ void overview_camera_by_position() // -.- class MyVideoSurface : public QAbstractVideoSurface { - QList<QVideoFrame::PixelFormat> supportedPixelFormats(QVideoFrame::HandleType handleType) const + QList<QVideoSurfaceFormat::PixelFormat> supportedPixelFormats(QVideoFrame::HandleType handleType) const { Q_UNUSED(handleType); - return QList<QVideoFrame::PixelFormat>(); + return QList<QVideoSurfaceFormat::PixelFormat>(); } bool present(const QVideoFrame &frame) { diff --git a/src/multimedia/doc/snippets/multimedia-snippets/media.cpp b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp index 2f10a5e58..d4832bfa9 100644 --- a/src/multimedia/doc/snippets/multimedia-snippets/media.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp @@ -174,10 +174,10 @@ void MediaExample::MediaPlayer() { public: Surface(QObject *p) : QAbstractVideoSurface(p) { } - QList<QVideoFrame::PixelFormat> supportedPixelFormats(QVideoFrame::HandleType) const override + QList<QVideoSurfaceFormat::PixelFormat> supportedPixelFormats(QVideoFrame::HandleType) const override { // Make sure that the driver supports this pixel format. - return QList<QVideoFrame::PixelFormat>() << QVideoFrame::Format_YUYV; + return QList<QVideoSurfaceFormat::PixelFormat>() << QVideoSurfaceFormat::Format_YUYV; } // Video frames are handled here. diff --git a/src/multimedia/doc/snippets/multimedia-snippets/video.cpp b/src/multimedia/doc/snippets/multimedia-snippets/video.cpp index 561a852b5..1b877ba0b 100644 --- a/src/multimedia/doc/snippets/multimedia-snippets/video.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/video.cpp @@ -52,13 +52,13 @@ //! [Derived Surface] class MyVideoSurface : public QAbstractVideoSurface { - QList<QVideoFrame::PixelFormat> supportedPixelFormats( + QList<QVideoSurfaceFormat::PixelFormat> supportedPixelFormats( QVideoFrame::HandleType handleType = QVideoFrame::NoHandle) const { Q_UNUSED(handleType); // Return the formats you will support - return QList<QVideoFrame::PixelFormat>() << QVideoFrame::Format_RGB565; + return QList<QVideoSurfaceFormat::PixelFormat>() << QVideoSurfaceFormat::Format_RGB565; } bool present(const QVideoFrame &frame) @@ -156,7 +156,7 @@ void VideoExample::VideoSurface() { //! [Widget Surface] QImage img = QImage("images/qt-logo.png").convertToFormat(QImage::Format_ARGB32); - QVideoSurfaceFormat format(img.size(), QVideoFrame::Format_ARGB32); + QVideoSurfaceFormat format(img.size(), QVideoSurfaceFormat::Format_ARGB32); videoWidget = new QVideoWidget; videoWidget->videoSurface()->start(format); videoWidget->videoSurface()->present(img); @@ -168,7 +168,7 @@ void VideoExample::VideoSurface() graphicsView->scene()->addItem(item); graphicsView->show(); QImage img = QImage("images/qt-logo.png").convertToFormat(QImage::Format_ARGB32); - QVideoSurfaceFormat format(img.size(), QVideoFrame::Format_ARGB32); + QVideoSurfaceFormat format(img.size(), QVideoSurfaceFormat::Format_ARGB32); item->videoSurface()->start(format); item->videoSurface()->present(img); //! [GraphicsVideoItem Surface] |