diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-03-12 12:15:54 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-03-23 13:53:53 +0000 |
commit | cf77c744aa495ee3e8a93cf403b78c8ee4f8f999 (patch) | |
tree | a17ffdf744858ae253c12ab4bf61373e8eedb4d8 /examples | |
parent | f2af5faf51ab7c82e1f40c4ae7e1ae0313c1fbe5 (diff) |
Make QAbstractVideoSurface::isFormatSupported() non virtual
We're never using it, and in any case it should always be
consistent with supportedPixelFormats(), so that one method
should be enough.
Change-Id: I9eebc479093a614db426ce47447eed9d968da3be
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.cpp | 12 | ||||
-rw-r--r-- | examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.h | 1 |
2 files changed, 0 insertions, 13 deletions
diff --git a/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.cpp b/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.cpp index a9b98e06e..2d67b20f6 100644 --- a/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.cpp +++ b/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.cpp @@ -78,18 +78,6 @@ QList<QVideoFrame::PixelFormat> VideoWidgetSurface::supportedPixelFormats( } //! [0] -//! [1] -bool VideoWidgetSurface::isFormatSupported(const QVideoSurfaceFormat &format) const -{ - const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); - const QSize size = format.frameSize(); - - return imageFormat != QImage::Format_Invalid - && !size.isEmpty() - && format.handleType() == QVideoFrame::NoHandle; -} -//! [1] - //! [2] bool VideoWidgetSurface::start(const QVideoSurfaceFormat &format) { diff --git a/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.h b/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.h index a445cf6d6..3c0820bc4 100644 --- a/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.h +++ b/examples/multimediawidgets/customvideosurface/customvideowidget/videowidgetsurface.h @@ -66,7 +66,6 @@ public: QList<QVideoFrame::PixelFormat> supportedPixelFormats( QVideoFrame::HandleType handleType = QVideoFrame::NoHandle) const override; - bool isFormatSupported(const QVideoSurfaceFormat &format) const override; bool start(const QVideoSurfaceFormat &format) override; void stop() override; |