Video.play 返回 DirectShowPlayerService::doSetUrlSource:未解决的错误代码 800c000d

Sud*_*dhi 1 qt directshow qml

使用 Qt 5.4.2 版

返回的错误代码:DirectShowPlayerService::doSetUrlSource:未解决的错误代码 800c000d

已使用 Video QML 类型编写 QML 文件,如下所示。我在项目文件 (.pro) 中添加了以下内容

Qt+=多媒体

QML 文件中的代码片段如下。

Video {
    id: video
    width : 800
    height : 600
    source : "Video.mp4"

    MouseArea {
        anchors.fill: parent
        onClicked: {
            video.play();
        }
    }

    focus: true
    Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
    Keys.onLeftPressed: video.seek(video.position - 5000)
    Keys.onRightPressed: video.seek(video.position + 5000)
}
Run Code Online (Sandbox Code Playgroud)

有关此错误的任何指示都会有所帮助。

Jiu*_*Jiu 5

我遇到了同样的问题,通过以下方式修复它:

改变

source: "file://D:/Temp/video/ccc.wmv"
Run Code Online (Sandbox Code Playgroud)

source: "file:///D:/Temp/video/ccc.wmv"
Run Code Online (Sandbox Code Playgroud)

正如所提到的消息doSetUrlSource表明可能使用了错误的 URL。