libvlc wrapper The program has unexpectedly finished.
Unsolved
QML and Qt Quick
-
QmlVlc
https://github.com/RSATom/QmlVlcIt shows some warning but no erros
warning: C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
Output: The program has unexpectedly finished.
.pro File:
QT += quick QT += multimedia include(deps/QmlVlc/QmlVlc.pri) INCLUDEPATH += deps CONFIG += c++11 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ main.cpp RESOURCES += qml.qrc # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = macx { LIBS += -L/Applications/VLC.app/Contents/MacOS/lib } android { LIBS += -L$$PWD/android/libs/armeabi-v7a -lvlcjni ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
main.cpp:
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QmlVlc.h> #include <QmlVlc/QmlVlcConfig.h> int main(int argc, char *argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif RegisterQmlVlc(); QmlVlcConfig& config = QmlVlcConfig::instance(); config.enableAdjustFilter( true ); config.enableMarqueeFilter( true ); config.enableLogoFilter( true ); config.enableDebug( true ); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); }
-
@the_master_noob said in libvlc wrapper The program has unexpectedly finished.:
Output: The program has unexpectedly finished.
Please use debugger to see where exactly it crashes and post stack trace here.
Also, you should not create any QObject based class instances before you create QGuiApplication instance!
QmlVlcConfig is derived from QObject. -
thanks is fixed
i forgot to put vlc in enveirment path