问题描述
下面给出了使用 Qt 播放视频文件的代码.我想播放来自 IP 摄像机的实时视频流,而不是播放视频.另一种方法是在 Qt 中嵌入 VLC 播放器,并在此处提供了该项目的链接.问题是我不知道如何将播放器包含在 Qt 中.那么我该如何进行呢?
Given below is the code for playing a video file using Qt. Instead of playing the video I want to play a live video stream from an IP Camera. Another approach is to embed the VLC Player in Qt and a link for the project is provided here. The problem is I do not know how to include the player in Qt. So how do I proceed?
推荐答案
遵循此代码.您可以使用有效的窗口 id 将小部件嵌入到另一个小部件中.如何显示其他应用程序的输出视频在 Qt 中?您可以使用 qx11embedwidget 和 qx11embedwidgetcontainerQX11EmbedWidget 和 QX11EmbedContainer
follow this code . you can embed a widget inside another widget using a valid window id . How to show output video of other application in Qt? you can use the qx11embedwidget and qx11embedwidgetcontainer QX11EmbedWidget and QX11EmbedContainer
这篇关于使用 Qt 播放实时视频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!