Skip to content

MediaPlayer QML types error signal #48

@sinadogru

Description

@sinadogru

Hello,

I guess MediaPlayer type is suppose to emit a 'error' signal if it encounters an error. But on POT, for example if the source property contains an invalid media url, while implementation gives a debug output which shows the error like,

08:15:54.262 ERROR: Failed to open source /home/pi.

but on the qml side, error signal is not emitted. Here is a simple code,

MediaPlayer {
    id: player
    source: "file:///home/pi"
    autoPlay: true
    loops: MediaPlayer.Infinite
    onError: console.log("MediaPlayer.error..");
}

VideoOutput {
    id: video
    source: player
    fillMode: VideoOutput.Stretch
    anchors.fill: parent
}

usual expectation is when the source property is wrong, it would emit an error signal. But as I mentioned above, POT gives a debug output but not emit the signal.

I've also checked on my local machine, which is ubuntu, seems like it is supposed to emit this signal, here is the output for the same qml source file above,

GStreamer; Unable to pause - "file:///home/pi"
GStreamer; Unable to pause - "file:///home/pi"
qml: MediaPlayer.error..
Error: "Resource not found."

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions