QmlVlc icon indicating copy to clipboard operation
QmlVlc copied to clipboard

[libvlc 2.2.x] .audio, .video and .input not working through QWebChannel

Open Ivshti opened this issue 8 years ago • 5 comments

Tried with a few videos; mp4, mkv;

OS X, libvlc 2.2.x, this is what happens:

vlcDevice.vlc.audio.count
0

vlcDevice.vlc.input.fps
0

vlcDevice.vlc.video.width
0

vlcDevice.vlc.video.height
0

This is consistent.

Will try in pure QML to see if this is QWebChannel specific or not

Ivshti avatar Aug 24 '16 11:08 Ivshti

Yep, this is specific to QWebChannel; all those props work OK in QML.

It's possible that the objects that were originally on these properties were replaced, and this was not reflected in the QWebChannel

Ivshti avatar Aug 24 '16 11:08 Ivshti

Actually, there are warnings like:

Property 'fps'' of object 'QmlVlcInput' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'hasVout'' of object 'QmlVlcInput' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'state'' of object 'QmlVlcInput' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'position'' of object 'QmlVlcInput' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'time'' of object 'QmlVlcInput' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'rate'' of object 'QmlVlcInput' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'width'' of object 'QmlVlcVideo' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'height'' of object 'QmlVlcVideo' has no notify signal and is not constant, value updates in HTML will be broken!
Property 'count'' of object 'QmlVlcVideo' has no notify signal and is not constant, value updates in HTML will be broken!

Ivshti avatar Aug 24 '16 11:08 Ivshti

Yes, it's the reason. But the problem is libvlc don't notify about change of most of this values, so I can't notify WebChannel about changes. It require some workaround.

RSATom avatar Aug 24 '16 11:08 RSATom

Can't you somehow trigger a signal to change the entire .input, .video, .audio values once an input is opened/loaded?

Ivshti avatar Aug 24 '16 12:08 Ivshti

Yes, it's one of possible solutions

RSATom avatar Aug 24 '16 12:08 RSATom