|
@@ -1,9 +1,11 @@
|
|
|
#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>
|
|
@@ -15,9 +17,17 @@ int main(int argc, char *argv[])
|
|
|
QApplication a(argc, argv);
|
|
|
init_log();
|
|
|
|
|
|
- SPDLOG_INFO("********** VideoPlayer **********");
|
|
|
+ // 设置 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();
|