RSATom / QmlVlc

[ABANDONED] libvlc wrapper for Qt Quick 2/Qml
Other
139 stars 56 forks source link

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

Open Ivshti opened 8 years ago

Ivshti commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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!
RSATom commented 8 years ago

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.

Ivshti commented 8 years ago

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

RSATom commented 8 years ago

Yes, it's one of possible solutions