All classes depedns on QtWidgets module are moved to QtAVWidgets module. Thus your QtWidgets is not required for your QtQuick app. For C++ developers, code changes a little
profile, add a line
QT += avwidgets
#include <QtAV> #include <QtAVWidgets>
It was already used in QML module (and QMLPlayer) in previous release. Now it is also included in QtAVWidgets module and player example.
VideoPreviewWidget *preview = new VideoPreviewWidget(); preview->resize(160, 90); preview->setFile("path_of_video"); ... // slot of slider value changed preview->setTimestamp(value); preview->preview();
VideoOutput item crashes a lot since OpenGL rendering was enabled in previous releases. Now most crashes are fixed, but 1 crash still exists(VideoFrame assignment).
As a workaround, I add a new QML item
VideoOutput2, which is
QuickFBORenderer in C++. New renderer use the same OpenGL code path as renderers in QtAV and QtAVWidgets.
It's easier to maintain. It works fine. One limitation I know is that it's parent items can not set
layer.enabled: true. Otherwise
VideoOutput2 will not update correctly.
I don't know what is the solution. Tell me if you know.
Video item you have to
import QtAV 1.5.
Download the latest OSX player dmg, install player.app to
Assume your Qt5.4 is installed in ~/Qt5.4.0.
Now you can test your first QtAV app. Change QtAV/examples/simpleplayer/simpleplayer.pro content to
TEMPLATE = app CONFIG -= app_bundle QT += avwidgets av HEADERS = playerwindow.h SOURCES = playerwindow.cpp main.cpp
Open simpleplayer.pro in QtCreator, build and run.