Tried the following from http://doc.qt.io/qt-5/qml-qtmultimedia-mediaplayer.html#details
从http://doc.qt.io/qt-5/qml-qtmultimedia-mediaplayer.html#details尝试以下内容
import QtQuick 2.4
import QtQuick.Window 2.2
import QtMultimedia 5.0
Window
{
visible: true
height: 1000
width: 1000
MediaPlayer {
id: mediaplayer
source: "/home/****/template/v1.avi"
}
VideoOutput {
anchors.fill: parent
source: mediaplayer
}
MouseArea {
id: playArea
anchors.fill: parent
onPressed: mediaplayer.play();
}
}
on
在
Ubuntu 14.04.2 LTS \n \l
ubuntu14.04.2 LTS \n \l
with
与
GStreamer Core Library version 0.10.36
GStreamer核心库版本0.10.36
This gives the error shown in title on click.
I have confirmed that the file exists.
这将在单击时显示标题中的错误。我已经确认文件存在。
What else can be done now?
现在还能做什么?
1 个解决方案
#1
0
The way to set the url
in Linux is:
在Linux中设置url的方法是:
file:///home/***/template/v1.avi
文件:/ / / / * * * /模板/ v1.avi回家
So, source: "/home/****/template/v1.avi"
should be replaced by:
所以,来源:“/ home / * * * * /模板/ v1。avi"应替换为:
source: "file:///home/***/template/v1.avi"
来源:“文件:/ / / home / * * * /模板/ v1.avi”
#1
0
The way to set the url
in Linux is:
在Linux中设置url的方法是:
file:///home/***/template/v1.avi
文件:/ / / / * * * /模板/ v1.avi回家
So, source: "/home/****/template/v1.avi"
should be replaced by:
所以,来源:“/ home / * * * * /模板/ v1。avi"应替换为:
source: "file:///home/***/template/v1.avi"
来源:“文件:/ / / home / * * * /模板/ v1.avi”