Qt视频流应用程序:找不到qt.mediaplayer服务

问题描述 投票:0回答:1

我正在尝试进行非常简单的QT QML应用,以从以太网摄像机(Axis m3045v)流式传输视频:在Windows 10下一切正常,但是一旦我在Debian 10下移植代码,应用程序将无法显示视频流并返回此错误...

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

我已经按照其他类似问题中的建议安装了gstreaming(GStreamer核心库版本1.16.1)和libqt5multimedia5-plugins,但未得到任何结果

可能我仍然缺少一些非常基本的东西,但是作为Linux初学者,我在这里被屏蔽了

这里是QML代码:

import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Window 2.12
import QtMultimedia 5.12

ApplicationWindow {
visible: true
title: qsTr("test")
width: 1920
height: 1080
Video {
    id: videostream
    source: "rtsp://user::password@my_ip_address/axis-media/media.amp"
    autoPlay: true
    autoLoad: true
    anchors.top: parent.top
    width: parent.width
    height: parent.height
 } 
}

感谢您的帮助

编辑:我在两个系统中都使用QT Creator

c++ linux qt debian video-streaming
1个回答
0
投票

好经过几次尝试,我发现了这个问题:就我而言,QT是静态构建的,因此它需要显式导入使用的插件。经过检查qt多媒体安装前提条件

© www.soinside.com 2019 - 2024. All rights reserved.