未找到 QAbstractVideoSurface 文件

发布于 2025-01-20 17:38:53 字数 595 浏览 4 评论 0原文

因此,我已经安装了qtmultimedia,在图片中,您可以看到已安装的所有模块。

然后,我在项目的Qmake中添加了模块

QT += multimedia
QT += multimediawidgets

,并且可以轻松地使用QvideOwidgetQMediaPlayer和IT编译的内容。但是包括qabstractVideOsurface不起作用!

#include <QAbstractVideoSurface>     //file not found

我已经尝试更新组件并安装QT 6.3.0,但是结果是相同的。

我错过了什么模块,或者也许是一个错误?

So I've installed QtMultimedia and in the picture, you can see all the modules installed.

my components

Then I added modules to my project's qmake

QT += multimedia
QT += multimediawidgets

And I can easily use stuff like QVideoWidget or QMediaPlayer and it compiles. But including QAbstractVideoSurface doesn't work!

#include <QAbstractVideoSurface>     //file not found

I've tried updating components and installing Qt 6.3.0, but the result is the same.

What module did I miss or maybe it's a bug?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对你的占有欲 2025-01-27 17:38:53

在 Qt 6.0.0 及更高版本中:

QAbstractVideoSurface 已被 QVideoSink 类取代,并且
通用渲染支持已得到增强,以覆盖所有像素格式
由 Qt 多媒体支持。

请阅读Qt Multimedia 的更改

In Qt 6.0.0 and higher versions:

QAbstractVideoSurface has been replaced by the QVideoSink class, and
generic rendering support has been enhanced to cover all pixel formats
supported by Qt Multimedia.

please read Changes to Qt Multimedia.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文