diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-12-11 15:10:11 +0300 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@qt.io> | 2016-12-12 15:29:53 +0000 |
commit | 32e35a8839085d88ddbf289ba2669c6745e9a04a (patch) | |
tree | 8a009ea34d44114ee4cfabf275cdf95fb9bf159a /src/qtmultimediaquicktools | |
parent | c89e2ea249015142f59c8ea440b6e36bac6f96c9 (diff) | |
download | qtmultimedia-32e35a8839085d88ddbf289ba2669c6745e9a04a.tar.gz |
Add missing override and remove redundant virtual
Change-Id: Ifd439abf21877adff57080489324bea729ee5279
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h | 8 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qsgvideonode_rgb.cpp | 12 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qsgvideonode_rgb_p.h | 10 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qsgvideonode_texture.cpp | 12 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qsgvideonode_texture_p.h | 10 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qsgvideonode_yuv.cpp | 16 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qsgvideonode_yuv_p.h | 10 |
7 files changed, 39 insertions, 39 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h b/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h index 666a7cbd3..c84612960 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render_p.h @@ -125,10 +125,10 @@ class QSGVideoItemSurface : public QAbstractVideoSurface public: explicit QSGVideoItemSurface(QDeclarativeVideoRendererBackend *backend, QObject *parent = 0); ~QSGVideoItemSurface(); - QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const; - bool start(const QVideoSurfaceFormat &format); - void stop(); - bool present(const QVideoFrame &frame); + QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const override; + bool start(const QVideoSurfaceFormat &format) override; + void stop() override; + bool present(const QVideoFrame &frame) override; void scheduleOpenGLContextUpdate(); private slots: diff --git a/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp b/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp index 2126f0cbd..0dfa11ab9 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp +++ b/src/qtmultimediaquicktools/qsgvideonode_rgb.cpp @@ -85,9 +85,9 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qtmultimediaquicktools/shaders/rgbvideo.frag")); } - void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); + void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; - virtual char const *const *attributeNames() const { + char const *const *attributeNames() const override { static const char *names[] = { "qt_VertexPosition", "qt_VertexTexCoord", @@ -97,7 +97,7 @@ public: } protected: - virtual void initialize() { + void initialize() override { m_id_matrix = program()->uniformLocation("qt_Matrix"); m_id_width = program()->uniformLocation("width"); m_id_rgbTexture = program()->uniformLocation("rgbTexture"); @@ -139,17 +139,17 @@ public: QOpenGLContext::currentContext()->functions()->glDeleteTextures(1, &m_textureId); } - virtual QSGMaterialType *type() const { + QSGMaterialType *type() const override { static QSGMaterialType normalType, swizzleType; return needsSwizzling() ? &swizzleType : &normalType; } - virtual QSGMaterialShader *createShader() const { + QSGMaterialShader *createShader() const override { return needsSwizzling() ? new QSGVideoMaterialShader_RGB_swizzle : new QSGVideoMaterialShader_RGB; } - virtual int compare(const QSGMaterial *other) const { + int compare(const QSGMaterial *other) const override { const QSGVideoMaterial_RGB *m = static_cast<const QSGVideoMaterial_RGB *>(other); if (!m_textureId) diff --git a/src/qtmultimediaquicktools/qsgvideonode_rgb_p.h b/src/qtmultimediaquicktools/qsgvideonode_rgb_p.h index 71b28557d..95b74be0b 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_rgb_p.h +++ b/src/qtmultimediaquicktools/qsgvideonode_rgb_p.h @@ -64,13 +64,13 @@ public: QSGVideoNode_RGB(const QVideoSurfaceFormat &format); ~QSGVideoNode_RGB(); - virtual QVideoFrame::PixelFormat pixelFormat() const { + QVideoFrame::PixelFormat pixelFormat() const override { return m_format.pixelFormat(); } - QAbstractVideoBuffer::HandleType handleType() const { + QAbstractVideoBuffer::HandleType handleType() const override { return QAbstractVideoBuffer::NoHandle; } - void setCurrentFrame(const QVideoFrame &frame, FrameFlags flags); + void setCurrentFrame(const QVideoFrame &frame, FrameFlags flags) override; private: QVideoSurfaceFormat m_format; @@ -80,8 +80,8 @@ private: class QSGVideoNodeFactory_RGB : public QSGVideoNodeFactoryInterface { public: - QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const; - QSGVideoNode *createNode(const QVideoSurfaceFormat &format); + QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const override; + QSGVideoNode *createNode(const QVideoSurfaceFormat &format) override; }; QT_END_NAMESPACE diff --git a/src/qtmultimediaquicktools/qsgvideonode_texture.cpp b/src/qtmultimediaquicktools/qsgvideonode_texture.cpp index 8080f3ec2..a26d59532 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_texture.cpp +++ b/src/qtmultimediaquicktools/qsgvideonode_texture.cpp @@ -82,9 +82,9 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qtmultimediaquicktools/shaders/rgbvideo.frag")); } - void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); + void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; - virtual char const *const *attributeNames() const { + char const *const *attributeNames() const override { static const char *names[] = { "qt_VertexPosition", "qt_VertexTexCoord", @@ -94,7 +94,7 @@ public: } protected: - virtual void initialize() { + void initialize() override { m_id_matrix = program()->uniformLocation("qt_Matrix"); m_id_Texture = program()->uniformLocation("rgbTexture"); m_id_opacity = program()->uniformLocation("opacity"); @@ -132,17 +132,17 @@ public: m_frame = QVideoFrame(); } - virtual QSGMaterialType *type() const { + QSGMaterialType *type() const override { static QSGMaterialType normalType, swizzleType; return needsSwizzling() ? &swizzleType : &normalType; } - virtual QSGMaterialShader *createShader() const { + QSGMaterialShader *createShader() const override { return needsSwizzling() ? new QSGVideoMaterialShader_Texture_swizzle : new QSGVideoMaterialShader_Texture; } - virtual int compare(const QSGMaterial *other) const { + int compare(const QSGMaterial *other) const override { const QSGVideoMaterial_Texture *m = static_cast<const QSGVideoMaterial_Texture *>(other); if (!m_textureId) diff --git a/src/qtmultimediaquicktools/qsgvideonode_texture_p.h b/src/qtmultimediaquicktools/qsgvideonode_texture_p.h index e3b288d6e..12685dd24 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_texture_p.h +++ b/src/qtmultimediaquicktools/qsgvideonode_texture_p.h @@ -64,13 +64,13 @@ public: QSGVideoNode_Texture(const QVideoSurfaceFormat &format); ~QSGVideoNode_Texture(); - virtual QVideoFrame::PixelFormat pixelFormat() const { + QVideoFrame::PixelFormat pixelFormat() const override { return m_format.pixelFormat(); } - QAbstractVideoBuffer::HandleType handleType() const { + QAbstractVideoBuffer::HandleType handleType() const override { return QAbstractVideoBuffer::GLTextureHandle; } - void setCurrentFrame(const QVideoFrame &frame, FrameFlags flags); + void setCurrentFrame(const QVideoFrame &frame, FrameFlags flags) override; private: QVideoSurfaceFormat m_format; @@ -80,8 +80,8 @@ private: class QSGVideoNodeFactory_Texture : public QSGVideoNodeFactoryInterface { public: - QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const; - QSGVideoNode *createNode(const QVideoSurfaceFormat &format); + QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const override; + QSGVideoNode *createNode(const QVideoSurfaceFormat &format) override; }; QT_END_NAMESPACE diff --git a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp index 68e6b456b..38b5af943 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp +++ b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp @@ -79,9 +79,9 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qtmultimediaquicktools/shaders/biplanaryuvvideo.frag")); } - virtual void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); + void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; - virtual char const *const *attributeNames() const { + char const *const *attributeNames() const override { static const char *names[] = { "qt_VertexPosition", "qt_VertexTexCoord", @@ -91,7 +91,7 @@ public: } protected: - virtual void initialize() { + void initialize() override { m_id_matrix = program()->uniformLocation("qt_Matrix"); m_id_plane1Width = program()->uniformLocation("plane1Width"); m_id_plane2Width = program()->uniformLocation("plane2Width"); @@ -181,10 +181,10 @@ public: setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qtmultimediaquicktools/shaders/triplanaryuvvideo.frag")); } - virtual void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial); + void updateState(const RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; protected: - virtual void initialize() { + void initialize() override { m_id_plane3Width = program()->uniformLocation("plane3Width"); m_id_plane3Texture = program()->uniformLocation("plane3Texture"); QSGVideoMaterialShader_YUV_BiPlanar::initialize(); @@ -201,7 +201,7 @@ public: QSGVideoMaterial_YUV(const QVideoSurfaceFormat &format); ~QSGVideoMaterial_YUV(); - virtual QSGMaterialType *type() const { + QSGMaterialType *type() const override { static QSGMaterialType biPlanarType, biPlanarSwizzleType, triPlanarType, uyvyType, yuyvType; switch (m_format.pixelFormat()) { @@ -218,7 +218,7 @@ public: } } - virtual QSGMaterialShader *createShader() const { + QSGMaterialShader *createShader() const override { switch (m_format.pixelFormat()) { case QVideoFrame::Format_NV12: return new QSGVideoMaterialShader_YUV_BiPlanar; @@ -233,7 +233,7 @@ public: } } - virtual int compare(const QSGMaterial *other) const { + int compare(const QSGMaterial *other) const override { const QSGVideoMaterial_YUV *m = static_cast<const QSGVideoMaterial_YUV *>(other); if (!m_textureIds[0]) return 1; diff --git a/src/qtmultimediaquicktools/qsgvideonode_yuv_p.h b/src/qtmultimediaquicktools/qsgvideonode_yuv_p.h index 2b7e62277..643f40c71 100644 --- a/src/qtmultimediaquicktools/qsgvideonode_yuv_p.h +++ b/src/qtmultimediaquicktools/qsgvideonode_yuv_p.h @@ -63,13 +63,13 @@ public: QSGVideoNode_YUV(const QVideoSurfaceFormat &format); ~QSGVideoNode_YUV(); - virtual QVideoFrame::PixelFormat pixelFormat() const { + QVideoFrame::PixelFormat pixelFormat() const override { return m_format.pixelFormat(); } - QAbstractVideoBuffer::HandleType handleType() const { + QAbstractVideoBuffer::HandleType handleType() const override { return QAbstractVideoBuffer::NoHandle; } - void setCurrentFrame(const QVideoFrame &frame, FrameFlags flags); + void setCurrentFrame(const QVideoFrame &frame, FrameFlags flags) override; private: void bindTexture(int id, int unit, int w, int h, const uchar *bits); @@ -80,8 +80,8 @@ private: class QSGVideoNodeFactory_YUV : public QSGVideoNodeFactoryInterface { public: - QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const; - QSGVideoNode *createNode(const QVideoSurfaceFormat &format); + QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const override; + QSGVideoNode *createNode(const QVideoSurfaceFormat &format) override; }; QT_END_NAMESPACE |