Hi,
is it possible to render video from the C++ class QMediaPlayer in Quick2’s VideoOutput item?
I need to use real c++ features like the QVideoProbe, but still display via the Quick2 engine. I have tried to expose the QMediaPlayer object to QML like so,
QMediaPlayer player;
QQuickView view;
view.engine()->rootContext()->setContextProperty("mediaplayer", &player);
and then use it in QML like this:
VideoOutput {
id: videooutput
width: 320
height: 240
source: mediaplayer
}
But that does not seem to work, no video and no error message. Same code works with the QML MediaPlayer as source though.
Thanks!
↧