将视频与 QGraphicsScene 结合使用的最佳方式

发布于 2024-09-07 15:59:34 字数 301 浏览 3 评论 0原文

我目前正在使用 QGraphicsProxyWidget 在 QGraphicsScene 中使用 Phonon VideoWidgets。

我将视口设置为 QGLWidget。

然而,当我尝试对视频应用一些变换(例如不能被 90 度整除的旋转)时,它会给我带来很大的问题,因为它会大大减慢我的程序速度。

在阅读了我在该主题上找到的一些内容后,我发现似乎当在 QGraphicsProxyWidget 中使用 VideoWidget 时,它会进行软件转换,这可以解释速度的大幅下降。

所以我想知道是否有更好的方法来渲染视频。

I am currently using Phonon VideoWidgets inside of a QGraphicsScene using a QGraphicsProxyWidget.

I have my viewport set to a QGLWidget.

However, it causes me big issues when I try to apply some transforms to the video such as a rotation that isn't evenly divisible by 90 degrees since then it slows my program down a lot.

After reading the few things I managed to find on the subject I found that it seems that when using a VideoWidget inside a QGraphicsProxyWidget it will do software transforms which would explain the massive slowdown.

So I was wondering if there is a better way to render the video.

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

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

发布评论

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

评论(1

药祭#氼 2024-09-14 15:59:34

如果可能的话,将您的视频渲染到 opengl 帧缓冲区或像素缓冲区,并让您的窗口绘制/转换纹理。

If at all possible render your video to an opengl framebuffer or pixelbuffer, and have your window draw/transform the texture.

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