如何在Qt中显示其他应用程序的输出视频? [英] How to show output video of other application in Qt?

查看:119
本文介绍了如何在Qt中显示其他应用程序的输出视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Qt 中创建一个 GUI 应用程序.此应用程序将显示与 Qt 无关的应用程序 X 的输出,因此我无法集成它.X 将输出视频.这个视频没有路径,因为它是X输出的实时显示.

I am creating a GUI application in Qt. This application is to display output of a application X which is not related to Qt hence i cant integrate it. X will output a video . This video do not have a path since it is a real-time display of X output.

我想在 Qt 中显示此输出(以及一些后台 GUI 支持).

I want to show this output in Qt (along with some background GUI support).

据我所知,一种方法是获取视频的窗口 ID 并在 QWidget 中显示相同的窗口.如何做到这一点?

So as far as my knowledge one way to do this is to get the window id of video and display that same window in QWidget. How to do this?

我使用的是 Ubuntu.

I am using Ubuntu.

我可以通过以下命令获取窗口 ID.

I am able to get the window id by following command.

xwininfo -name "窗口名称"

xwininfo -name "name of window"

推荐答案

您可以尝试嵌入小部件:

You can try the embed widget:

http://harmattan-dev.nokia.com/docs/library/html/qt4/qx11embedwidget.html 带有有效的 windowId

http://harmattan-dev.nokia.com/docs/library/html/qt4/qx11embedwidget.html with a valid windowId

这篇关于如何在Qt中显示其他应用程序的输出视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆