123456789101112131415161718192021222324252627282930313233343536 |
- #include "widget.h"
- #include <QApplication>
- #include <QSurfaceFormat>
- #include "Logs/loginit.h"
- #include "spdlog/spdlog.h"
- #include "FmtLog/fmtlog.h"
- #include <QProcessEnvironment>
- // extern "C" {
- // #include <libavcodec/avcodec.h>
- // #include <libavutil/hwcontext.h>
- // }
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- init_log();
- // 设置 QT_QPA_PLATFORM 环境变量
- qputenv("QT_QPA_PLATFORM", "cocoa");
- QSurfaceFormat format;
- format.setDepthBufferSize(24);
- format.setStencilBufferSize(8);
- format.setVersion(3, 3);
- format.setProfile(QSurfaceFormat::CoreProfile);
- QSurfaceFormat::setDefaultFormat(format);
- SPDLOG_INFO("********** VideoPlayer **********");
- Widget w;
- w.show();
- return a.exec();
- }
|